"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "googletest/test/gtest_test_macro_stack_footprint_test.cc" between
googletest-release-1.11.0.tar.gz and googletest-release-1.12.0.tar.gz

About: GoogleTest is Google's (unit) testing and mocking framework for C++ tests.

gtest_test_macro_stack_footprint_test.cc  (googletest-release-1.11.0):gtest_test_macro_stack_footprint_test.cc  (googletest-release-1.12.0)
skipping to change at line 42 skipping to change at line 42
// such static initialization logic for a translation unit in a common, // such static initialization logic for a translation unit in a common,
// internal function. Since Google's build system restricts how much // internal function. Since Google's build system restricts how much
// stack space a function can use, there's a limit on how many TEST()s // stack space a function can use, there's a limit on how many TEST()s
// one can put in a single C++ test file. This test ensures that a large // one can put in a single C++ test file. This test ensures that a large
// number of TEST()s can be defined in the same translation unit. // number of TEST()s can be defined in the same translation unit.
#include "gtest/gtest.h" #include "gtest/gtest.h"
// This macro defines 10 dummy tests. // This macro defines 10 dummy tests.
#define TEN_TESTS_(test_case_name) \ #define TEN_TESTS_(test_case_name) \
TEST(test_case_name, T0) {} \ TEST(test_case_name, T0) {} \
TEST(test_case_name, T1) {} \ TEST(test_case_name, T1) {} \
TEST(test_case_name, T2) {} \ TEST(test_case_name, T2) {} \
TEST(test_case_name, T3) {} \ TEST(test_case_name, T3) {} \
TEST(test_case_name, T4) {} \ TEST(test_case_name, T4) {} \
TEST(test_case_name, T5) {} \ TEST(test_case_name, T5) {} \
TEST(test_case_name, T6) {} \ TEST(test_case_name, T6) {} \
TEST(test_case_name, T7) {} \ TEST(test_case_name, T7) {} \
TEST(test_case_name, T8) {} \ TEST(test_case_name, T8) {} \
TEST(test_case_name, T9) {} TEST(test_case_name, T9) {}
// This macro defines 100 dummy tests. // This macro defines 100 dummy tests.
#define HUNDRED_TESTS_(test_case_name_prefix) \ #define HUNDRED_TESTS_(test_case_name_prefix) \
TEN_TESTS_(test_case_name_prefix ## 0) \ TEN_TESTS_(test_case_name_prefix##0) \
TEN_TESTS_(test_case_name_prefix ## 1) \ TEN_TESTS_(test_case_name_prefix##1) \
TEN_TESTS_(test_case_name_prefix ## 2) \ TEN_TESTS_(test_case_name_prefix##2) \
TEN_TESTS_(test_case_name_prefix ## 3) \ TEN_TESTS_(test_case_name_prefix##3) \
TEN_TESTS_(test_case_name_prefix ## 4) \ TEN_TESTS_(test_case_name_prefix##4) \
TEN_TESTS_(test_case_name_prefix ## 5) \ TEN_TESTS_(test_case_name_prefix##5) \
TEN_TESTS_(test_case_name_prefix ## 6) \ TEN_TESTS_(test_case_name_prefix##6) \
TEN_TESTS_(test_case_name_prefix ## 7) \ TEN_TESTS_(test_case_name_prefix##7) \
TEN_TESTS_(test_case_name_prefix ## 8) \ TEN_TESTS_(test_case_name_prefix##8) \
TEN_TESTS_(test_case_name_prefix ## 9) TEN_TESTS_(test_case_name_prefix##9)
// This macro defines 1000 dummy tests. // This macro defines 1000 dummy tests.
#define THOUSAND_TESTS_(test_case_name_prefix) \ #define THOUSAND_TESTS_(test_case_name_prefix) \
HUNDRED_TESTS_(test_case_name_prefix ## 0) \ HUNDRED_TESTS_(test_case_name_prefix##0) \
HUNDRED_TESTS_(test_case_name_prefix ## 1) \ HUNDRED_TESTS_(test_case_name_prefix##1) \
HUNDRED_TESTS_(test_case_name_prefix ## 2) \ HUNDRED_TESTS_(test_case_name_prefix##2) \
HUNDRED_TESTS_(test_case_name_prefix ## 3) \ HUNDRED_TESTS_(test_case_name_prefix##3) \
HUNDRED_TESTS_(test_case_name_prefix ## 4) \ HUNDRED_TESTS_(test_case_name_prefix##4) \
HUNDRED_TESTS_(test_case_name_prefix ## 5) \ HUNDRED_TESTS_(test_case_name_prefix##5) \
HUNDRED_TESTS_(test_case_name_prefix ## 6) \ HUNDRED_TESTS_(test_case_name_prefix##6) \
HUNDRED_TESTS_(test_case_name_prefix ## 7) \ HUNDRED_TESTS_(test_case_name_prefix##7) \
HUNDRED_TESTS_(test_case_name_prefix ## 8) \ HUNDRED_TESTS_(test_case_name_prefix##8) \
HUNDRED_TESTS_(test_case_name_prefix ## 9) HUNDRED_TESTS_(test_case_name_prefix##9)
// Ensures that we can define 1000 TEST()s in the same translation // Ensures that we can define 1000 TEST()s in the same translation
// unit. // unit.
THOUSAND_TESTS_(T) THOUSAND_TESTS_(T)
int main(int argc, char **argv) { int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
// We don't actually need to run the dummy tests - the purpose is to // We don't actually need to run the dummy tests - the purpose is to
// ensure that they compile. // ensure that they compile.
 End of changes. 3 change blocks. 
29 lines changed or deleted 29 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)