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,180 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
#
|
3
|
+
# Copyright 2008, Google Inc.
|
4
|
+
# All rights reserved.
|
5
|
+
#
|
6
|
+
# Redistribution and use in source and binary forms, with or without
|
7
|
+
# modification, are permitted provided that the following conditions are
|
8
|
+
# met:
|
9
|
+
#
|
10
|
+
# * Redistributions of source code must retain the above copyright
|
11
|
+
# notice, this list of conditions and the following disclaimer.
|
12
|
+
# * Redistributions in binary form must reproduce the above
|
13
|
+
# copyright notice, this list of conditions and the following disclaimer
|
14
|
+
# in the documentation and/or other materials provided with the
|
15
|
+
# distribution.
|
16
|
+
# * Neither the name of Google Inc. nor the names of its
|
17
|
+
# contributors may be used to endorse or promote products derived from
|
18
|
+
# this software without specific prior written permission.
|
19
|
+
#
|
20
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
21
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
22
|
+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
23
|
+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
24
|
+
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
25
|
+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
26
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
27
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
28
|
+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
29
|
+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
30
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
|
32
|
+
"""Tests the text output of Google C++ Mocking Framework.
|
33
|
+
|
34
|
+
SYNOPSIS
|
35
|
+
gmock_output_test.py --build_dir=BUILD/DIR --gengolden
|
36
|
+
# where BUILD/DIR contains the built gmock_output_test_ file.
|
37
|
+
gmock_output_test.py --gengolden
|
38
|
+
gmock_output_test.py
|
39
|
+
"""
|
40
|
+
|
41
|
+
__author__ = 'wan@google.com (Zhanyong Wan)'
|
42
|
+
|
43
|
+
import os
|
44
|
+
import re
|
45
|
+
import sys
|
46
|
+
|
47
|
+
import gmock_test_utils
|
48
|
+
|
49
|
+
|
50
|
+
# The flag for generating the golden file
|
51
|
+
GENGOLDEN_FLAG = '--gengolden'
|
52
|
+
|
53
|
+
PROGRAM_PATH = gmock_test_utils.GetTestExecutablePath('gmock_output_test_')
|
54
|
+
COMMAND = [PROGRAM_PATH, '--gtest_stack_trace_depth=0', '--gtest_print_time=0']
|
55
|
+
GOLDEN_NAME = 'gmock_output_test_golden.txt'
|
56
|
+
GOLDEN_PATH = os.path.join(gmock_test_utils.GetSourceDir(), GOLDEN_NAME)
|
57
|
+
|
58
|
+
|
59
|
+
def ToUnixLineEnding(s):
|
60
|
+
"""Changes all Windows/Mac line endings in s to UNIX line endings."""
|
61
|
+
|
62
|
+
return s.replace('\r\n', '\n').replace('\r', '\n')
|
63
|
+
|
64
|
+
|
65
|
+
def RemoveReportHeaderAndFooter(output):
|
66
|
+
"""Removes Google Test result report's header and footer from the output."""
|
67
|
+
|
68
|
+
output = re.sub(r'.*gtest_main.*\n', '', output)
|
69
|
+
output = re.sub(r'\[.*\d+ tests.*\n', '', output)
|
70
|
+
output = re.sub(r'\[.* test environment .*\n', '', output)
|
71
|
+
output = re.sub(r'\[=+\] \d+ tests .* ran.*', '', output)
|
72
|
+
output = re.sub(r'.* FAILED TESTS\n', '', output)
|
73
|
+
return output
|
74
|
+
|
75
|
+
|
76
|
+
def RemoveLocations(output):
|
77
|
+
"""Removes all file location info from a Google Test program's output.
|
78
|
+
|
79
|
+
Args:
|
80
|
+
output: the output of a Google Test program.
|
81
|
+
|
82
|
+
Returns:
|
83
|
+
output with all file location info (in the form of
|
84
|
+
'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or
|
85
|
+
'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by
|
86
|
+
'FILE:#: '.
|
87
|
+
"""
|
88
|
+
|
89
|
+
return re.sub(r'.*[/\\](.+)(\:\d+|\(\d+\))\:', 'FILE:#:', output)
|
90
|
+
|
91
|
+
|
92
|
+
def NormalizeErrorMarker(output):
|
93
|
+
"""Normalizes the error marker, which is different on Windows vs on Linux."""
|
94
|
+
|
95
|
+
return re.sub(r' error: ', ' Failure\n', output)
|
96
|
+
|
97
|
+
|
98
|
+
def RemoveMemoryAddresses(output):
|
99
|
+
"""Removes memory addresses from the test output."""
|
100
|
+
|
101
|
+
return re.sub(r'@\w+', '@0x#', output)
|
102
|
+
|
103
|
+
|
104
|
+
def RemoveTestNamesOfLeakedMocks(output):
|
105
|
+
"""Removes the test names of leaked mock objects from the test output."""
|
106
|
+
|
107
|
+
return re.sub(r'\(used in test .+\) ', '', output)
|
108
|
+
|
109
|
+
|
110
|
+
def GetLeakyTests(output):
|
111
|
+
"""Returns a list of test names that leak mock objects."""
|
112
|
+
|
113
|
+
# findall() returns a list of all matches of the regex in output.
|
114
|
+
# For example, if '(used in test FooTest.Bar)' is in output, the
|
115
|
+
# list will contain 'FooTest.Bar'.
|
116
|
+
return re.findall(r'\(used in test (.+)\)', output)
|
117
|
+
|
118
|
+
|
119
|
+
def GetNormalizedOutputAndLeakyTests(output):
|
120
|
+
"""Normalizes the output of gmock_output_test_.
|
121
|
+
|
122
|
+
Args:
|
123
|
+
output: The test output.
|
124
|
+
|
125
|
+
Returns:
|
126
|
+
A tuple (the normalized test output, the list of test names that have
|
127
|
+
leaked mocks).
|
128
|
+
"""
|
129
|
+
|
130
|
+
output = ToUnixLineEnding(output)
|
131
|
+
output = RemoveReportHeaderAndFooter(output)
|
132
|
+
output = NormalizeErrorMarker(output)
|
133
|
+
output = RemoveLocations(output)
|
134
|
+
output = RemoveMemoryAddresses(output)
|
135
|
+
return (RemoveTestNamesOfLeakedMocks(output), GetLeakyTests(output))
|
136
|
+
|
137
|
+
|
138
|
+
def GetShellCommandOutput(cmd):
|
139
|
+
"""Runs a command in a sub-process, and returns its STDOUT in a string."""
|
140
|
+
|
141
|
+
return gmock_test_utils.Subprocess(cmd, capture_stderr=False).output
|
142
|
+
|
143
|
+
|
144
|
+
def GetNormalizedCommandOutputAndLeakyTests(cmd):
|
145
|
+
"""Runs a command and returns its normalized output and a list of leaky tests.
|
146
|
+
|
147
|
+
Args:
|
148
|
+
cmd: the shell command.
|
149
|
+
"""
|
150
|
+
|
151
|
+
# Disables exception pop-ups on Windows.
|
152
|
+
os.environ['GTEST_CATCH_EXCEPTIONS'] = '1'
|
153
|
+
return GetNormalizedOutputAndLeakyTests(GetShellCommandOutput(cmd))
|
154
|
+
|
155
|
+
|
156
|
+
class GMockOutputTest(gmock_test_utils.TestCase):
|
157
|
+
def testOutput(self):
|
158
|
+
(output, leaky_tests) = GetNormalizedCommandOutputAndLeakyTests(COMMAND)
|
159
|
+
golden_file = open(GOLDEN_PATH, 'rb')
|
160
|
+
golden = golden_file.read()
|
161
|
+
golden_file.close()
|
162
|
+
|
163
|
+
# The normalized output should match the golden file.
|
164
|
+
self.assertEquals(golden, output)
|
165
|
+
|
166
|
+
# The raw output should contain 2 leaked mock object errors for
|
167
|
+
# test GMockOutputTest.CatchesLeakedMocks.
|
168
|
+
self.assertEquals(['GMockOutputTest.CatchesLeakedMocks',
|
169
|
+
'GMockOutputTest.CatchesLeakedMocks'],
|
170
|
+
leaky_tests)
|
171
|
+
|
172
|
+
|
173
|
+
if __name__ == '__main__':
|
174
|
+
if sys.argv[1:] == [GENGOLDEN_FLAG]:
|
175
|
+
(output, _) = GetNormalizedCommandOutputAndLeakyTests(COMMAND)
|
176
|
+
golden_file = open(GOLDEN_PATH, 'wb')
|
177
|
+
golden_file.write(output)
|
178
|
+
golden_file.close()
|
179
|
+
else:
|
180
|
+
gmock_test_utils.Main()
|
@@ -0,0 +1,291 @@
|
|
1
|
+
// Copyright 2008, 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 Google Mock's output in various scenarios. This ensures that
|
33
|
+
// Google Mock's messages are readable and useful.
|
34
|
+
|
35
|
+
#include "gmock/gmock.h"
|
36
|
+
|
37
|
+
#include <stdio.h>
|
38
|
+
#include <string>
|
39
|
+
|
40
|
+
#include "gtest/gtest.h"
|
41
|
+
|
42
|
+
using testing::_;
|
43
|
+
using testing::AnyNumber;
|
44
|
+
using testing::Ge;
|
45
|
+
using testing::InSequence;
|
46
|
+
using testing::NaggyMock;
|
47
|
+
using testing::Ref;
|
48
|
+
using testing::Return;
|
49
|
+
using testing::Sequence;
|
50
|
+
|
51
|
+
class MockFoo {
|
52
|
+
public:
|
53
|
+
MockFoo() {}
|
54
|
+
|
55
|
+
MOCK_METHOD3(Bar, char(const std::string& s, int i, double x));
|
56
|
+
MOCK_METHOD2(Bar2, bool(int x, int y));
|
57
|
+
MOCK_METHOD2(Bar3, void(int x, int y));
|
58
|
+
|
59
|
+
private:
|
60
|
+
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
|
61
|
+
};
|
62
|
+
|
63
|
+
class GMockOutputTest : public testing::Test {
|
64
|
+
protected:
|
65
|
+
NaggyMock<MockFoo> foo_;
|
66
|
+
};
|
67
|
+
|
68
|
+
TEST_F(GMockOutputTest, ExpectedCall) {
|
69
|
+
testing::GMOCK_FLAG(verbose) = "info";
|
70
|
+
|
71
|
+
EXPECT_CALL(foo_, Bar2(0, _));
|
72
|
+
foo_.Bar2(0, 0); // Expected call
|
73
|
+
|
74
|
+
testing::GMOCK_FLAG(verbose) = "warning";
|
75
|
+
}
|
76
|
+
|
77
|
+
TEST_F(GMockOutputTest, ExpectedCallToVoidFunction) {
|
78
|
+
testing::GMOCK_FLAG(verbose) = "info";
|
79
|
+
|
80
|
+
EXPECT_CALL(foo_, Bar3(0, _));
|
81
|
+
foo_.Bar3(0, 0); // Expected call
|
82
|
+
|
83
|
+
testing::GMOCK_FLAG(verbose) = "warning";
|
84
|
+
}
|
85
|
+
|
86
|
+
TEST_F(GMockOutputTest, ExplicitActionsRunOut) {
|
87
|
+
EXPECT_CALL(foo_, Bar2(_, _))
|
88
|
+
.Times(2)
|
89
|
+
.WillOnce(Return(false));
|
90
|
+
foo_.Bar2(2, 2);
|
91
|
+
foo_.Bar2(1, 1); // Explicit actions in EXPECT_CALL run out.
|
92
|
+
}
|
93
|
+
|
94
|
+
TEST_F(GMockOutputTest, UnexpectedCall) {
|
95
|
+
EXPECT_CALL(foo_, Bar2(0, _));
|
96
|
+
|
97
|
+
foo_.Bar2(1, 0); // Unexpected call
|
98
|
+
foo_.Bar2(0, 0); // Expected call
|
99
|
+
}
|
100
|
+
|
101
|
+
TEST_F(GMockOutputTest, UnexpectedCallToVoidFunction) {
|
102
|
+
EXPECT_CALL(foo_, Bar3(0, _));
|
103
|
+
|
104
|
+
foo_.Bar3(1, 0); // Unexpected call
|
105
|
+
foo_.Bar3(0, 0); // Expected call
|
106
|
+
}
|
107
|
+
|
108
|
+
TEST_F(GMockOutputTest, ExcessiveCall) {
|
109
|
+
EXPECT_CALL(foo_, Bar2(0, _));
|
110
|
+
|
111
|
+
foo_.Bar2(0, 0); // Expected call
|
112
|
+
foo_.Bar2(0, 1); // Excessive call
|
113
|
+
}
|
114
|
+
|
115
|
+
TEST_F(GMockOutputTest, ExcessiveCallToVoidFunction) {
|
116
|
+
EXPECT_CALL(foo_, Bar3(0, _));
|
117
|
+
|
118
|
+
foo_.Bar3(0, 0); // Expected call
|
119
|
+
foo_.Bar3(0, 1); // Excessive call
|
120
|
+
}
|
121
|
+
|
122
|
+
TEST_F(GMockOutputTest, UninterestingCall) {
|
123
|
+
foo_.Bar2(0, 1); // Uninteresting call
|
124
|
+
}
|
125
|
+
|
126
|
+
TEST_F(GMockOutputTest, UninterestingCallToVoidFunction) {
|
127
|
+
foo_.Bar3(0, 1); // Uninteresting call
|
128
|
+
}
|
129
|
+
|
130
|
+
TEST_F(GMockOutputTest, RetiredExpectation) {
|
131
|
+
EXPECT_CALL(foo_, Bar2(_, _))
|
132
|
+
.RetiresOnSaturation();
|
133
|
+
EXPECT_CALL(foo_, Bar2(0, 0));
|
134
|
+
|
135
|
+
foo_.Bar2(1, 1);
|
136
|
+
foo_.Bar2(1, 1); // Matches a retired expectation
|
137
|
+
foo_.Bar2(0, 0);
|
138
|
+
}
|
139
|
+
|
140
|
+
TEST_F(GMockOutputTest, UnsatisfiedPrerequisite) {
|
141
|
+
{
|
142
|
+
InSequence s;
|
143
|
+
EXPECT_CALL(foo_, Bar(_, 0, _));
|
144
|
+
EXPECT_CALL(foo_, Bar2(0, 0));
|
145
|
+
EXPECT_CALL(foo_, Bar2(1, _));
|
146
|
+
}
|
147
|
+
|
148
|
+
foo_.Bar2(1, 0); // Has one immediate unsatisfied pre-requisite
|
149
|
+
foo_.Bar("Hi", 0, 0);
|
150
|
+
foo_.Bar2(0, 0);
|
151
|
+
foo_.Bar2(1, 0);
|
152
|
+
}
|
153
|
+
|
154
|
+
TEST_F(GMockOutputTest, UnsatisfiedPrerequisites) {
|
155
|
+
Sequence s1, s2;
|
156
|
+
|
157
|
+
EXPECT_CALL(foo_, Bar(_, 0, _))
|
158
|
+
.InSequence(s1);
|
159
|
+
EXPECT_CALL(foo_, Bar2(0, 0))
|
160
|
+
.InSequence(s2);
|
161
|
+
EXPECT_CALL(foo_, Bar2(1, _))
|
162
|
+
.InSequence(s1, s2);
|
163
|
+
|
164
|
+
foo_.Bar2(1, 0); // Has two immediate unsatisfied pre-requisites
|
165
|
+
foo_.Bar("Hi", 0, 0);
|
166
|
+
foo_.Bar2(0, 0);
|
167
|
+
foo_.Bar2(1, 0);
|
168
|
+
}
|
169
|
+
|
170
|
+
TEST_F(GMockOutputTest, UnsatisfiedWith) {
|
171
|
+
EXPECT_CALL(foo_, Bar2(_, _)).With(Ge());
|
172
|
+
}
|
173
|
+
|
174
|
+
TEST_F(GMockOutputTest, UnsatisfiedExpectation) {
|
175
|
+
EXPECT_CALL(foo_, Bar(_, _, _));
|
176
|
+
EXPECT_CALL(foo_, Bar2(0, _))
|
177
|
+
.Times(2);
|
178
|
+
|
179
|
+
foo_.Bar2(0, 1);
|
180
|
+
}
|
181
|
+
|
182
|
+
TEST_F(GMockOutputTest, MismatchArguments) {
|
183
|
+
const std::string s = "Hi";
|
184
|
+
EXPECT_CALL(foo_, Bar(Ref(s), _, Ge(0)));
|
185
|
+
|
186
|
+
foo_.Bar("Ho", 0, -0.1); // Mismatch arguments
|
187
|
+
foo_.Bar(s, 0, 0);
|
188
|
+
}
|
189
|
+
|
190
|
+
TEST_F(GMockOutputTest, MismatchWith) {
|
191
|
+
EXPECT_CALL(foo_, Bar2(Ge(2), Ge(1)))
|
192
|
+
.With(Ge());
|
193
|
+
|
194
|
+
foo_.Bar2(2, 3); // Mismatch With()
|
195
|
+
foo_.Bar2(2, 1);
|
196
|
+
}
|
197
|
+
|
198
|
+
TEST_F(GMockOutputTest, MismatchArgumentsAndWith) {
|
199
|
+
EXPECT_CALL(foo_, Bar2(Ge(2), Ge(1)))
|
200
|
+
.With(Ge());
|
201
|
+
|
202
|
+
foo_.Bar2(1, 3); // Mismatch arguments and mismatch With()
|
203
|
+
foo_.Bar2(2, 1);
|
204
|
+
}
|
205
|
+
|
206
|
+
TEST_F(GMockOutputTest, UnexpectedCallWithDefaultAction) {
|
207
|
+
ON_CALL(foo_, Bar2(_, _))
|
208
|
+
.WillByDefault(Return(true)); // Default action #1
|
209
|
+
ON_CALL(foo_, Bar2(1, _))
|
210
|
+
.WillByDefault(Return(false)); // Default action #2
|
211
|
+
|
212
|
+
EXPECT_CALL(foo_, Bar2(2, 2));
|
213
|
+
foo_.Bar2(1, 0); // Unexpected call, takes default action #2.
|
214
|
+
foo_.Bar2(0, 0); // Unexpected call, takes default action #1.
|
215
|
+
foo_.Bar2(2, 2); // Expected call.
|
216
|
+
}
|
217
|
+
|
218
|
+
TEST_F(GMockOutputTest, ExcessiveCallWithDefaultAction) {
|
219
|
+
ON_CALL(foo_, Bar2(_, _))
|
220
|
+
.WillByDefault(Return(true)); // Default action #1
|
221
|
+
ON_CALL(foo_, Bar2(1, _))
|
222
|
+
.WillByDefault(Return(false)); // Default action #2
|
223
|
+
|
224
|
+
EXPECT_CALL(foo_, Bar2(2, 2));
|
225
|
+
EXPECT_CALL(foo_, Bar2(1, 1));
|
226
|
+
|
227
|
+
foo_.Bar2(2, 2); // Expected call.
|
228
|
+
foo_.Bar2(2, 2); // Excessive call, takes default action #1.
|
229
|
+
foo_.Bar2(1, 1); // Expected call.
|
230
|
+
foo_.Bar2(1, 1); // Excessive call, takes default action #2.
|
231
|
+
}
|
232
|
+
|
233
|
+
TEST_F(GMockOutputTest, UninterestingCallWithDefaultAction) {
|
234
|
+
ON_CALL(foo_, Bar2(_, _))
|
235
|
+
.WillByDefault(Return(true)); // Default action #1
|
236
|
+
ON_CALL(foo_, Bar2(1, _))
|
237
|
+
.WillByDefault(Return(false)); // Default action #2
|
238
|
+
|
239
|
+
foo_.Bar2(2, 2); // Uninteresting call, takes default action #1.
|
240
|
+
foo_.Bar2(1, 1); // Uninteresting call, takes default action #2.
|
241
|
+
}
|
242
|
+
|
243
|
+
TEST_F(GMockOutputTest, ExplicitActionsRunOutWithDefaultAction) {
|
244
|
+
ON_CALL(foo_, Bar2(_, _))
|
245
|
+
.WillByDefault(Return(true)); // Default action #1
|
246
|
+
|
247
|
+
EXPECT_CALL(foo_, Bar2(_, _))
|
248
|
+
.Times(2)
|
249
|
+
.WillOnce(Return(false));
|
250
|
+
foo_.Bar2(2, 2);
|
251
|
+
foo_.Bar2(1, 1); // Explicit actions in EXPECT_CALL run out.
|
252
|
+
}
|
253
|
+
|
254
|
+
TEST_F(GMockOutputTest, CatchesLeakedMocks) {
|
255
|
+
MockFoo* foo1 = new MockFoo;
|
256
|
+
MockFoo* foo2 = new MockFoo;
|
257
|
+
|
258
|
+
// Invokes ON_CALL on foo1.
|
259
|
+
ON_CALL(*foo1, Bar(_, _, _)).WillByDefault(Return('a'));
|
260
|
+
|
261
|
+
// Invokes EXPECT_CALL on foo2.
|
262
|
+
EXPECT_CALL(*foo2, Bar2(_, _));
|
263
|
+
EXPECT_CALL(*foo2, Bar2(1, _));
|
264
|
+
EXPECT_CALL(*foo2, Bar3(_, _)).Times(AnyNumber());
|
265
|
+
foo2->Bar2(2, 1);
|
266
|
+
foo2->Bar2(1, 1);
|
267
|
+
|
268
|
+
// Both foo1 and foo2 are deliberately leaked.
|
269
|
+
}
|
270
|
+
|
271
|
+
void TestCatchesLeakedMocksInAdHocTests() {
|
272
|
+
MockFoo* foo = new MockFoo;
|
273
|
+
|
274
|
+
// Invokes EXPECT_CALL on foo.
|
275
|
+
EXPECT_CALL(*foo, Bar2(_, _));
|
276
|
+
foo->Bar2(2, 1);
|
277
|
+
|
278
|
+
// foo is deliberately leaked.
|
279
|
+
}
|
280
|
+
|
281
|
+
int main(int argc, char **argv) {
|
282
|
+
testing::InitGoogleMock(&argc, argv);
|
283
|
+
|
284
|
+
// Ensures that the tests pass no matter what value of
|
285
|
+
// --gmock_catch_leaked_mocks and --gmock_verbose the user specifies.
|
286
|
+
testing::GMOCK_FLAG(catch_leaked_mocks) = true;
|
287
|
+
testing::GMOCK_FLAG(verbose) = "warning";
|
288
|
+
|
289
|
+
TestCatchesLeakedMocksInAdHocTests();
|
290
|
+
return RUN_ALL_TESTS();
|
291
|
+
}
|