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,341 @@
|
|
1
|
+
// Copyright 2009 Google Inc. All rights reserved.
|
2
|
+
//
|
3
|
+
// Redistribution and use in source and binary forms, with or without
|
4
|
+
// modification, are permitted provided that the following conditions are
|
5
|
+
// met:
|
6
|
+
//
|
7
|
+
// * Redistributions of source code must retain the above copyright
|
8
|
+
// notice, this list of conditions and the following disclaimer.
|
9
|
+
// * Redistributions in binary form must reproduce the above
|
10
|
+
// copyright notice, this list of conditions and the following disclaimer
|
11
|
+
// in the documentation and/or other materials provided with the
|
12
|
+
// distribution.
|
13
|
+
// * Neither the name of Google Inc. nor the names of its
|
14
|
+
// contributors may be used to endorse or promote products derived from
|
15
|
+
// this software without specific prior written permission.
|
16
|
+
//
|
17
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
18
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
19
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
20
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
21
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
22
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
23
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
24
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
25
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
//
|
29
|
+
// Author: vladl@google.com (Vlad Losev)
|
30
|
+
//
|
31
|
+
// The Google C++ Testing Framework (Google Test)
|
32
|
+
//
|
33
|
+
// This file contains tests verifying correctness of data provided via
|
34
|
+
// UnitTest's public methods.
|
35
|
+
|
36
|
+
#include "gtest/gtest.h"
|
37
|
+
|
38
|
+
#include <string.h> // For strcmp.
|
39
|
+
#include <algorithm>
|
40
|
+
|
41
|
+
using ::testing::InitGoogleTest;
|
42
|
+
|
43
|
+
namespace testing {
|
44
|
+
namespace internal {
|
45
|
+
|
46
|
+
template <typename T>
|
47
|
+
struct LessByName {
|
48
|
+
bool operator()(const T* a, const T* b) {
|
49
|
+
return strcmp(a->name(), b->name()) < 0;
|
50
|
+
}
|
51
|
+
};
|
52
|
+
|
53
|
+
class UnitTestHelper {
|
54
|
+
public:
|
55
|
+
// Returns the array of pointers to all test cases sorted by the test case
|
56
|
+
// name. The caller is responsible for deleting the array.
|
57
|
+
static TestCase const** GetSortedTestCases() {
|
58
|
+
UnitTest& unit_test = *UnitTest::GetInstance();
|
59
|
+
TestCase const** const test_cases =
|
60
|
+
new const TestCase*[unit_test.total_test_case_count()];
|
61
|
+
|
62
|
+
for (int i = 0; i < unit_test.total_test_case_count(); ++i)
|
63
|
+
test_cases[i] = unit_test.GetTestCase(i);
|
64
|
+
|
65
|
+
std::sort(test_cases,
|
66
|
+
test_cases + unit_test.total_test_case_count(),
|
67
|
+
LessByName<TestCase>());
|
68
|
+
return test_cases;
|
69
|
+
}
|
70
|
+
|
71
|
+
// Returns the test case by its name. The caller doesn't own the returned
|
72
|
+
// pointer.
|
73
|
+
static const TestCase* FindTestCase(const char* name) {
|
74
|
+
UnitTest& unit_test = *UnitTest::GetInstance();
|
75
|
+
for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
|
76
|
+
const TestCase* test_case = unit_test.GetTestCase(i);
|
77
|
+
if (0 == strcmp(test_case->name(), name))
|
78
|
+
return test_case;
|
79
|
+
}
|
80
|
+
return NULL;
|
81
|
+
}
|
82
|
+
|
83
|
+
// Returns the array of pointers to all tests in a particular test case
|
84
|
+
// sorted by the test name. The caller is responsible for deleting the
|
85
|
+
// array.
|
86
|
+
static TestInfo const** GetSortedTests(const TestCase* test_case) {
|
87
|
+
TestInfo const** const tests =
|
88
|
+
new const TestInfo*[test_case->total_test_count()];
|
89
|
+
|
90
|
+
for (int i = 0; i < test_case->total_test_count(); ++i)
|
91
|
+
tests[i] = test_case->GetTestInfo(i);
|
92
|
+
|
93
|
+
std::sort(tests, tests + test_case->total_test_count(),
|
94
|
+
LessByName<TestInfo>());
|
95
|
+
return tests;
|
96
|
+
}
|
97
|
+
};
|
98
|
+
|
99
|
+
#if GTEST_HAS_TYPED_TEST
|
100
|
+
template <typename T> class TestCaseWithCommentTest : public Test {};
|
101
|
+
TYPED_TEST_CASE(TestCaseWithCommentTest, Types<int>);
|
102
|
+
TYPED_TEST(TestCaseWithCommentTest, Dummy) {}
|
103
|
+
|
104
|
+
const int kTypedTestCases = 1;
|
105
|
+
const int kTypedTests = 1;
|
106
|
+
#else
|
107
|
+
const int kTypedTestCases = 0;
|
108
|
+
const int kTypedTests = 0;
|
109
|
+
#endif // GTEST_HAS_TYPED_TEST
|
110
|
+
|
111
|
+
// We can only test the accessors that do not change value while tests run.
|
112
|
+
// Since tests can be run in any order, the values the accessors that track
|
113
|
+
// test execution (such as failed_test_count) can not be predicted.
|
114
|
+
TEST(ApiTest, UnitTestImmutableAccessorsWork) {
|
115
|
+
UnitTest* unit_test = UnitTest::GetInstance();
|
116
|
+
|
117
|
+
ASSERT_EQ(2 + kTypedTestCases, unit_test->total_test_case_count());
|
118
|
+
EXPECT_EQ(1 + kTypedTestCases, unit_test->test_case_to_run_count());
|
119
|
+
EXPECT_EQ(2, unit_test->disabled_test_count());
|
120
|
+
EXPECT_EQ(5 + kTypedTests, unit_test->total_test_count());
|
121
|
+
EXPECT_EQ(3 + kTypedTests, unit_test->test_to_run_count());
|
122
|
+
|
123
|
+
const TestCase** const test_cases = UnitTestHelper::GetSortedTestCases();
|
124
|
+
|
125
|
+
EXPECT_STREQ("ApiTest", test_cases[0]->name());
|
126
|
+
EXPECT_STREQ("DISABLED_Test", test_cases[1]->name());
|
127
|
+
#if GTEST_HAS_TYPED_TEST
|
128
|
+
EXPECT_STREQ("TestCaseWithCommentTest/0", test_cases[2]->name());
|
129
|
+
#endif // GTEST_HAS_TYPED_TEST
|
130
|
+
|
131
|
+
delete[] test_cases;
|
132
|
+
|
133
|
+
// The following lines initiate actions to verify certain methods in
|
134
|
+
// FinalSuccessChecker::TearDown.
|
135
|
+
|
136
|
+
// Records a test property to verify TestResult::GetTestProperty().
|
137
|
+
RecordProperty("key", "value");
|
138
|
+
}
|
139
|
+
|
140
|
+
AssertionResult IsNull(const char* str) {
|
141
|
+
if (str != NULL) {
|
142
|
+
return testing::AssertionFailure() << "argument is " << str;
|
143
|
+
}
|
144
|
+
return AssertionSuccess();
|
145
|
+
}
|
146
|
+
|
147
|
+
TEST(ApiTest, TestCaseImmutableAccessorsWork) {
|
148
|
+
const TestCase* test_case = UnitTestHelper::FindTestCase("ApiTest");
|
149
|
+
ASSERT_TRUE(test_case != NULL);
|
150
|
+
|
151
|
+
EXPECT_STREQ("ApiTest", test_case->name());
|
152
|
+
EXPECT_TRUE(IsNull(test_case->type_param()));
|
153
|
+
EXPECT_TRUE(test_case->should_run());
|
154
|
+
EXPECT_EQ(1, test_case->disabled_test_count());
|
155
|
+
EXPECT_EQ(3, test_case->test_to_run_count());
|
156
|
+
ASSERT_EQ(4, test_case->total_test_count());
|
157
|
+
|
158
|
+
const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case);
|
159
|
+
|
160
|
+
EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name());
|
161
|
+
EXPECT_STREQ("ApiTest", tests[0]->test_case_name());
|
162
|
+
EXPECT_TRUE(IsNull(tests[0]->value_param()));
|
163
|
+
EXPECT_TRUE(IsNull(tests[0]->type_param()));
|
164
|
+
EXPECT_FALSE(tests[0]->should_run());
|
165
|
+
|
166
|
+
EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name());
|
167
|
+
EXPECT_STREQ("ApiTest", tests[1]->test_case_name());
|
168
|
+
EXPECT_TRUE(IsNull(tests[1]->value_param()));
|
169
|
+
EXPECT_TRUE(IsNull(tests[1]->type_param()));
|
170
|
+
EXPECT_TRUE(tests[1]->should_run());
|
171
|
+
|
172
|
+
EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name());
|
173
|
+
EXPECT_STREQ("ApiTest", tests[2]->test_case_name());
|
174
|
+
EXPECT_TRUE(IsNull(tests[2]->value_param()));
|
175
|
+
EXPECT_TRUE(IsNull(tests[2]->type_param()));
|
176
|
+
EXPECT_TRUE(tests[2]->should_run());
|
177
|
+
|
178
|
+
EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name());
|
179
|
+
EXPECT_STREQ("ApiTest", tests[3]->test_case_name());
|
180
|
+
EXPECT_TRUE(IsNull(tests[3]->value_param()));
|
181
|
+
EXPECT_TRUE(IsNull(tests[3]->type_param()));
|
182
|
+
EXPECT_TRUE(tests[3]->should_run());
|
183
|
+
|
184
|
+
delete[] tests;
|
185
|
+
tests = NULL;
|
186
|
+
|
187
|
+
#if GTEST_HAS_TYPED_TEST
|
188
|
+
test_case = UnitTestHelper::FindTestCase("TestCaseWithCommentTest/0");
|
189
|
+
ASSERT_TRUE(test_case != NULL);
|
190
|
+
|
191
|
+
EXPECT_STREQ("TestCaseWithCommentTest/0", test_case->name());
|
192
|
+
EXPECT_STREQ(GetTypeName<int>().c_str(), test_case->type_param());
|
193
|
+
EXPECT_TRUE(test_case->should_run());
|
194
|
+
EXPECT_EQ(0, test_case->disabled_test_count());
|
195
|
+
EXPECT_EQ(1, test_case->test_to_run_count());
|
196
|
+
ASSERT_EQ(1, test_case->total_test_count());
|
197
|
+
|
198
|
+
tests = UnitTestHelper::GetSortedTests(test_case);
|
199
|
+
|
200
|
+
EXPECT_STREQ("Dummy", tests[0]->name());
|
201
|
+
EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name());
|
202
|
+
EXPECT_TRUE(IsNull(tests[0]->value_param()));
|
203
|
+
EXPECT_STREQ(GetTypeName<int>().c_str(), tests[0]->type_param());
|
204
|
+
EXPECT_TRUE(tests[0]->should_run());
|
205
|
+
|
206
|
+
delete[] tests;
|
207
|
+
#endif // GTEST_HAS_TYPED_TEST
|
208
|
+
}
|
209
|
+
|
210
|
+
TEST(ApiTest, TestCaseDisabledAccessorsWork) {
|
211
|
+
const TestCase* test_case = UnitTestHelper::FindTestCase("DISABLED_Test");
|
212
|
+
ASSERT_TRUE(test_case != NULL);
|
213
|
+
|
214
|
+
EXPECT_STREQ("DISABLED_Test", test_case->name());
|
215
|
+
EXPECT_TRUE(IsNull(test_case->type_param()));
|
216
|
+
EXPECT_FALSE(test_case->should_run());
|
217
|
+
EXPECT_EQ(1, test_case->disabled_test_count());
|
218
|
+
EXPECT_EQ(0, test_case->test_to_run_count());
|
219
|
+
ASSERT_EQ(1, test_case->total_test_count());
|
220
|
+
|
221
|
+
const TestInfo* const test_info = test_case->GetTestInfo(0);
|
222
|
+
EXPECT_STREQ("Dummy2", test_info->name());
|
223
|
+
EXPECT_STREQ("DISABLED_Test", test_info->test_case_name());
|
224
|
+
EXPECT_TRUE(IsNull(test_info->value_param()));
|
225
|
+
EXPECT_TRUE(IsNull(test_info->type_param()));
|
226
|
+
EXPECT_FALSE(test_info->should_run());
|
227
|
+
}
|
228
|
+
|
229
|
+
// These two tests are here to provide support for testing
|
230
|
+
// test_case_to_run_count, disabled_test_count, and test_to_run_count.
|
231
|
+
TEST(ApiTest, DISABLED_Dummy1) {}
|
232
|
+
TEST(DISABLED_Test, Dummy2) {}
|
233
|
+
|
234
|
+
class FinalSuccessChecker : public Environment {
|
235
|
+
protected:
|
236
|
+
virtual void TearDown() {
|
237
|
+
UnitTest* unit_test = UnitTest::GetInstance();
|
238
|
+
|
239
|
+
EXPECT_EQ(1 + kTypedTestCases, unit_test->successful_test_case_count());
|
240
|
+
EXPECT_EQ(3 + kTypedTests, unit_test->successful_test_count());
|
241
|
+
EXPECT_EQ(0, unit_test->failed_test_case_count());
|
242
|
+
EXPECT_EQ(0, unit_test->failed_test_count());
|
243
|
+
EXPECT_TRUE(unit_test->Passed());
|
244
|
+
EXPECT_FALSE(unit_test->Failed());
|
245
|
+
ASSERT_EQ(2 + kTypedTestCases, unit_test->total_test_case_count());
|
246
|
+
|
247
|
+
const TestCase** const test_cases = UnitTestHelper::GetSortedTestCases();
|
248
|
+
|
249
|
+
EXPECT_STREQ("ApiTest", test_cases[0]->name());
|
250
|
+
EXPECT_TRUE(IsNull(test_cases[0]->type_param()));
|
251
|
+
EXPECT_TRUE(test_cases[0]->should_run());
|
252
|
+
EXPECT_EQ(1, test_cases[0]->disabled_test_count());
|
253
|
+
ASSERT_EQ(4, test_cases[0]->total_test_count());
|
254
|
+
EXPECT_EQ(3, test_cases[0]->successful_test_count());
|
255
|
+
EXPECT_EQ(0, test_cases[0]->failed_test_count());
|
256
|
+
EXPECT_TRUE(test_cases[0]->Passed());
|
257
|
+
EXPECT_FALSE(test_cases[0]->Failed());
|
258
|
+
|
259
|
+
EXPECT_STREQ("DISABLED_Test", test_cases[1]->name());
|
260
|
+
EXPECT_TRUE(IsNull(test_cases[1]->type_param()));
|
261
|
+
EXPECT_FALSE(test_cases[1]->should_run());
|
262
|
+
EXPECT_EQ(1, test_cases[1]->disabled_test_count());
|
263
|
+
ASSERT_EQ(1, test_cases[1]->total_test_count());
|
264
|
+
EXPECT_EQ(0, test_cases[1]->successful_test_count());
|
265
|
+
EXPECT_EQ(0, test_cases[1]->failed_test_count());
|
266
|
+
|
267
|
+
#if GTEST_HAS_TYPED_TEST
|
268
|
+
EXPECT_STREQ("TestCaseWithCommentTest/0", test_cases[2]->name());
|
269
|
+
EXPECT_STREQ(GetTypeName<int>().c_str(), test_cases[2]->type_param());
|
270
|
+
EXPECT_TRUE(test_cases[2]->should_run());
|
271
|
+
EXPECT_EQ(0, test_cases[2]->disabled_test_count());
|
272
|
+
ASSERT_EQ(1, test_cases[2]->total_test_count());
|
273
|
+
EXPECT_EQ(1, test_cases[2]->successful_test_count());
|
274
|
+
EXPECT_EQ(0, test_cases[2]->failed_test_count());
|
275
|
+
EXPECT_TRUE(test_cases[2]->Passed());
|
276
|
+
EXPECT_FALSE(test_cases[2]->Failed());
|
277
|
+
#endif // GTEST_HAS_TYPED_TEST
|
278
|
+
|
279
|
+
const TestCase* test_case = UnitTestHelper::FindTestCase("ApiTest");
|
280
|
+
const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case);
|
281
|
+
EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name());
|
282
|
+
EXPECT_STREQ("ApiTest", tests[0]->test_case_name());
|
283
|
+
EXPECT_FALSE(tests[0]->should_run());
|
284
|
+
|
285
|
+
EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name());
|
286
|
+
EXPECT_STREQ("ApiTest", tests[1]->test_case_name());
|
287
|
+
EXPECT_TRUE(IsNull(tests[1]->value_param()));
|
288
|
+
EXPECT_TRUE(IsNull(tests[1]->type_param()));
|
289
|
+
EXPECT_TRUE(tests[1]->should_run());
|
290
|
+
EXPECT_TRUE(tests[1]->result()->Passed());
|
291
|
+
EXPECT_EQ(0, tests[1]->result()->test_property_count());
|
292
|
+
|
293
|
+
EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name());
|
294
|
+
EXPECT_STREQ("ApiTest", tests[2]->test_case_name());
|
295
|
+
EXPECT_TRUE(IsNull(tests[2]->value_param()));
|
296
|
+
EXPECT_TRUE(IsNull(tests[2]->type_param()));
|
297
|
+
EXPECT_TRUE(tests[2]->should_run());
|
298
|
+
EXPECT_TRUE(tests[2]->result()->Passed());
|
299
|
+
EXPECT_EQ(0, tests[2]->result()->test_property_count());
|
300
|
+
|
301
|
+
EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name());
|
302
|
+
EXPECT_STREQ("ApiTest", tests[3]->test_case_name());
|
303
|
+
EXPECT_TRUE(IsNull(tests[3]->value_param()));
|
304
|
+
EXPECT_TRUE(IsNull(tests[3]->type_param()));
|
305
|
+
EXPECT_TRUE(tests[3]->should_run());
|
306
|
+
EXPECT_TRUE(tests[3]->result()->Passed());
|
307
|
+
EXPECT_EQ(1, tests[3]->result()->test_property_count());
|
308
|
+
const TestProperty& property = tests[3]->result()->GetTestProperty(0);
|
309
|
+
EXPECT_STREQ("key", property.key());
|
310
|
+
EXPECT_STREQ("value", property.value());
|
311
|
+
|
312
|
+
delete[] tests;
|
313
|
+
|
314
|
+
#if GTEST_HAS_TYPED_TEST
|
315
|
+
test_case = UnitTestHelper::FindTestCase("TestCaseWithCommentTest/0");
|
316
|
+
tests = UnitTestHelper::GetSortedTests(test_case);
|
317
|
+
|
318
|
+
EXPECT_STREQ("Dummy", tests[0]->name());
|
319
|
+
EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name());
|
320
|
+
EXPECT_TRUE(IsNull(tests[0]->value_param()));
|
321
|
+
EXPECT_STREQ(GetTypeName<int>().c_str(), tests[0]->type_param());
|
322
|
+
EXPECT_TRUE(tests[0]->should_run());
|
323
|
+
EXPECT_TRUE(tests[0]->result()->Passed());
|
324
|
+
EXPECT_EQ(0, tests[0]->result()->test_property_count());
|
325
|
+
|
326
|
+
delete[] tests;
|
327
|
+
#endif // GTEST_HAS_TYPED_TEST
|
328
|
+
delete[] test_cases;
|
329
|
+
}
|
330
|
+
};
|
331
|
+
|
332
|
+
} // namespace internal
|
333
|
+
} // namespace testing
|
334
|
+
|
335
|
+
int main(int argc, char **argv) {
|
336
|
+
InitGoogleTest(&argc, argv);
|
337
|
+
|
338
|
+
AddGlobalTestEnvironment(new testing::internal::FinalSuccessChecker());
|
339
|
+
|
340
|
+
return RUN_ALL_TESTS();
|
341
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
// Copyright 2009, 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
|
+
// Tests for Google C++ Testing Framework (Google Test)
|
33
|
+
//
|
34
|
+
// Sometimes it's desirable to build most of Google Test's own tests
|
35
|
+
// by compiling a single file. This file serves this purpose.
|
36
|
+
#include "test/gtest-filepath_test.cc"
|
37
|
+
#include "test/gtest-linked_ptr_test.cc"
|
38
|
+
#include "test/gtest-message_test.cc"
|
39
|
+
#include "test/gtest-options_test.cc"
|
40
|
+
#include "test/gtest-port_test.cc"
|
41
|
+
#include "test/gtest_pred_impl_unittest.cc"
|
42
|
+
#include "test/gtest_prod_test.cc"
|
43
|
+
#include "test/gtest-test-part_test.cc"
|
44
|
+
#include "test/gtest-typed-test_test.cc"
|
45
|
+
#include "test/gtest-typed-test2_test.cc"
|
46
|
+
#include "test/gtest_unittest.cc"
|
47
|
+
#include "test/production.cc"
|
data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py
ADDED
@@ -0,0 +1,212 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
#
|
3
|
+
# Copyright 2006, 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
|
+
"""Unit test for Google Test's break-on-failure mode.
|
33
|
+
|
34
|
+
A user can ask Google Test to seg-fault when an assertion fails, using
|
35
|
+
either the GTEST_BREAK_ON_FAILURE environment variable or the
|
36
|
+
--gtest_break_on_failure flag. This script tests such functionality
|
37
|
+
by invoking gtest_break_on_failure_unittest_ (a program written with
|
38
|
+
Google Test) with different environments and command line flags.
|
39
|
+
"""
|
40
|
+
|
41
|
+
__author__ = 'wan@google.com (Zhanyong Wan)'
|
42
|
+
|
43
|
+
import gtest_test_utils
|
44
|
+
import os
|
45
|
+
import sys
|
46
|
+
|
47
|
+
|
48
|
+
# Constants.
|
49
|
+
|
50
|
+
IS_WINDOWS = os.name == 'nt'
|
51
|
+
|
52
|
+
# The environment variable for enabling/disabling the break-on-failure mode.
|
53
|
+
BREAK_ON_FAILURE_ENV_VAR = 'GTEST_BREAK_ON_FAILURE'
|
54
|
+
|
55
|
+
# The command line flag for enabling/disabling the break-on-failure mode.
|
56
|
+
BREAK_ON_FAILURE_FLAG = 'gtest_break_on_failure'
|
57
|
+
|
58
|
+
# The environment variable for enabling/disabling the throw-on-failure mode.
|
59
|
+
THROW_ON_FAILURE_ENV_VAR = 'GTEST_THROW_ON_FAILURE'
|
60
|
+
|
61
|
+
# The environment variable for enabling/disabling the catch-exceptions mode.
|
62
|
+
CATCH_EXCEPTIONS_ENV_VAR = 'GTEST_CATCH_EXCEPTIONS'
|
63
|
+
|
64
|
+
# Path to the gtest_break_on_failure_unittest_ program.
|
65
|
+
EXE_PATH = gtest_test_utils.GetTestExecutablePath(
|
66
|
+
'gtest_break_on_failure_unittest_')
|
67
|
+
|
68
|
+
|
69
|
+
environ = gtest_test_utils.environ
|
70
|
+
SetEnvVar = gtest_test_utils.SetEnvVar
|
71
|
+
|
72
|
+
# Tests in this file run a Google-Test-based test program and expect it
|
73
|
+
# to terminate prematurely. Therefore they are incompatible with
|
74
|
+
# the premature-exit-file protocol by design. Unset the
|
75
|
+
# premature-exit filepath to prevent Google Test from creating
|
76
|
+
# the file.
|
77
|
+
SetEnvVar(gtest_test_utils.PREMATURE_EXIT_FILE_ENV_VAR, None)
|
78
|
+
|
79
|
+
|
80
|
+
def Run(command):
|
81
|
+
"""Runs a command; returns 1 if it was killed by a signal, or 0 otherwise."""
|
82
|
+
|
83
|
+
p = gtest_test_utils.Subprocess(command, env=environ)
|
84
|
+
if p.terminated_by_signal:
|
85
|
+
return 1
|
86
|
+
else:
|
87
|
+
return 0
|
88
|
+
|
89
|
+
|
90
|
+
# The tests.
|
91
|
+
|
92
|
+
|
93
|
+
class GTestBreakOnFailureUnitTest(gtest_test_utils.TestCase):
|
94
|
+
"""Tests using the GTEST_BREAK_ON_FAILURE environment variable or
|
95
|
+
the --gtest_break_on_failure flag to turn assertion failures into
|
96
|
+
segmentation faults.
|
97
|
+
"""
|
98
|
+
|
99
|
+
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault):
|
100
|
+
"""Runs gtest_break_on_failure_unittest_ and verifies that it does
|
101
|
+
(or does not) have a seg-fault.
|
102
|
+
|
103
|
+
Args:
|
104
|
+
env_var_value: value of the GTEST_BREAK_ON_FAILURE environment
|
105
|
+
variable; None if the variable should be unset.
|
106
|
+
flag_value: value of the --gtest_break_on_failure flag;
|
107
|
+
None if the flag should not be present.
|
108
|
+
expect_seg_fault: 1 if the program is expected to generate a seg-fault;
|
109
|
+
0 otherwise.
|
110
|
+
"""
|
111
|
+
|
112
|
+
SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, env_var_value)
|
113
|
+
|
114
|
+
if env_var_value is None:
|
115
|
+
env_var_value_msg = ' is not set'
|
116
|
+
else:
|
117
|
+
env_var_value_msg = '=' + env_var_value
|
118
|
+
|
119
|
+
if flag_value is None:
|
120
|
+
flag = ''
|
121
|
+
elif flag_value == '0':
|
122
|
+
flag = '--%s=0' % BREAK_ON_FAILURE_FLAG
|
123
|
+
else:
|
124
|
+
flag = '--%s' % BREAK_ON_FAILURE_FLAG
|
125
|
+
|
126
|
+
command = [EXE_PATH]
|
127
|
+
if flag:
|
128
|
+
command.append(flag)
|
129
|
+
|
130
|
+
if expect_seg_fault:
|
131
|
+
should_or_not = 'should'
|
132
|
+
else:
|
133
|
+
should_or_not = 'should not'
|
134
|
+
|
135
|
+
has_seg_fault = Run(command)
|
136
|
+
|
137
|
+
SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, None)
|
138
|
+
|
139
|
+
msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' %
|
140
|
+
(BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command),
|
141
|
+
should_or_not))
|
142
|
+
self.assert_(has_seg_fault == expect_seg_fault, msg)
|
143
|
+
|
144
|
+
def testDefaultBehavior(self):
|
145
|
+
"""Tests the behavior of the default mode."""
|
146
|
+
|
147
|
+
self.RunAndVerify(env_var_value=None,
|
148
|
+
flag_value=None,
|
149
|
+
expect_seg_fault=0)
|
150
|
+
|
151
|
+
def testEnvVar(self):
|
152
|
+
"""Tests using the GTEST_BREAK_ON_FAILURE environment variable."""
|
153
|
+
|
154
|
+
self.RunAndVerify(env_var_value='0',
|
155
|
+
flag_value=None,
|
156
|
+
expect_seg_fault=0)
|
157
|
+
self.RunAndVerify(env_var_value='1',
|
158
|
+
flag_value=None,
|
159
|
+
expect_seg_fault=1)
|
160
|
+
|
161
|
+
def testFlag(self):
|
162
|
+
"""Tests using the --gtest_break_on_failure flag."""
|
163
|
+
|
164
|
+
self.RunAndVerify(env_var_value=None,
|
165
|
+
flag_value='0',
|
166
|
+
expect_seg_fault=0)
|
167
|
+
self.RunAndVerify(env_var_value=None,
|
168
|
+
flag_value='1',
|
169
|
+
expect_seg_fault=1)
|
170
|
+
|
171
|
+
def testFlagOverridesEnvVar(self):
|
172
|
+
"""Tests that the flag overrides the environment variable."""
|
173
|
+
|
174
|
+
self.RunAndVerify(env_var_value='0',
|
175
|
+
flag_value='0',
|
176
|
+
expect_seg_fault=0)
|
177
|
+
self.RunAndVerify(env_var_value='0',
|
178
|
+
flag_value='1',
|
179
|
+
expect_seg_fault=1)
|
180
|
+
self.RunAndVerify(env_var_value='1',
|
181
|
+
flag_value='0',
|
182
|
+
expect_seg_fault=0)
|
183
|
+
self.RunAndVerify(env_var_value='1',
|
184
|
+
flag_value='1',
|
185
|
+
expect_seg_fault=1)
|
186
|
+
|
187
|
+
def testBreakOnFailureOverridesThrowOnFailure(self):
|
188
|
+
"""Tests that gtest_break_on_failure overrides gtest_throw_on_failure."""
|
189
|
+
|
190
|
+
SetEnvVar(THROW_ON_FAILURE_ENV_VAR, '1')
|
191
|
+
try:
|
192
|
+
self.RunAndVerify(env_var_value=None,
|
193
|
+
flag_value='1',
|
194
|
+
expect_seg_fault=1)
|
195
|
+
finally:
|
196
|
+
SetEnvVar(THROW_ON_FAILURE_ENV_VAR, None)
|
197
|
+
|
198
|
+
if IS_WINDOWS:
|
199
|
+
def testCatchExceptionsDoesNotInterfere(self):
|
200
|
+
"""Tests that gtest_catch_exceptions doesn't interfere."""
|
201
|
+
|
202
|
+
SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, '1')
|
203
|
+
try:
|
204
|
+
self.RunAndVerify(env_var_value='1',
|
205
|
+
flag_value='1',
|
206
|
+
expect_seg_fault=1)
|
207
|
+
finally:
|
208
|
+
SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, None)
|
209
|
+
|
210
|
+
|
211
|
+
if __name__ == '__main__':
|
212
|
+
gtest_test_utils.Main()
|