diff options
author | Gennadiy Rozental <rogeeff@google.com> | 2019-11-26 20:47:30 (GMT) |
---|---|---|
committer | Gennadiy Rozental <rogeeff@google.com> | 2019-11-26 20:47:30 (GMT) |
commit | 0361bdf591dd36d488b9d026f6f6cbd52593036e (patch) | |
tree | bb28478a0f05a472fdfc46ff061cb7a2d99ba2a5 /googletest/src/gtest_main.cc | |
parent | db13ff1f0bd5a94e1e81c656df3ac7bd70bc3c06 (diff) | |
parent | a909becdc599c46bcb57346b6123cb57cd07d15d (diff) | |
download | googletest-0361bdf591dd36d488b9d026f6f6cbd52593036e.zip googletest-0361bdf591dd36d488b9d026f6f6cbd52593036e.tar.gz googletest-0361bdf591dd36d488b9d026f6f6cbd52593036e.tar.bz2 |
Merge pull request #2596 from kuzkry:remove-workaround_msvc-wmain-link-error
PiperOrigin-RevId: 282589492
Diffstat (limited to 'googletest/src/gtest_main.cc')
-rw-r--r-- | googletest/src/gtest_main.cc | 11 |
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(); } |