This commit is contained in:
Xiang Xiao 2025-02-07 02:16:30 +00:00 committed by GitHub
commit b7be3bc1b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ void loop() { RUN_ALL_TESTS(); }
GTEST_API_ int _tmain(int argc, TCHAR** argv) { GTEST_API_ int _tmain(int argc, TCHAR** argv) {
#else #else
GTEST_API_ int main(int argc, char** argv) { extern "C" GTEST_API_ int main(int argc, char** argv) {
#endif // GTEST_OS_WINDOWS_MOBILE #endif // GTEST_OS_WINDOWS_MOBILE
std::cout << "Running main() from gmock_main.cc\n"; std::cout << "Running main() from gmock_main.cc\n";
// Since Google Mock depends on Google Test, InitGoogleMock() is // Since Google Mock depends on Google Test, InitGoogleMock() is

View File

@ -58,7 +58,7 @@ GTEST_API_ int main() {
#else #else
// Normal platforms: program entry point is main, argc/argv are initialized. // Normal platforms: program entry point is main, argc/argv are initialized.
GTEST_API_ int main(int argc, char **argv) { extern "C" GTEST_API_ int main(int argc, char **argv) {
printf("Running main() from %s\n", __FILE__); printf("Running main() from %s\n", __FILE__);
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();