diff options
author | Abseil Team <absl-team@google.com> | 2021-11-08 18:49:32 (GMT) |
---|---|---|
committer | dinord <dino.radakovich@gmail.com> | 2021-11-09 15:24:14 (GMT) |
commit | aa486f165e982e82e2112d20a7561f64736d4b42 (patch) | |
tree | 272b810b443d62c1e41791ebb7d106785a6e1460 /googletest/include | |
parent | c3792825bfb11490a61caa088692be95944c1faf (diff) | |
download | googletest-aa486f165e982e82e2112d20a7561f64736d4b42.zip googletest-aa486f165e982e82e2112d20a7561f64736d4b42.tar.gz googletest-aa486f165e982e82e2112d20a7561f64736d4b42.tar.bz2 |
Googletest export
Add missing InitGoogleTest line in "Registering tests" example code
Copying the original code gives the following error message
"""
IMPORTANT NOTICE - DO NOT IGNORE:
This test program did NOT call testing::InitGoogleTest() before calling RUN_ALL_TESTS(). This is INVALID. Soon Google Test will start to enforce the valid usage. Please fix it ASAP, or IT WILL START TO FAIL.
"""
PiperOrigin-RevId: 408385714
Diffstat (limited to 'googletest/include')
-rw-r--r-- | googletest/include/gtest/gtest.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index cdde1aa..1bb9dec 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -2451,6 +2451,7 @@ GTEST_API_ std::string TempDir(); // } // ... // int main(int argc, char** argv) { +// ::testing::InitGoogleTest(&argc, argv); // std::vector<int> values_to_test = LoadValuesFromConfig(); // RegisterMyTests(values_to_test); // ... |