summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorKrystian Kuzniarek <krystian.kuzniarek@gmail.com>2019-11-17 15:39:03 (GMT)
committerKrystian Kuzniarek <krystian.kuzniarek@gmail.com>2019-11-22 16:45:04 (GMT)
commita909becdc599c46bcb57346b6123cb57cd07d15d (patch)
tree7784550ce4208a489d7c65318f54158a821cb75b /googletest
parent298a40f023e6813d2bf73847c3a38ceaf5e46320 (diff)
downloadgoogletest-a909becdc599c46bcb57346b6123cb57cd07d15d.zip
googletest-a909becdc599c46bcb57346b6123cb57cd07d15d.tar.gz
googletest-a909becdc599c46bcb57346b6123cb57cd07d15d.tar.bz2
unify googletest and googlemock main functionsrefs/pull/2596/head
Diffstat (limited to 'googletest')
-rw-r--r--googletest/src/gtest_main.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/googletest/src/gtest_main.cc b/googletest/src/gtest_main.cc
index 46b27c3..63b2cfd 100644
--- a/googletest/src/gtest_main.cc
+++ b/googletest/src/gtest_main.cc
@@ -27,7 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <cstdio>
+#include <iostream>
#include "gtest/gtest.h"
#if GTEST_OS_ESP8266 || GTEST_OS_ESP32
@@ -45,9 +45,14 @@ void loop() { RUN_ALL_TESTS(); }
#endif
#else
+#if __MSC_VER
+# include <tchar.h> // NOLINT
-GTEST_API_ int main(int argc, char **argv) {
- printf("Running main() from %s\n", __FILE__);
+GTEST_API_ int _tmain(int argc, TCHAR** argv) {
+#else
+GTEST_API_ int main(int argc, char** argv) {
+#endif // __MSC_VER
+ std::cout << "Running main() from " << __FILE__ << '\n';
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}