rj_schema 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Rakefile +4 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +16 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +141 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +202 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +224 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +333 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +562 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +3675 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +280 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +132 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +12 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +439 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +628 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +19 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +525 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +3250 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +11 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +439 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +624 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +534 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +3342 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +12 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +439 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +628 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +556 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +3432 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +12 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +439 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +628 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +1205 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +147 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +2377 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +794 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +1095 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +291 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +2179 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +672 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +397 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +161 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +4399 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +246 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +58 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +1847 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +94 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +8 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +10 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +39 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +46 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +279 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +136 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +511 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +91 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +101 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +32 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +191 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +15 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +187 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +201 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +32 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +82 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +19 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +88 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +101 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +32 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +84 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +19 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +90 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +103 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +240 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +203 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +35 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +115 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +1733 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +227 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +448 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +59 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +287 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +31 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +303 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +640 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +1387 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +78 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +47 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +156 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +174 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +498 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +823 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +183 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +54 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +1411 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +428 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +1228 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +622 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +127 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +1286 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +699 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +5648 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +708 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +424 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +43 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +2644 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +51 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +81 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +108 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +100 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +669 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +180 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +291 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +310 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +322 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +220 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +112 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +157 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +286 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +37 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +310 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +280 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +242 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +138 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +54 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +38 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +82 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +88 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +68 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +2182 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +1087 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +502 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +2096 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +12 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +886 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +497 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +2178 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +1038 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +501 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +2181 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +1082 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +501 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +294 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +250 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +1444 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +510 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +993 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +232 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +179 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +263 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +2236 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +358 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +58 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +69 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +319 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +206 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +1238 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +243 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +5146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +286 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +731 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +2554 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +167 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +1020 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +347 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +3331 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +297 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +363 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +74 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +82 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +129 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +129 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +164 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +164 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +147 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +147 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +123 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +68 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +43 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +144 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +153 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +56 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +85 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +109 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +172 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +151 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +46 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +53 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +199 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +224 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +130 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +173 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +160 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +83 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +253 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +730 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +274 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +855 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +158 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +59 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1387 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +78 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +48 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +1342 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +387 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +1183 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +1259 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +373 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +110 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +118 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +5388 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +38 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +1427 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +662 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +154 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +311 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +159 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +215 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +65 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +1055 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +57 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +1304 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +1635 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +208 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +320 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +380 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +66 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +341 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +47 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +212 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +88 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +237 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +311 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +130 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +71 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +117 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +192 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +636 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +140 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +172 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +46 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +207 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +157 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +56 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +340 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +1062 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +743 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +2427 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +127 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +57 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +253 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +325 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +103 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +57 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +256 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +320 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +92 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +171 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +72 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +70 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +43 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +7706 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +49 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +49 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +132 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +308 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +181 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +194 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +36 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +55 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +30 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +17 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +32 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +8 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +30 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +457 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +62 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +63 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +59 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +68 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +65 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +100 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +1135 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +15 -0
- data/ext/rj_schema/rj_schema.cpp +64 -41
- data/lib/rj_schema.rb +1 -1
- metadata +378 -5
@@ -0,0 +1,157 @@
|
|
1
|
+
// Copyright 2006, Google Inc.
|
2
|
+
// All rights reserved.
|
3
|
+
//
|
4
|
+
// Redistribution and use in source and binary forms, with or without
|
5
|
+
// modification, are permitted provided that the following conditions are
|
6
|
+
// met:
|
7
|
+
//
|
8
|
+
// * Redistributions of source code must retain the above copyright
|
9
|
+
// notice, this list of conditions and the following disclaimer.
|
10
|
+
// * Redistributions in binary form must reproduce the above
|
11
|
+
// copyright notice, this list of conditions and the following disclaimer
|
12
|
+
// in the documentation and/or other materials provided with the
|
13
|
+
// distribution.
|
14
|
+
// * Neither the name of Google Inc. nor the names of its
|
15
|
+
// contributors may be used to endorse or promote products derived from
|
16
|
+
// this software without specific prior written permission.
|
17
|
+
//
|
18
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
//
|
30
|
+
// Author: phanna@google.com (Patrick Hanna)
|
31
|
+
|
32
|
+
// Unit test for Google Test's --gtest_list_tests flag.
|
33
|
+
//
|
34
|
+
// A user can ask Google Test to list all tests that will run
|
35
|
+
// so that when using a filter, a user will know what
|
36
|
+
// tests to look for. The tests will not be run after listing.
|
37
|
+
//
|
38
|
+
// This program will be invoked from a Python unit test.
|
39
|
+
// Don't run it directly.
|
40
|
+
|
41
|
+
#include "gtest/gtest.h"
|
42
|
+
|
43
|
+
// Several different test cases and tests that will be listed.
|
44
|
+
TEST(Foo, Bar1) {
|
45
|
+
}
|
46
|
+
|
47
|
+
TEST(Foo, Bar2) {
|
48
|
+
}
|
49
|
+
|
50
|
+
TEST(Foo, DISABLED_Bar3) {
|
51
|
+
}
|
52
|
+
|
53
|
+
TEST(Abc, Xyz) {
|
54
|
+
}
|
55
|
+
|
56
|
+
TEST(Abc, Def) {
|
57
|
+
}
|
58
|
+
|
59
|
+
TEST(FooBar, Baz) {
|
60
|
+
}
|
61
|
+
|
62
|
+
class FooTest : public testing::Test {
|
63
|
+
};
|
64
|
+
|
65
|
+
TEST_F(FooTest, Test1) {
|
66
|
+
}
|
67
|
+
|
68
|
+
TEST_F(FooTest, DISABLED_Test2) {
|
69
|
+
}
|
70
|
+
|
71
|
+
TEST_F(FooTest, Test3) {
|
72
|
+
}
|
73
|
+
|
74
|
+
TEST(FooDeathTest, Test1) {
|
75
|
+
}
|
76
|
+
|
77
|
+
// A group of value-parameterized tests.
|
78
|
+
|
79
|
+
class MyType {
|
80
|
+
public:
|
81
|
+
explicit MyType(const std::string& a_value) : value_(a_value) {}
|
82
|
+
|
83
|
+
const std::string& value() const { return value_; }
|
84
|
+
|
85
|
+
private:
|
86
|
+
std::string value_;
|
87
|
+
};
|
88
|
+
|
89
|
+
// Teaches Google Test how to print a MyType.
|
90
|
+
void PrintTo(const MyType& x, std::ostream* os) {
|
91
|
+
*os << x.value();
|
92
|
+
}
|
93
|
+
|
94
|
+
class ValueParamTest : public testing::TestWithParam<MyType> {
|
95
|
+
};
|
96
|
+
|
97
|
+
TEST_P(ValueParamTest, TestA) {
|
98
|
+
}
|
99
|
+
|
100
|
+
TEST_P(ValueParamTest, TestB) {
|
101
|
+
}
|
102
|
+
|
103
|
+
INSTANTIATE_TEST_CASE_P(
|
104
|
+
MyInstantiation, ValueParamTest,
|
105
|
+
testing::Values(MyType("one line"),
|
106
|
+
MyType("two\nlines"),
|
107
|
+
MyType("a very\nloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong line"))); // NOLINT
|
108
|
+
|
109
|
+
// A group of typed tests.
|
110
|
+
|
111
|
+
// A deliberately long type name for testing the line-truncating
|
112
|
+
// behavior when printing a type parameter.
|
113
|
+
class VeryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName { // NOLINT
|
114
|
+
};
|
115
|
+
|
116
|
+
template <typename T>
|
117
|
+
class TypedTest : public testing::Test {
|
118
|
+
};
|
119
|
+
|
120
|
+
template <typename T, int kSize>
|
121
|
+
class MyArray {
|
122
|
+
};
|
123
|
+
|
124
|
+
typedef testing::Types<VeryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName, // NOLINT
|
125
|
+
int*, MyArray<bool, 42> > MyTypes;
|
126
|
+
|
127
|
+
TYPED_TEST_CASE(TypedTest, MyTypes);
|
128
|
+
|
129
|
+
TYPED_TEST(TypedTest, TestA) {
|
130
|
+
}
|
131
|
+
|
132
|
+
TYPED_TEST(TypedTest, TestB) {
|
133
|
+
}
|
134
|
+
|
135
|
+
// A group of type-parameterized tests.
|
136
|
+
|
137
|
+
template <typename T>
|
138
|
+
class TypeParamTest : public testing::Test {
|
139
|
+
};
|
140
|
+
|
141
|
+
TYPED_TEST_CASE_P(TypeParamTest);
|
142
|
+
|
143
|
+
TYPED_TEST_P(TypeParamTest, TestA) {
|
144
|
+
}
|
145
|
+
|
146
|
+
TYPED_TEST_P(TypeParamTest, TestB) {
|
147
|
+
}
|
148
|
+
|
149
|
+
REGISTER_TYPED_TEST_CASE_P(TypeParamTest, TestA, TestB);
|
150
|
+
|
151
|
+
INSTANTIATE_TYPED_TEST_CASE_P(My, TypeParamTest, MyTypes);
|
152
|
+
|
153
|
+
int main(int argc, char **argv) {
|
154
|
+
::testing::InitGoogleTest(&argc, argv);
|
155
|
+
|
156
|
+
return RUN_ALL_TESTS();
|
157
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
// Copyright 2006, Google Inc.
|
2
|
+
// All rights reserved.
|
3
|
+
//
|
4
|
+
// Redistribution and use in source and binary forms, with or without
|
5
|
+
// modification, are permitted provided that the following conditions are
|
6
|
+
// met:
|
7
|
+
//
|
8
|
+
// * Redistributions of source code must retain the above copyright
|
9
|
+
// notice, this list of conditions and the following disclaimer.
|
10
|
+
// * Redistributions in binary form must reproduce the above
|
11
|
+
// copyright notice, this list of conditions and the following disclaimer
|
12
|
+
// in the documentation and/or other materials provided with the
|
13
|
+
// distribution.
|
14
|
+
// * Neither the name of Google Inc. nor the names of its
|
15
|
+
// contributors may be used to endorse or promote products derived from
|
16
|
+
// this software without specific prior written permission.
|
17
|
+
//
|
18
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
//
|
30
|
+
// Author: wan@google.com (Zhanyong Wan)
|
31
|
+
|
32
|
+
#include "gtest/gtest.h"
|
33
|
+
|
34
|
+
// Tests that we don't have to define main() when we link to
|
35
|
+
// gtest_main instead of gtest.
|
36
|
+
|
37
|
+
namespace {
|
38
|
+
|
39
|
+
TEST(GTestMainTest, ShouldSucceed) {
|
40
|
+
}
|
41
|
+
|
42
|
+
} // namespace
|
43
|
+
|
44
|
+
// We are using the main() function defined in src/gtest_main.cc, so
|
45
|
+
// we don't define it here.
|
@@ -0,0 +1,56 @@
|
|
1
|
+
// Copyright 2006, Google Inc.
|
2
|
+
// All rights reserved.
|
3
|
+
//
|
4
|
+
// Redistribution and use in source and binary forms, with or without
|
5
|
+
// modification, are permitted provided that the following conditions are
|
6
|
+
// met:
|
7
|
+
//
|
8
|
+
// * Redistributions of source code must retain the above copyright
|
9
|
+
// notice, this list of conditions and the following disclaimer.
|
10
|
+
// * Redistributions in binary form must reproduce the above
|
11
|
+
// copyright notice, this list of conditions and the following disclaimer
|
12
|
+
// in the documentation and/or other materials provided with the
|
13
|
+
// distribution.
|
14
|
+
// * Neither the name of Google Inc. nor the names of its
|
15
|
+
// contributors may be used to endorse or promote products derived from
|
16
|
+
// this software without specific prior written permission.
|
17
|
+
//
|
18
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
|
30
|
+
// Tests that a Google Test program that has no test defined can run
|
31
|
+
// successfully.
|
32
|
+
//
|
33
|
+
// Author: wan@google.com (Zhanyong Wan)
|
34
|
+
|
35
|
+
#include "gtest/gtest.h"
|
36
|
+
|
37
|
+
int main(int argc, char **argv) {
|
38
|
+
testing::InitGoogleTest(&argc, argv);
|
39
|
+
|
40
|
+
// An ad-hoc assertion outside of all tests.
|
41
|
+
//
|
42
|
+
// This serves three purposes:
|
43
|
+
//
|
44
|
+
// 1. It verifies that an ad-hoc assertion can be executed even if
|
45
|
+
// no test is defined.
|
46
|
+
// 2. It verifies that a failed ad-hoc assertion causes the test
|
47
|
+
// program to fail.
|
48
|
+
// 3. We had a bug where the XML output won't be generated if an
|
49
|
+
// assertion is executed before RUN_ALL_TESTS() is called, even
|
50
|
+
// though --gtest_output=xml is specified. This makes sure the
|
51
|
+
// bug is fixed and doesn't regress.
|
52
|
+
EXPECT_EQ(1, 2);
|
53
|
+
|
54
|
+
// The above EXPECT_EQ() should cause RUN_ALL_TESTS() to return non-zero.
|
55
|
+
return RUN_ALL_TESTS() ? 0 : 1;
|
56
|
+
}
|
@@ -0,0 +1,340 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
#
|
3
|
+
# Copyright 2008, Google Inc.
|
4
|
+
# All rights reserved.
|
5
|
+
#
|
6
|
+
# Redistribution and use in source and binary forms, with or without
|
7
|
+
# modification, are permitted provided that the following conditions are
|
8
|
+
# met:
|
9
|
+
#
|
10
|
+
# * Redistributions of source code must retain the above copyright
|
11
|
+
# notice, this list of conditions and the following disclaimer.
|
12
|
+
# * Redistributions in binary form must reproduce the above
|
13
|
+
# copyright notice, this list of conditions and the following disclaimer
|
14
|
+
# in the documentation and/or other materials provided with the
|
15
|
+
# distribution.
|
16
|
+
# * Neither the name of Google Inc. nor the names of its
|
17
|
+
# contributors may be used to endorse or promote products derived from
|
18
|
+
# this software without specific prior written permission.
|
19
|
+
#
|
20
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
21
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
22
|
+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
23
|
+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
24
|
+
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
25
|
+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
26
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
27
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
28
|
+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
29
|
+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
30
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
|
32
|
+
"""Tests the text output of Google C++ Testing Framework.
|
33
|
+
|
34
|
+
SYNOPSIS
|
35
|
+
gtest_output_test.py --build_dir=BUILD/DIR --gengolden
|
36
|
+
# where BUILD/DIR contains the built gtest_output_test_ file.
|
37
|
+
gtest_output_test.py --gengolden
|
38
|
+
gtest_output_test.py
|
39
|
+
"""
|
40
|
+
|
41
|
+
__author__ = 'wan@google.com (Zhanyong Wan)'
|
42
|
+
|
43
|
+
import difflib
|
44
|
+
import os
|
45
|
+
import re
|
46
|
+
import sys
|
47
|
+
import gtest_test_utils
|
48
|
+
|
49
|
+
|
50
|
+
# The flag for generating the golden file
|
51
|
+
GENGOLDEN_FLAG = '--gengolden'
|
52
|
+
CATCH_EXCEPTIONS_ENV_VAR_NAME = 'GTEST_CATCH_EXCEPTIONS'
|
53
|
+
|
54
|
+
IS_WINDOWS = os.name == 'nt'
|
55
|
+
|
56
|
+
# TODO(vladl@google.com): remove the _lin suffix.
|
57
|
+
GOLDEN_NAME = 'gtest_output_test_golden_lin.txt'
|
58
|
+
|
59
|
+
PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_output_test_')
|
60
|
+
|
61
|
+
# At least one command we exercise must not have the
|
62
|
+
# 'internal_skip_environment_and_ad_hoc_tests' argument.
|
63
|
+
COMMAND_LIST_TESTS = ({}, [PROGRAM_PATH, '--gtest_list_tests'])
|
64
|
+
COMMAND_WITH_COLOR = ({}, [PROGRAM_PATH, '--gtest_color=yes'])
|
65
|
+
COMMAND_WITH_TIME = ({}, [PROGRAM_PATH,
|
66
|
+
'--gtest_print_time',
|
67
|
+
'internal_skip_environment_and_ad_hoc_tests',
|
68
|
+
'--gtest_filter=FatalFailureTest.*:LoggingTest.*'])
|
69
|
+
COMMAND_WITH_DISABLED = (
|
70
|
+
{}, [PROGRAM_PATH,
|
71
|
+
'--gtest_also_run_disabled_tests',
|
72
|
+
'internal_skip_environment_and_ad_hoc_tests',
|
73
|
+
'--gtest_filter=*DISABLED_*'])
|
74
|
+
COMMAND_WITH_SHARDING = (
|
75
|
+
{'GTEST_SHARD_INDEX': '1', 'GTEST_TOTAL_SHARDS': '2'},
|
76
|
+
[PROGRAM_PATH,
|
77
|
+
'internal_skip_environment_and_ad_hoc_tests',
|
78
|
+
'--gtest_filter=PassingTest.*'])
|
79
|
+
|
80
|
+
GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME)
|
81
|
+
|
82
|
+
|
83
|
+
def ToUnixLineEnding(s):
|
84
|
+
"""Changes all Windows/Mac line endings in s to UNIX line endings."""
|
85
|
+
|
86
|
+
return s.replace('\r\n', '\n').replace('\r', '\n')
|
87
|
+
|
88
|
+
|
89
|
+
def RemoveLocations(test_output):
|
90
|
+
"""Removes all file location info from a Google Test program's output.
|
91
|
+
|
92
|
+
Args:
|
93
|
+
test_output: the output of a Google Test program.
|
94
|
+
|
95
|
+
Returns:
|
96
|
+
output with all file location info (in the form of
|
97
|
+
'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or
|
98
|
+
'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by
|
99
|
+
'FILE_NAME:#: '.
|
100
|
+
"""
|
101
|
+
|
102
|
+
return re.sub(r'.*[/\\](.+)(\:\d+|\(\d+\))\: ', r'\1:#: ', test_output)
|
103
|
+
|
104
|
+
|
105
|
+
def RemoveStackTraceDetails(output):
|
106
|
+
"""Removes all stack traces from a Google Test program's output."""
|
107
|
+
|
108
|
+
# *? means "find the shortest string that matches".
|
109
|
+
return re.sub(r'Stack trace:(.|\n)*?\n\n',
|
110
|
+
'Stack trace: (omitted)\n\n', output)
|
111
|
+
|
112
|
+
|
113
|
+
def RemoveStackTraces(output):
|
114
|
+
"""Removes all traces of stack traces from a Google Test program's output."""
|
115
|
+
|
116
|
+
# *? means "find the shortest string that matches".
|
117
|
+
return re.sub(r'Stack trace:(.|\n)*?\n\n', '', output)
|
118
|
+
|
119
|
+
|
120
|
+
def RemoveTime(output):
|
121
|
+
"""Removes all time information from a Google Test program's output."""
|
122
|
+
|
123
|
+
return re.sub(r'\(\d+ ms', '(? ms', output)
|
124
|
+
|
125
|
+
|
126
|
+
def RemoveTypeInfoDetails(test_output):
|
127
|
+
"""Removes compiler-specific type info from Google Test program's output.
|
128
|
+
|
129
|
+
Args:
|
130
|
+
test_output: the output of a Google Test program.
|
131
|
+
|
132
|
+
Returns:
|
133
|
+
output with type information normalized to canonical form.
|
134
|
+
"""
|
135
|
+
|
136
|
+
# some compilers output the name of type 'unsigned int' as 'unsigned'
|
137
|
+
return re.sub(r'unsigned int', 'unsigned', test_output)
|
138
|
+
|
139
|
+
|
140
|
+
def NormalizeToCurrentPlatform(test_output):
|
141
|
+
"""Normalizes platform specific output details for easier comparison."""
|
142
|
+
|
143
|
+
if IS_WINDOWS:
|
144
|
+
# Removes the color information that is not present on Windows.
|
145
|
+
test_output = re.sub('\x1b\\[(0;3\d)?m', '', test_output)
|
146
|
+
# Changes failure message headers into the Windows format.
|
147
|
+
test_output = re.sub(r': Failure\n', r': error: ', test_output)
|
148
|
+
# Changes file(line_number) to file:line_number.
|
149
|
+
test_output = re.sub(r'((\w|\.)+)\((\d+)\):', r'\1:\3:', test_output)
|
150
|
+
|
151
|
+
return test_output
|
152
|
+
|
153
|
+
|
154
|
+
def RemoveTestCounts(output):
|
155
|
+
"""Removes test counts from a Google Test program's output."""
|
156
|
+
|
157
|
+
output = re.sub(r'\d+ tests?, listed below',
|
158
|
+
'? tests, listed below', output)
|
159
|
+
output = re.sub(r'\d+ FAILED TESTS',
|
160
|
+
'? FAILED TESTS', output)
|
161
|
+
output = re.sub(r'\d+ tests? from \d+ test cases?',
|
162
|
+
'? tests from ? test cases', output)
|
163
|
+
output = re.sub(r'\d+ tests? from ([a-zA-Z_])',
|
164
|
+
r'? tests from \1', output)
|
165
|
+
return re.sub(r'\d+ tests?\.', '? tests.', output)
|
166
|
+
|
167
|
+
|
168
|
+
def RemoveMatchingTests(test_output, pattern):
|
169
|
+
"""Removes output of specified tests from a Google Test program's output.
|
170
|
+
|
171
|
+
This function strips not only the beginning and the end of a test but also
|
172
|
+
all output in between.
|
173
|
+
|
174
|
+
Args:
|
175
|
+
test_output: A string containing the test output.
|
176
|
+
pattern: A regex string that matches names of test cases or
|
177
|
+
tests to remove.
|
178
|
+
|
179
|
+
Returns:
|
180
|
+
Contents of test_output with tests whose names match pattern removed.
|
181
|
+
"""
|
182
|
+
|
183
|
+
test_output = re.sub(
|
184
|
+
r'.*\[ RUN \] .*%s(.|\n)*?\[( FAILED | OK )\] .*%s.*\n' % (
|
185
|
+
pattern, pattern),
|
186
|
+
'',
|
187
|
+
test_output)
|
188
|
+
return re.sub(r'.*%s.*\n' % pattern, '', test_output)
|
189
|
+
|
190
|
+
|
191
|
+
def NormalizeOutput(output):
|
192
|
+
"""Normalizes output (the output of gtest_output_test_.exe)."""
|
193
|
+
|
194
|
+
output = ToUnixLineEnding(output)
|
195
|
+
output = RemoveLocations(output)
|
196
|
+
output = RemoveStackTraceDetails(output)
|
197
|
+
output = RemoveTime(output)
|
198
|
+
return output
|
199
|
+
|
200
|
+
|
201
|
+
def GetShellCommandOutput(env_cmd):
|
202
|
+
"""Runs a command in a sub-process, and returns its output in a string.
|
203
|
+
|
204
|
+
Args:
|
205
|
+
env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra
|
206
|
+
environment variables to set, and element 1 is a string with
|
207
|
+
the command and any flags.
|
208
|
+
|
209
|
+
Returns:
|
210
|
+
A string with the command's combined standard and diagnostic output.
|
211
|
+
"""
|
212
|
+
|
213
|
+
# Spawns cmd in a sub-process, and gets its standard I/O file objects.
|
214
|
+
# Set and save the environment properly.
|
215
|
+
environ = os.environ.copy()
|
216
|
+
environ.update(env_cmd[0])
|
217
|
+
p = gtest_test_utils.Subprocess(env_cmd[1], env=environ)
|
218
|
+
|
219
|
+
return p.output
|
220
|
+
|
221
|
+
|
222
|
+
def GetCommandOutput(env_cmd):
|
223
|
+
"""Runs a command and returns its output with all file location
|
224
|
+
info stripped off.
|
225
|
+
|
226
|
+
Args:
|
227
|
+
env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra
|
228
|
+
environment variables to set, and element 1 is a string with
|
229
|
+
the command and any flags.
|
230
|
+
"""
|
231
|
+
|
232
|
+
# Disables exception pop-ups on Windows.
|
233
|
+
environ, cmdline = env_cmd
|
234
|
+
environ = dict(environ) # Ensures we are modifying a copy.
|
235
|
+
environ[CATCH_EXCEPTIONS_ENV_VAR_NAME] = '1'
|
236
|
+
return NormalizeOutput(GetShellCommandOutput((environ, cmdline)))
|
237
|
+
|
238
|
+
|
239
|
+
def GetOutputOfAllCommands():
|
240
|
+
"""Returns concatenated output from several representative commands."""
|
241
|
+
|
242
|
+
return (GetCommandOutput(COMMAND_WITH_COLOR) +
|
243
|
+
GetCommandOutput(COMMAND_WITH_TIME) +
|
244
|
+
GetCommandOutput(COMMAND_WITH_DISABLED) +
|
245
|
+
GetCommandOutput(COMMAND_WITH_SHARDING))
|
246
|
+
|
247
|
+
|
248
|
+
test_list = GetShellCommandOutput(COMMAND_LIST_TESTS)
|
249
|
+
SUPPORTS_DEATH_TESTS = 'DeathTest' in test_list
|
250
|
+
SUPPORTS_TYPED_TESTS = 'TypedTest' in test_list
|
251
|
+
SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest' in test_list
|
252
|
+
SUPPORTS_STACK_TRACES = False
|
253
|
+
|
254
|
+
CAN_GENERATE_GOLDEN_FILE = (SUPPORTS_DEATH_TESTS and
|
255
|
+
SUPPORTS_TYPED_TESTS and
|
256
|
+
SUPPORTS_THREADS and
|
257
|
+
not IS_WINDOWS)
|
258
|
+
|
259
|
+
class GTestOutputTest(gtest_test_utils.TestCase):
|
260
|
+
def RemoveUnsupportedTests(self, test_output):
|
261
|
+
if not SUPPORTS_DEATH_TESTS:
|
262
|
+
test_output = RemoveMatchingTests(test_output, 'DeathTest')
|
263
|
+
if not SUPPORTS_TYPED_TESTS:
|
264
|
+
test_output = RemoveMatchingTests(test_output, 'TypedTest')
|
265
|
+
test_output = RemoveMatchingTests(test_output, 'TypedDeathTest')
|
266
|
+
test_output = RemoveMatchingTests(test_output, 'TypeParamDeathTest')
|
267
|
+
if not SUPPORTS_THREADS:
|
268
|
+
test_output = RemoveMatchingTests(test_output,
|
269
|
+
'ExpectFailureWithThreadsTest')
|
270
|
+
test_output = RemoveMatchingTests(test_output,
|
271
|
+
'ScopedFakeTestPartResultReporterTest')
|
272
|
+
test_output = RemoveMatchingTests(test_output,
|
273
|
+
'WorksConcurrently')
|
274
|
+
if not SUPPORTS_STACK_TRACES:
|
275
|
+
test_output = RemoveStackTraces(test_output)
|
276
|
+
|
277
|
+
return test_output
|
278
|
+
|
279
|
+
def testOutput(self):
|
280
|
+
output = GetOutputOfAllCommands()
|
281
|
+
|
282
|
+
golden_file = open(GOLDEN_PATH, 'r')
|
283
|
+
# A mis-configured source control system can cause \r appear in EOL
|
284
|
+
# sequences when we read the golden file irrespective of an operating
|
285
|
+
# system used. Therefore, we need to strip those \r's from newlines
|
286
|
+
# unconditionally.
|
287
|
+
golden = ToUnixLineEnding(golden_file.read())
|
288
|
+
golden_file.close()
|
289
|
+
|
290
|
+
# We want the test to pass regardless of certain features being
|
291
|
+
# supported or not.
|
292
|
+
|
293
|
+
# We still have to remove type name specifics in all cases.
|
294
|
+
normalized_actual = RemoveTypeInfoDetails(output)
|
295
|
+
normalized_golden = RemoveTypeInfoDetails(golden)
|
296
|
+
|
297
|
+
if CAN_GENERATE_GOLDEN_FILE:
|
298
|
+
self.assertEqual(normalized_golden, normalized_actual,
|
299
|
+
'\n'.join(difflib.unified_diff(
|
300
|
+
normalized_golden.split('\n'),
|
301
|
+
normalized_actual.split('\n'),
|
302
|
+
'golden', 'actual')))
|
303
|
+
else:
|
304
|
+
normalized_actual = NormalizeToCurrentPlatform(
|
305
|
+
RemoveTestCounts(normalized_actual))
|
306
|
+
normalized_golden = NormalizeToCurrentPlatform(
|
307
|
+
RemoveTestCounts(self.RemoveUnsupportedTests(normalized_golden)))
|
308
|
+
|
309
|
+
# This code is very handy when debugging golden file differences:
|
310
|
+
if os.getenv('DEBUG_GTEST_OUTPUT_TEST'):
|
311
|
+
open(os.path.join(
|
312
|
+
gtest_test_utils.GetSourceDir(),
|
313
|
+
'_gtest_output_test_normalized_actual.txt'), 'wb').write(
|
314
|
+
normalized_actual)
|
315
|
+
open(os.path.join(
|
316
|
+
gtest_test_utils.GetSourceDir(),
|
317
|
+
'_gtest_output_test_normalized_golden.txt'), 'wb').write(
|
318
|
+
normalized_golden)
|
319
|
+
|
320
|
+
self.assertEqual(normalized_golden, normalized_actual)
|
321
|
+
|
322
|
+
|
323
|
+
if __name__ == '__main__':
|
324
|
+
if sys.argv[1:] == [GENGOLDEN_FLAG]:
|
325
|
+
if CAN_GENERATE_GOLDEN_FILE:
|
326
|
+
output = GetOutputOfAllCommands()
|
327
|
+
golden_file = open(GOLDEN_PATH, 'wb')
|
328
|
+
golden_file.write(output)
|
329
|
+
golden_file.close()
|
330
|
+
else:
|
331
|
+
message = (
|
332
|
+
"""Unable to write a golden file when compiled in an environment
|
333
|
+
that does not support all the required features (death tests, typed tests,
|
334
|
+
and multiple threads). Please generate the golden file using a binary built
|
335
|
+
with those features enabled.""")
|
336
|
+
|
337
|
+
sys.stderr.write(message)
|
338
|
+
sys.exit(1)
|
339
|
+
else:
|
340
|
+
gtest_test_utils.Main()
|