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,154 @@
|
|
1
|
+
// Copyright 2003, 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
|
+
// Authors: Dan Egnor (egnor@google.com)
|
31
|
+
// Ported to Windows: Vadim Berman (vadimb@google.com)
|
32
|
+
|
33
|
+
#include "gtest/internal/gtest-linked_ptr.h"
|
34
|
+
|
35
|
+
#include <stdlib.h>
|
36
|
+
#include "gtest/gtest.h"
|
37
|
+
|
38
|
+
namespace {
|
39
|
+
|
40
|
+
using testing::Message;
|
41
|
+
using testing::internal::linked_ptr;
|
42
|
+
|
43
|
+
int num;
|
44
|
+
Message* history = NULL;
|
45
|
+
|
46
|
+
// Class which tracks allocation/deallocation
|
47
|
+
class A {
|
48
|
+
public:
|
49
|
+
A(): mynum(num++) { *history << "A" << mynum << " ctor\n"; }
|
50
|
+
virtual ~A() { *history << "A" << mynum << " dtor\n"; }
|
51
|
+
virtual void Use() { *history << "A" << mynum << " use\n"; }
|
52
|
+
protected:
|
53
|
+
int mynum;
|
54
|
+
};
|
55
|
+
|
56
|
+
// Subclass
|
57
|
+
class B : public A {
|
58
|
+
public:
|
59
|
+
B() { *history << "B" << mynum << " ctor\n"; }
|
60
|
+
~B() { *history << "B" << mynum << " dtor\n"; }
|
61
|
+
virtual void Use() { *history << "B" << mynum << " use\n"; }
|
62
|
+
};
|
63
|
+
|
64
|
+
class LinkedPtrTest : public testing::Test {
|
65
|
+
public:
|
66
|
+
LinkedPtrTest() {
|
67
|
+
num = 0;
|
68
|
+
history = new Message;
|
69
|
+
}
|
70
|
+
|
71
|
+
virtual ~LinkedPtrTest() {
|
72
|
+
delete history;
|
73
|
+
history = NULL;
|
74
|
+
}
|
75
|
+
};
|
76
|
+
|
77
|
+
TEST_F(LinkedPtrTest, GeneralTest) {
|
78
|
+
{
|
79
|
+
linked_ptr<A> a0, a1, a2;
|
80
|
+
// Use explicit function call notation here to suppress self-assign warning.
|
81
|
+
a0.operator=(a0);
|
82
|
+
a1 = a2;
|
83
|
+
ASSERT_EQ(a0.get(), static_cast<A*>(NULL));
|
84
|
+
ASSERT_EQ(a1.get(), static_cast<A*>(NULL));
|
85
|
+
ASSERT_EQ(a2.get(), static_cast<A*>(NULL));
|
86
|
+
ASSERT_TRUE(a0 == NULL);
|
87
|
+
ASSERT_TRUE(a1 == NULL);
|
88
|
+
ASSERT_TRUE(a2 == NULL);
|
89
|
+
|
90
|
+
{
|
91
|
+
linked_ptr<A> a3(new A);
|
92
|
+
a0 = a3;
|
93
|
+
ASSERT_TRUE(a0 == a3);
|
94
|
+
ASSERT_TRUE(a0 != NULL);
|
95
|
+
ASSERT_TRUE(a0.get() == a3);
|
96
|
+
ASSERT_TRUE(a0 == a3.get());
|
97
|
+
linked_ptr<A> a4(a0);
|
98
|
+
a1 = a4;
|
99
|
+
linked_ptr<A> a5(new A);
|
100
|
+
ASSERT_TRUE(a5.get() != a3);
|
101
|
+
ASSERT_TRUE(a5 != a3.get());
|
102
|
+
a2 = a5;
|
103
|
+
linked_ptr<B> b0(new B);
|
104
|
+
linked_ptr<A> a6(b0);
|
105
|
+
ASSERT_TRUE(b0 == a6);
|
106
|
+
ASSERT_TRUE(a6 == b0);
|
107
|
+
ASSERT_TRUE(b0 != NULL);
|
108
|
+
a5 = b0;
|
109
|
+
a5 = b0;
|
110
|
+
a3->Use();
|
111
|
+
a4->Use();
|
112
|
+
a5->Use();
|
113
|
+
a6->Use();
|
114
|
+
b0->Use();
|
115
|
+
(*b0).Use();
|
116
|
+
b0.get()->Use();
|
117
|
+
}
|
118
|
+
|
119
|
+
a0->Use();
|
120
|
+
a1->Use();
|
121
|
+
a2->Use();
|
122
|
+
|
123
|
+
a1 = a2;
|
124
|
+
a2.reset(new A);
|
125
|
+
a0.reset();
|
126
|
+
|
127
|
+
linked_ptr<A> a7;
|
128
|
+
}
|
129
|
+
|
130
|
+
ASSERT_STREQ(
|
131
|
+
"A0 ctor\n"
|
132
|
+
"A1 ctor\n"
|
133
|
+
"A2 ctor\n"
|
134
|
+
"B2 ctor\n"
|
135
|
+
"A0 use\n"
|
136
|
+
"A0 use\n"
|
137
|
+
"B2 use\n"
|
138
|
+
"B2 use\n"
|
139
|
+
"B2 use\n"
|
140
|
+
"B2 use\n"
|
141
|
+
"B2 use\n"
|
142
|
+
"B2 dtor\n"
|
143
|
+
"A2 dtor\n"
|
144
|
+
"A0 use\n"
|
145
|
+
"A0 use\n"
|
146
|
+
"A1 use\n"
|
147
|
+
"A3 ctor\n"
|
148
|
+
"A0 dtor\n"
|
149
|
+
"A3 dtor\n"
|
150
|
+
"A1 dtor\n",
|
151
|
+
history->GetString().c_str());
|
152
|
+
}
|
153
|
+
|
154
|
+
} // Unnamed namespace
|
@@ -0,0 +1,311 @@
|
|
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 verifies Google Test event listeners receive events at the
|
34
|
+
// right times.
|
35
|
+
|
36
|
+
#include "gtest/gtest.h"
|
37
|
+
#include <vector>
|
38
|
+
|
39
|
+
using ::testing::AddGlobalTestEnvironment;
|
40
|
+
using ::testing::Environment;
|
41
|
+
using ::testing::InitGoogleTest;
|
42
|
+
using ::testing::Test;
|
43
|
+
using ::testing::TestCase;
|
44
|
+
using ::testing::TestEventListener;
|
45
|
+
using ::testing::TestInfo;
|
46
|
+
using ::testing::TestPartResult;
|
47
|
+
using ::testing::UnitTest;
|
48
|
+
|
49
|
+
// Used by tests to register their events.
|
50
|
+
std::vector<std::string>* g_events = NULL;
|
51
|
+
|
52
|
+
namespace testing {
|
53
|
+
namespace internal {
|
54
|
+
|
55
|
+
class EventRecordingListener : public TestEventListener {
|
56
|
+
public:
|
57
|
+
explicit EventRecordingListener(const char* name) : name_(name) {}
|
58
|
+
|
59
|
+
protected:
|
60
|
+
virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {
|
61
|
+
g_events->push_back(GetFullMethodName("OnTestProgramStart"));
|
62
|
+
}
|
63
|
+
|
64
|
+
virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,
|
65
|
+
int iteration) {
|
66
|
+
Message message;
|
67
|
+
message << GetFullMethodName("OnTestIterationStart")
|
68
|
+
<< "(" << iteration << ")";
|
69
|
+
g_events->push_back(message.GetString());
|
70
|
+
}
|
71
|
+
|
72
|
+
virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {
|
73
|
+
g_events->push_back(GetFullMethodName("OnEnvironmentsSetUpStart"));
|
74
|
+
}
|
75
|
+
|
76
|
+
virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {
|
77
|
+
g_events->push_back(GetFullMethodName("OnEnvironmentsSetUpEnd"));
|
78
|
+
}
|
79
|
+
|
80
|
+
virtual void OnTestCaseStart(const TestCase& /*test_case*/) {
|
81
|
+
g_events->push_back(GetFullMethodName("OnTestCaseStart"));
|
82
|
+
}
|
83
|
+
|
84
|
+
virtual void OnTestStart(const TestInfo& /*test_info*/) {
|
85
|
+
g_events->push_back(GetFullMethodName("OnTestStart"));
|
86
|
+
}
|
87
|
+
|
88
|
+
virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {
|
89
|
+
g_events->push_back(GetFullMethodName("OnTestPartResult"));
|
90
|
+
}
|
91
|
+
|
92
|
+
virtual void OnTestEnd(const TestInfo& /*test_info*/) {
|
93
|
+
g_events->push_back(GetFullMethodName("OnTestEnd"));
|
94
|
+
}
|
95
|
+
|
96
|
+
virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {
|
97
|
+
g_events->push_back(GetFullMethodName("OnTestCaseEnd"));
|
98
|
+
}
|
99
|
+
|
100
|
+
virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {
|
101
|
+
g_events->push_back(GetFullMethodName("OnEnvironmentsTearDownStart"));
|
102
|
+
}
|
103
|
+
|
104
|
+
virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {
|
105
|
+
g_events->push_back(GetFullMethodName("OnEnvironmentsTearDownEnd"));
|
106
|
+
}
|
107
|
+
|
108
|
+
virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/,
|
109
|
+
int iteration) {
|
110
|
+
Message message;
|
111
|
+
message << GetFullMethodName("OnTestIterationEnd")
|
112
|
+
<< "(" << iteration << ")";
|
113
|
+
g_events->push_back(message.GetString());
|
114
|
+
}
|
115
|
+
|
116
|
+
virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {
|
117
|
+
g_events->push_back(GetFullMethodName("OnTestProgramEnd"));
|
118
|
+
}
|
119
|
+
|
120
|
+
private:
|
121
|
+
std::string GetFullMethodName(const char* name) {
|
122
|
+
return name_ + "." + name;
|
123
|
+
}
|
124
|
+
|
125
|
+
std::string name_;
|
126
|
+
};
|
127
|
+
|
128
|
+
class EnvironmentInvocationCatcher : public Environment {
|
129
|
+
protected:
|
130
|
+
virtual void SetUp() {
|
131
|
+
g_events->push_back("Environment::SetUp");
|
132
|
+
}
|
133
|
+
|
134
|
+
virtual void TearDown() {
|
135
|
+
g_events->push_back("Environment::TearDown");
|
136
|
+
}
|
137
|
+
};
|
138
|
+
|
139
|
+
class ListenerTest : public Test {
|
140
|
+
protected:
|
141
|
+
static void SetUpTestCase() {
|
142
|
+
g_events->push_back("ListenerTest::SetUpTestCase");
|
143
|
+
}
|
144
|
+
|
145
|
+
static void TearDownTestCase() {
|
146
|
+
g_events->push_back("ListenerTest::TearDownTestCase");
|
147
|
+
}
|
148
|
+
|
149
|
+
virtual void SetUp() {
|
150
|
+
g_events->push_back("ListenerTest::SetUp");
|
151
|
+
}
|
152
|
+
|
153
|
+
virtual void TearDown() {
|
154
|
+
g_events->push_back("ListenerTest::TearDown");
|
155
|
+
}
|
156
|
+
};
|
157
|
+
|
158
|
+
TEST_F(ListenerTest, DoesFoo) {
|
159
|
+
// Test execution order within a test case is not guaranteed so we are not
|
160
|
+
// recording the test name.
|
161
|
+
g_events->push_back("ListenerTest::* Test Body");
|
162
|
+
SUCCEED(); // Triggers OnTestPartResult.
|
163
|
+
}
|
164
|
+
|
165
|
+
TEST_F(ListenerTest, DoesBar) {
|
166
|
+
g_events->push_back("ListenerTest::* Test Body");
|
167
|
+
SUCCEED(); // Triggers OnTestPartResult.
|
168
|
+
}
|
169
|
+
|
170
|
+
} // namespace internal
|
171
|
+
|
172
|
+
} // namespace testing
|
173
|
+
|
174
|
+
using ::testing::internal::EnvironmentInvocationCatcher;
|
175
|
+
using ::testing::internal::EventRecordingListener;
|
176
|
+
|
177
|
+
void VerifyResults(const std::vector<std::string>& data,
|
178
|
+
const char* const* expected_data,
|
179
|
+
size_t expected_data_size) {
|
180
|
+
const size_t actual_size = data.size();
|
181
|
+
// If the following assertion fails, a new entry will be appended to
|
182
|
+
// data. Hence we save data.size() first.
|
183
|
+
EXPECT_EQ(expected_data_size, actual_size);
|
184
|
+
|
185
|
+
// Compares the common prefix.
|
186
|
+
const size_t shorter_size = expected_data_size <= actual_size ?
|
187
|
+
expected_data_size : actual_size;
|
188
|
+
size_t i = 0;
|
189
|
+
for (; i < shorter_size; ++i) {
|
190
|
+
ASSERT_STREQ(expected_data[i], data[i].c_str())
|
191
|
+
<< "at position " << i;
|
192
|
+
}
|
193
|
+
|
194
|
+
// Prints extra elements in the actual data.
|
195
|
+
for (; i < actual_size; ++i) {
|
196
|
+
printf(" Actual event #%lu: %s\n",
|
197
|
+
static_cast<unsigned long>(i), data[i].c_str());
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
int main(int argc, char **argv) {
|
202
|
+
std::vector<std::string> events;
|
203
|
+
g_events = &events;
|
204
|
+
InitGoogleTest(&argc, argv);
|
205
|
+
|
206
|
+
UnitTest::GetInstance()->listeners().Append(
|
207
|
+
new EventRecordingListener("1st"));
|
208
|
+
UnitTest::GetInstance()->listeners().Append(
|
209
|
+
new EventRecordingListener("2nd"));
|
210
|
+
|
211
|
+
AddGlobalTestEnvironment(new EnvironmentInvocationCatcher);
|
212
|
+
|
213
|
+
GTEST_CHECK_(events.size() == 0)
|
214
|
+
<< "AddGlobalTestEnvironment should not generate any events itself.";
|
215
|
+
|
216
|
+
::testing::GTEST_FLAG(repeat) = 2;
|
217
|
+
int ret_val = RUN_ALL_TESTS();
|
218
|
+
|
219
|
+
const char* const expected_events[] = {
|
220
|
+
"1st.OnTestProgramStart",
|
221
|
+
"2nd.OnTestProgramStart",
|
222
|
+
"1st.OnTestIterationStart(0)",
|
223
|
+
"2nd.OnTestIterationStart(0)",
|
224
|
+
"1st.OnEnvironmentsSetUpStart",
|
225
|
+
"2nd.OnEnvironmentsSetUpStart",
|
226
|
+
"Environment::SetUp",
|
227
|
+
"2nd.OnEnvironmentsSetUpEnd",
|
228
|
+
"1st.OnEnvironmentsSetUpEnd",
|
229
|
+
"1st.OnTestCaseStart",
|
230
|
+
"2nd.OnTestCaseStart",
|
231
|
+
"ListenerTest::SetUpTestCase",
|
232
|
+
"1st.OnTestStart",
|
233
|
+
"2nd.OnTestStart",
|
234
|
+
"ListenerTest::SetUp",
|
235
|
+
"ListenerTest::* Test Body",
|
236
|
+
"1st.OnTestPartResult",
|
237
|
+
"2nd.OnTestPartResult",
|
238
|
+
"ListenerTest::TearDown",
|
239
|
+
"2nd.OnTestEnd",
|
240
|
+
"1st.OnTestEnd",
|
241
|
+
"1st.OnTestStart",
|
242
|
+
"2nd.OnTestStart",
|
243
|
+
"ListenerTest::SetUp",
|
244
|
+
"ListenerTest::* Test Body",
|
245
|
+
"1st.OnTestPartResult",
|
246
|
+
"2nd.OnTestPartResult",
|
247
|
+
"ListenerTest::TearDown",
|
248
|
+
"2nd.OnTestEnd",
|
249
|
+
"1st.OnTestEnd",
|
250
|
+
"ListenerTest::TearDownTestCase",
|
251
|
+
"2nd.OnTestCaseEnd",
|
252
|
+
"1st.OnTestCaseEnd",
|
253
|
+
"1st.OnEnvironmentsTearDownStart",
|
254
|
+
"2nd.OnEnvironmentsTearDownStart",
|
255
|
+
"Environment::TearDown",
|
256
|
+
"2nd.OnEnvironmentsTearDownEnd",
|
257
|
+
"1st.OnEnvironmentsTearDownEnd",
|
258
|
+
"2nd.OnTestIterationEnd(0)",
|
259
|
+
"1st.OnTestIterationEnd(0)",
|
260
|
+
"1st.OnTestIterationStart(1)",
|
261
|
+
"2nd.OnTestIterationStart(1)",
|
262
|
+
"1st.OnEnvironmentsSetUpStart",
|
263
|
+
"2nd.OnEnvironmentsSetUpStart",
|
264
|
+
"Environment::SetUp",
|
265
|
+
"2nd.OnEnvironmentsSetUpEnd",
|
266
|
+
"1st.OnEnvironmentsSetUpEnd",
|
267
|
+
"1st.OnTestCaseStart",
|
268
|
+
"2nd.OnTestCaseStart",
|
269
|
+
"ListenerTest::SetUpTestCase",
|
270
|
+
"1st.OnTestStart",
|
271
|
+
"2nd.OnTestStart",
|
272
|
+
"ListenerTest::SetUp",
|
273
|
+
"ListenerTest::* Test Body",
|
274
|
+
"1st.OnTestPartResult",
|
275
|
+
"2nd.OnTestPartResult",
|
276
|
+
"ListenerTest::TearDown",
|
277
|
+
"2nd.OnTestEnd",
|
278
|
+
"1st.OnTestEnd",
|
279
|
+
"1st.OnTestStart",
|
280
|
+
"2nd.OnTestStart",
|
281
|
+
"ListenerTest::SetUp",
|
282
|
+
"ListenerTest::* Test Body",
|
283
|
+
"1st.OnTestPartResult",
|
284
|
+
"2nd.OnTestPartResult",
|
285
|
+
"ListenerTest::TearDown",
|
286
|
+
"2nd.OnTestEnd",
|
287
|
+
"1st.OnTestEnd",
|
288
|
+
"ListenerTest::TearDownTestCase",
|
289
|
+
"2nd.OnTestCaseEnd",
|
290
|
+
"1st.OnTestCaseEnd",
|
291
|
+
"1st.OnEnvironmentsTearDownStart",
|
292
|
+
"2nd.OnEnvironmentsTearDownStart",
|
293
|
+
"Environment::TearDown",
|
294
|
+
"2nd.OnEnvironmentsTearDownEnd",
|
295
|
+
"1st.OnEnvironmentsTearDownEnd",
|
296
|
+
"2nd.OnTestIterationEnd(1)",
|
297
|
+
"1st.OnTestIterationEnd(1)",
|
298
|
+
"2nd.OnTestProgramEnd",
|
299
|
+
"1st.OnTestProgramEnd"
|
300
|
+
};
|
301
|
+
VerifyResults(events,
|
302
|
+
expected_events,
|
303
|
+
sizeof(expected_events)/sizeof(expected_events[0]));
|
304
|
+
|
305
|
+
// We need to check manually for ad hoc test failures that happen after
|
306
|
+
// RUN_ALL_TESTS finishes.
|
307
|
+
if (UnitTest::GetInstance()->Failed())
|
308
|
+
ret_val = 1;
|
309
|
+
|
310
|
+
return ret_val;
|
311
|
+
}
|