rj_schema 0.2.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rj_schema/rapidjson/CMakeLists.txt +9 -4
- data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +10 -0
- data/ext/rj_schema/rapidjson/appveyor.yml +22 -9
- data/ext/rj_schema/rapidjson/bin/data/abcde.txt +1 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/address.json +139 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/allOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/anyOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/oneOf_address.json +7 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +2 -2
- data/ext/rj_schema/rapidjson/doc/dom.md +1 -0
- data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +1 -0
- data/ext/rj_schema/rapidjson/doc/faq.md +3 -3
- data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +8 -8
- data/ext/rj_schema/rapidjson/doc/internals.md +1 -1
- data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +1 -1
- data/ext/rj_schema/rapidjson/doc/sax.md +1 -1
- data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/doc/stream.md +1 -1
- data/ext/rj_schema/rapidjson/doc/tutorial.md +1 -1
- data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +7 -6
- data/ext/rj_schema/rapidjson/example/CMakeLists.txt +1 -0
- data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +118 -0
- data/ext/rj_schema/rapidjson/example/sortkeys/sortkeys.cpp +62 -0
- data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +6 -6
- data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/document.h +124 -35
- data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +49 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +56 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/clzll.h +71 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +3 -17
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +20 -13
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +4 -3
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +50 -35
- data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +63 -5
- data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +2 -2
- data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +63 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +67 -53
- data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +318 -164
- data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +1 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +10 -10
- data/ext/rj_schema/rapidjson/readme.md +51 -1
- data/ext/rj_schema/rapidjson/readme.zh-cn.md +2 -2
- data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/perftest.h +1 -1
- data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +2 -2
- data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +75 -1
- data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +1 -0
- data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/clzlltest.cpp +34 -0
- data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +19 -19
- data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +45 -2
- data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +10 -10
- data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +8 -8
- data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +157 -16
- data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +113 -75
- data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +2 -1
- data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +593 -78
- data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +5 -5
- data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +1 -1
- data/ext/rj_schema/rapidjson/test/unittest/unittest.h +4 -1
- data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +12 -12
- data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/BUILD.bazel +175 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +18 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CONTRIBUTING.md +160 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/LICENSE +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/Makefile.am +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +16 -35
- data/ext/rj_schema/rapidjson/thirdparty/gtest/WORKSPACE +8 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/appveyor.yml +104 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +36 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-linux.sh +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/env-osx.sh +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +48 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-linux.sh +49 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/install-osx.sh +39 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/log-config.sh +51 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/ci/travis.sh +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/configure.ac +16 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +72 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +53 -42
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +6 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +117 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +7 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +20 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +83 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +262 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +45 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +650 -366
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +76 -20
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +308 -229
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +18 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +87 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +33 -16
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +1209 -353
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +33 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +159 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +3 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +16 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +71 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +7 -11
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +69 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +69 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +83 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +63 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +63 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +76 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +4 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +36 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +210 -135
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +108 -48
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +23 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +123 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +166 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +64 -62
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +43 -18
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +11 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +91 -36
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +33 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +1286 -167
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +85 -83
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +102 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +136 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +24 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +8 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +20 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +8 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +3 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +44 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +5 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +40 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +60 -31
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +232 -171
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +9 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +10 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +54 -16
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +6 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{AdvancedGuide.md → advanced.md} +260 -26
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{FAQ.md → faq.md} +62 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Primer.md → primer.md} +43 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/{Samples.md → samples.md} +0 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +53 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +30 -36
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +8 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +140 -51
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +2 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +4 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +126 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +6 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +8 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +6 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +4 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +13 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +98 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +34 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +3 -10
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +9 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +8 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +232 -99
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +17 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +17 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +55 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +149 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +55 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +149 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +154 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +162 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +199 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +26 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +191 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +26 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +188 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +180 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +6 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +7 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +5 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +3 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +10 -22
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +2 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +10 -10
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +226 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +5 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +21 -29
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +85 -67
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +93 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +1 -9
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +1 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +622 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +396 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +12 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +2 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +6 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +1 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +84 -29
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +1 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +11 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +165 -63
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +13 -13
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +119 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +1 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +1 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +6 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -3
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +20 -18
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +162 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +611 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +60 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +11 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +17 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +104 -66
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +2 -19
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -6
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +12 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +65 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +44 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +4 -5
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +2 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +240 -149
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +15 -7
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +100 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -2
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +25 -23
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +1 -1
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +4 -4
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +47 -0
- data/ext/rj_schema/rapidjson/travis-doxygen.sh +13 -6
- data/ext/rj_schema/rj_schema.cpp +161 -17
- data/lib/rj_schema.rb +1 -1
- metadata +63 -58
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
|
3
3
|
If you cannot find the answer to your question here, and you have read
|
4
|
-
[Primer](
|
4
|
+
[Primer](primer.md) and [AdvancedGuide](advanced.md), send it to
|
5
5
|
googletestframework@googlegroups.com.
|
6
6
|
|
7
7
|
## Why should I use Google Test instead of my favorite C++ testing framework? ##
|
@@ -28,11 +28,11 @@ list can help you decide whether it is for you too.
|
|
28
28
|
* `SCOPED_TRACE` helps you understand the context of an assertion failure when it comes from inside a sub-routine or loop.
|
29
29
|
* You can decide which tests to run using name patterns. This saves time when you want to quickly reproduce a test failure.
|
30
30
|
* Google Test can generate XML test result reports that can be parsed by popular continuous build system like Hudson.
|
31
|
-
* Simple things are easy in Google Test, while hard things are possible: in addition to advanced features like [global test environments](
|
32
|
-
* expand your testing vocabulary by defining [custom predicates](
|
33
|
-
* teach Google Test how to [print your types](
|
34
|
-
* define your own testing macros or utilities and verify them using Google Test's [Service Provider Interface](
|
35
|
-
* reflect on the test cases or change the test output format by intercepting the [test events](
|
31
|
+
* Simple things are easy in Google Test, while hard things are possible: in addition to advanced features like [global test environments](advanced.md#global-set-up-and-tear-down) and tests parameterized by [values](advanced.md#value-parameterized-tests) or [types](docs/advanced.md#typed-tests), Google Test supports various ways for the user to extend the framework -- if Google Test doesn't do something out of the box, chances are that a user can implement the feature using Google Test's public API, without changing Google Test itself. In particular, you can:
|
32
|
+
* expand your testing vocabulary by defining [custom predicates](advanced.md#predicate-assertions-for-better-error-messages),
|
33
|
+
* teach Google Test how to [print your types](advanced.md#teaching-google-test-how-to-print-your-values),
|
34
|
+
* define your own testing macros or utilities and verify them using Google Test's [Service Provider Interface](advanced.md#catching-failures), and
|
35
|
+
* reflect on the test cases or change the test output format by intercepting the [test events](advanced.md#extending-google-test-by-handling-test-events).
|
36
36
|
|
37
37
|
## I'm getting warnings when compiling Google Test. Would you fix them? ##
|
38
38
|
|
@@ -54,7 +54,7 @@ Underscore (`_`) is special, as C++ reserves the following to be used by
|
|
54
54
|
the compiler and the standard library:
|
55
55
|
|
56
56
|
1. any identifier that starts with an `_` followed by an upper-case letter, and
|
57
|
-
1. any identifier that
|
57
|
+
1. any identifier that contains two consecutive underscores (i.e. `__`) _anywhere_ in its name.
|
58
58
|
|
59
59
|
User code is _prohibited_ from using such identifiers.
|
60
60
|
|
@@ -76,7 +76,7 @@ for simplicity we just say that it cannot start with `_`.).
|
|
76
76
|
|
77
77
|
It may seem fine for `TestCaseName` and `TestName` to contain `_` in the
|
78
78
|
middle. However, consider this:
|
79
|
-
```
|
79
|
+
```c++
|
80
80
|
TEST(Time, Flies_Like_An_Arrow) { ... }
|
81
81
|
TEST(Time_Flies, Like_An_Arrow) { ... }
|
82
82
|
```
|
@@ -102,9 +102,9 @@ Then every user of your machine can write tests without
|
|
102
102
|
recompiling Google Test.
|
103
103
|
|
104
104
|
This seemed like a good idea, but it has a
|
105
|
-
got-cha: every user needs to compile
|
105
|
+
got-cha: every user needs to compile their tests using the _same_ compiler
|
106
106
|
flags used to compile the installed Google Test libraries; otherwise
|
107
|
-
|
107
|
+
they may run into undefined behaviors (i.e. the tests can behave
|
108
108
|
strangely and may even crash for no obvious reasons).
|
109
109
|
|
110
110
|
Why? Because C++ has this thing called the One-Definition Rule: if
|
@@ -242,7 +242,7 @@ of this approach:
|
|
242
242
|
1. Throwing in a destructor is undefined behavior in C++. Not using exceptions means Google Test's assertions are safe to use in destructors.
|
243
243
|
1. The `EXPECT_*` family of macros will continue even after a failure, allowing multiple failures in a `TEST` to be reported in a single run. This is a popular feature, as in C++ the edit-compile-test cycle is usually quite long and being able to fixing more than one thing at a time is a blessing.
|
244
244
|
1. If assertions are implemented using exceptions, a test may falsely ignore a failure if it's caught by user code:
|
245
|
-
```
|
245
|
+
```c++
|
246
246
|
try { ... ASSERT_TRUE(...) ... }
|
247
247
|
catch (...) { ... }
|
248
248
|
```
|
@@ -259,13 +259,13 @@ macro for both cases. One possibility is to provide only one macro
|
|
259
259
|
for tests with fixtures, and require the user to define an empty
|
260
260
|
fixture sometimes:
|
261
261
|
|
262
|
-
```
|
262
|
+
```c++
|
263
263
|
class FooTest : public ::testing::Test {};
|
264
264
|
|
265
265
|
TEST_F(FooTest, DoesThis) { ... }
|
266
266
|
```
|
267
267
|
or
|
268
|
-
```
|
268
|
+
```c++
|
269
269
|
typedef ::testing::Test FooTest;
|
270
270
|
|
271
271
|
TEST_F(FooTest, DoesThat) { ... }
|
@@ -293,7 +293,7 @@ possibly allows. In particular:
|
|
293
293
|
* The runner-style requires to split the information into two pieces: the definition of the death test itself, and the specification for the runner on how to run the death test and what to expect. The death test would be written in C++, while the runner spec may or may not be. A user needs to carefully keep the two in sync. `ASSERT_DEATH(statement, expected_message)` specifies all necessary information in one place, in one language, without boilerplate code. It is very declarative.
|
294
294
|
* `ASSERT_DEATH` has a similar syntax and error-reporting semantics as other Google Test assertions, and thus is easy to learn.
|
295
295
|
* `ASSERT_DEATH` can be mixed with other assertions and other logic at your will. You are not limited to one death test per test method. For example, you can write something like:
|
296
|
-
```
|
296
|
+
```c++
|
297
297
|
if (FooCondition()) {
|
298
298
|
ASSERT_DEATH(Bar(), "blah");
|
299
299
|
} else {
|
@@ -302,7 +302,7 @@ possibly allows. In particular:
|
|
302
302
|
```
|
303
303
|
If you prefer one death test per test method, you can write your tests in that style too, but we don't want to impose that on the users. The fewer artificial limitations the better.
|
304
304
|
* `ASSERT_DEATH` can reference local variables in the current function, and you can decide how many death tests you want based on run-time information. For example,
|
305
|
-
```
|
305
|
+
```c++
|
306
306
|
const int count = GetCount(); // Only known at run time.
|
307
307
|
for (int i = 1; i <= count; i++) {
|
308
308
|
ASSERT_DEATH({
|
@@ -335,7 +335,7 @@ as running in a parallel universe, more or less.
|
|
335
335
|
|
336
336
|
If your class has a static data member:
|
337
337
|
|
338
|
-
```
|
338
|
+
```c++
|
339
339
|
// foo.h
|
340
340
|
class Foo {
|
341
341
|
...
|
@@ -345,7 +345,7 @@ class Foo {
|
|
345
345
|
|
346
346
|
You also need to define it _outside_ of the class body in `foo.cc`:
|
347
347
|
|
348
|
-
```
|
348
|
+
```c++
|
349
349
|
const int Foo::kBar; // No initializer here.
|
350
350
|
```
|
351
351
|
|
@@ -376,7 +376,7 @@ to write tests using each derived fixture.
|
|
376
376
|
|
377
377
|
Typically, your code looks like this:
|
378
378
|
|
379
|
-
```
|
379
|
+
```c++
|
380
380
|
// Defines a base test fixture.
|
381
381
|
class BaseTest : public ::testing::Test {
|
382
382
|
protected:
|
@@ -460,7 +460,7 @@ following benefits:
|
|
460
460
|
You may still want to use `SetUp()/TearDown()` in the following rare cases:
|
461
461
|
* If the tear-down operation could throw an exception, you must use `TearDown()` as opposed to the destructor, as throwing in a destructor leads to undefined behavior and usually will kill your program right away. Note that many standard libraries (like STL) may throw when exceptions are enabled in the compiler. Therefore you should prefer `TearDown()` if you want to write portable tests that work with or without exceptions.
|
462
462
|
* The assertion macros throw an exception when flag `--gtest_throw_on_failure` is specified. Therefore, you shouldn't use Google Test assertions in a destructor if you plan to run your tests with this flag.
|
463
|
-
* In a constructor or destructor, you cannot make a virtual function call on this object. (You can call a method declared as virtual, but it will be statically bound.) Therefore, if you need to call a method that will be
|
463
|
+
* In a constructor or destructor, you cannot make a virtual function call on this object. (You can call a method declared as virtual, but it will be statically bound.) Therefore, if you need to call a method that will be overridden in a derived class, you have to use `SetUp()/TearDown()`.
|
464
464
|
|
465
465
|
## The compiler complains "no matching function to call" when I use ASSERT\_PREDn. How do I fix it? ##
|
466
466
|
|
@@ -476,7 +476,7 @@ explicitly telling the compiler which version to pick.
|
|
476
476
|
|
477
477
|
For example, suppose you have
|
478
478
|
|
479
|
-
```
|
479
|
+
```c++
|
480
480
|
bool IsPositive(int n) {
|
481
481
|
return n > 0;
|
482
482
|
}
|
@@ -487,14 +487,14 @@ bool IsPositive(double x) {
|
|
487
487
|
|
488
488
|
you will get a compiler error if you write
|
489
489
|
|
490
|
-
```
|
490
|
+
```c++
|
491
491
|
EXPECT_PRED1(IsPositive, 5);
|
492
492
|
```
|
493
493
|
|
494
494
|
However, this will work:
|
495
495
|
|
496
|
-
```
|
497
|
-
EXPECT_PRED1(
|
496
|
+
```c++
|
497
|
+
EXPECT_PRED1(static_cast<bool (*)(int)>(IsPositive), 5);
|
498
498
|
```
|
499
499
|
|
500
500
|
(The stuff inside the angled brackets for the `static_cast` operator is the
|
@@ -502,7 +502,7 @@ type of the function pointer for the `int`-version of `IsPositive()`.)
|
|
502
502
|
|
503
503
|
As another example, when you have a template function
|
504
504
|
|
505
|
-
```
|
505
|
+
```c++
|
506
506
|
template <typename T>
|
507
507
|
bool IsNegative(T x) {
|
508
508
|
return x < 0;
|
@@ -511,15 +511,15 @@ bool IsNegative(T x) {
|
|
511
511
|
|
512
512
|
you can use it in a predicate assertion like this:
|
513
513
|
|
514
|
-
```
|
515
|
-
ASSERT_PRED1(IsNegative
|
514
|
+
```c++
|
515
|
+
ASSERT_PRED1(IsNegative<int>, -5);
|
516
516
|
```
|
517
517
|
|
518
518
|
Things are more interesting if your template has more than one parameters. The
|
519
519
|
following won't compile:
|
520
520
|
|
521
|
-
```
|
522
|
-
ASSERT_PRED2(
|
521
|
+
```c++
|
522
|
+
ASSERT_PRED2(GreaterThan<int, int>, 5, 0);
|
523
523
|
```
|
524
524
|
|
525
525
|
|
@@ -527,8 +527,8 @@ as the C++ pre-processor thinks you are giving `ASSERT_PRED2` 4 arguments,
|
|
527
527
|
which is one more than expected. The workaround is to wrap the predicate
|
528
528
|
function in parentheses:
|
529
529
|
|
530
|
-
```
|
531
|
-
ASSERT_PRED2(
|
530
|
+
```c++
|
531
|
+
ASSERT_PRED2((GreaterThan<int, int>), 5, 0);
|
532
532
|
```
|
533
533
|
|
534
534
|
|
@@ -537,13 +537,13 @@ ASSERT_PRED2(*(GreaterThan<int, int>)*, 5, 0);
|
|
537
537
|
Some people had been ignoring the return value of `RUN_ALL_TESTS()`. That is,
|
538
538
|
instead of
|
539
539
|
|
540
|
-
```
|
540
|
+
```c++
|
541
541
|
return RUN_ALL_TESTS();
|
542
542
|
```
|
543
543
|
|
544
544
|
they write
|
545
545
|
|
546
|
-
```
|
546
|
+
```c++
|
547
547
|
RUN_ALL_TESTS();
|
548
548
|
```
|
549
549
|
|
@@ -562,7 +562,7 @@ is used as the return value of `main()`.
|
|
562
562
|
Due to a peculiarity of C++, in order to support the syntax for streaming
|
563
563
|
messages to an `ASSERT_*`, e.g.
|
564
564
|
|
565
|
-
```
|
565
|
+
```c++
|
566
566
|
ASSERT_EQ(1, Foo()) << "blah blah" << foo;
|
567
567
|
```
|
568
568
|
|
@@ -591,7 +591,7 @@ the corresponding source code, or use `C-x `` to jump to the next failure.
|
|
591
591
|
|
592
592
|
You don't have to. Instead of
|
593
593
|
|
594
|
-
```
|
594
|
+
```c++
|
595
595
|
class FooTest : public BaseTest {};
|
596
596
|
|
597
597
|
TEST_F(FooTest, Abc) { ... }
|
@@ -604,7 +604,7 @@ TEST_F(BarTest, Def) { ... }
|
|
604
604
|
```
|
605
605
|
|
606
606
|
you can simply `typedef` the test fixtures:
|
607
|
-
```
|
607
|
+
```c++
|
608
608
|
typedef BaseTest FooTest;
|
609
609
|
|
610
610
|
TEST_F(FooTest, Abc) { ... }
|
@@ -646,7 +646,7 @@ members of the helper class public.
|
|
646
646
|
|
647
647
|
You have several other options that don't require using `FRIEND_TEST`:
|
648
648
|
* Write the tests as members of the fixture class:
|
649
|
-
```
|
649
|
+
```c++
|
650
650
|
class Foo {
|
651
651
|
friend class FooTest;
|
652
652
|
...
|
@@ -668,7 +668,7 @@ TEST_F(FooTest, Test2) {
|
|
668
668
|
}
|
669
669
|
```
|
670
670
|
* In the fixture class, write accessors for the tested class' private members, then use the accessors in your tests:
|
671
|
-
```
|
671
|
+
```c++
|
672
672
|
class Foo {
|
673
673
|
friend class FooTest;
|
674
674
|
...
|
@@ -689,7 +689,7 @@ TEST_F(FooTest, Test1) {
|
|
689
689
|
}
|
690
690
|
```
|
691
691
|
* If the methods are declared **protected**, you can change their access level in a test-only subclass:
|
692
|
-
```
|
692
|
+
```c++
|
693
693
|
class YourClass {
|
694
694
|
...
|
695
695
|
protected: // protected access for testability.
|
@@ -717,7 +717,7 @@ implementation details and ideally should be kept out of a .h. So often I make
|
|
717
717
|
them free functions instead.
|
718
718
|
|
719
719
|
Instead of:
|
720
|
-
```
|
720
|
+
```c++
|
721
721
|
// foo.h
|
722
722
|
class Foo {
|
723
723
|
...
|
@@ -733,7 +733,7 @@ EXPECT_TRUE(Foo::Func(12345));
|
|
733
733
|
```
|
734
734
|
|
735
735
|
You probably should better write:
|
736
|
-
```
|
736
|
+
```c++
|
737
737
|
// foo.h
|
738
738
|
class Foo {
|
739
739
|
...
|
@@ -754,7 +754,7 @@ EXPECT_TRUE(internal::Func(12345));
|
|
754
754
|
|
755
755
|
## I would like to run a test several times with different parameters. Do I need to write several similar copies of it? ##
|
756
756
|
|
757
|
-
No. You can use a feature called [value-parameterized tests](
|
757
|
+
No. You can use a feature called [value-parameterized tests](advanced.md#Value_Parameterized_Tests) which
|
758
758
|
lets you repeat your tests with different parameters, without defining it more than once.
|
759
759
|
|
760
760
|
## How do I test a file that defines main()? ##
|
@@ -774,7 +774,7 @@ Then `foo.cc` can be easily tested.
|
|
774
774
|
If you are adding tests to an existing file and don't want an intrusive change
|
775
775
|
like this, there is a hack: just include the entire `foo.cc` file in your unit
|
776
776
|
test. For example:
|
777
|
-
```
|
777
|
+
```c++
|
778
778
|
// File foo_unittest.cc
|
779
779
|
|
780
780
|
// The headers section
|
@@ -805,7 +805,7 @@ reference global and/or local variables, and can be:
|
|
805
805
|
|
806
806
|
Some examples are shown here:
|
807
807
|
|
808
|
-
```
|
808
|
+
```c++
|
809
809
|
// A death test can be a simple function call.
|
810
810
|
TEST(MyDeathTest, FunctionCall) {
|
811
811
|
ASSERT_DEATH(Xyz(5), "Xyz failed");
|
@@ -849,7 +849,7 @@ expression syntax
|
|
849
849
|
(http://en.wikipedia.org/wiki/Regular_expression#POSIX_Extended_Regular_Expressions).
|
850
850
|
On Windows, it uses a limited variant of regular expression
|
851
851
|
syntax. For more details, see the
|
852
|
-
[regular expression syntax](
|
852
|
+
[regular expression syntax](advanced.md#Regular_Expression_Syntax).
|
853
853
|
|
854
854
|
## I have a fixture class Foo, but TEST\_F(Foo, Bar) gives me error "no matching function for call to Foo::Foo()". Why? ##
|
855
855
|
|
@@ -884,7 +884,7 @@ inefficient and makes the semantics unclean.
|
|
884
884
|
If we were to determine the order of tests based on test name instead of test
|
885
885
|
case name, then we would have a problem with the following situation:
|
886
886
|
|
887
|
-
```
|
887
|
+
```c++
|
888
888
|
TEST_F(FooTest, AbcDeathTest) { ... }
|
889
889
|
TEST_F(FooTest, Uvw) { ... }
|
890
890
|
|
@@ -903,7 +903,7 @@ You don't have to, but if you like, you may split up the test case into
|
|
903
903
|
`FooTest` and `FooDeathTest`, where the names make it clear that they are
|
904
904
|
related:
|
905
905
|
|
906
|
-
```
|
906
|
+
```c++
|
907
907
|
class FooTest : public ::testing::Test { ... };
|
908
908
|
|
909
909
|
TEST_F(FooTest, Abc) { ... }
|
@@ -956,16 +956,15 @@ using gtest-md.vcproj instead of gtest.vcproj.
|
|
956
956
|
|
957
957
|
## I put my tests in a library and Google Test doesn't run them. What's happening? ##
|
958
958
|
Have you read a
|
959
|
-
[warning](
|
959
|
+
[warning](primer.md#important-note-for-visual-c-users) on
|
960
960
|
the Google Test Primer page?
|
961
961
|
|
962
962
|
## I want to use Google Test with Visual Studio but don't know where to start. ##
|
963
|
-
Many people are in your position and one of
|
964
|
-
our mailing list.
|
963
|
+
Many people are in your position and one of them posted his solution to our mailing list.
|
965
964
|
|
966
965
|
## I am seeing compile errors mentioning std::type\_traits when I try to use Google Test on Solaris. ##
|
967
966
|
Google Test uses parts of the standard C++ library that SunStudio does not support.
|
968
|
-
Our users reported success using alternative implementations. Try running the build after
|
967
|
+
Our users reported success using alternative implementations. Try running the build after running this command:
|
969
968
|
|
970
969
|
`export CC=cc CXX=CC CXXFLAGS='-library=stlport4'`
|
971
970
|
|
@@ -1006,16 +1005,16 @@ Specifically, if both Google Test and some other code define macro
|
|
1006
1005
|
```
|
1007
1006
|
to the compiler flags to tell Google Test to change the macro's name
|
1008
1007
|
from `FOO` to `GTEST_FOO`. For example, with `-DGTEST_DONT_DEFINE_TEST=1`, you'll need to write
|
1009
|
-
```
|
1008
|
+
```c++
|
1010
1009
|
GTEST_TEST(SomeTest, DoesThis) { ... }
|
1011
1010
|
```
|
1012
1011
|
instead of
|
1013
|
-
```
|
1012
|
+
```c++
|
1014
1013
|
TEST(SomeTest, DoesThis) { ... }
|
1015
1014
|
```
|
1016
1015
|
in order to define a test.
|
1017
1016
|
|
1018
|
-
Currently, the following `TEST`, `FAIL`, `SUCCEED`, and the basic comparison assertion macros can have
|
1017
|
+
Currently, the following `TEST`, `FAIL`, `SUCCEED`, and the basic comparison assertion macros can have . You can see the full list of covered macros [here](../include/gtest/gtest.h). More information can be found in the "Avoiding Macro Name Clashes" section of the README file.
|
1019
1018
|
|
1020
1019
|
|
1021
1020
|
## Is it OK if I have two separate `TEST(Foo, Bar)` test methods defined in different namespaces? ##
|
@@ -1024,7 +1023,7 @@ Yes.
|
|
1024
1023
|
|
1025
1024
|
The rule is **all test methods in the same test case must use the same fixture class**. This means that the following is **allowed** because both tests use the same fixture class (`::testing::Test`).
|
1026
1025
|
|
1027
|
-
```
|
1026
|
+
```c++
|
1028
1027
|
namespace foo {
|
1029
1028
|
TEST(CoolTest, DoSomething) {
|
1030
1029
|
SUCCEED();
|
@@ -1035,12 +1034,12 @@ namespace bar {
|
|
1035
1034
|
TEST(CoolTest, DoSomething) {
|
1036
1035
|
SUCCEED();
|
1037
1036
|
}
|
1038
|
-
} // namespace
|
1037
|
+
} // namespace bar
|
1039
1038
|
```
|
1040
1039
|
|
1041
1040
|
However, the following code is **not allowed** and will produce a runtime error from Google Test because the test methods are using different test fixture classes with the same test case name.
|
1042
1041
|
|
1043
|
-
```
|
1042
|
+
```c++
|
1044
1043
|
namespace foo {
|
1045
1044
|
class CoolTest : public ::testing::Test {}; // Fixture foo::CoolTest
|
1046
1045
|
TEST_F(CoolTest, DoSomething) {
|
@@ -1053,7 +1052,7 @@ class CoolTest : public ::testing::Test {}; // Fixture: bar::CoolTest
|
|
1053
1052
|
TEST_F(CoolTest, DoSomething) {
|
1054
1053
|
SUCCEED();
|
1055
1054
|
}
|
1056
|
-
} // namespace
|
1055
|
+
} // namespace bar
|
1057
1056
|
```
|
1058
1057
|
|
1059
1058
|
## How do I build Google Testing Framework with Xcode 4? ##
|
@@ -1061,6 +1060,12 @@ TEST_F(CoolTest, DoSomething) {
|
|
1061
1060
|
If you try to build Google Test's Xcode project with Xcode 4.0 or later, you may encounter an error message that looks like
|
1062
1061
|
"Missing SDK in target gtest\_framework: /Developer/SDKs/MacOSX10.4u.sdk". That means that Xcode does not support the SDK the project is targeting. See the Xcode section in the [README](../README.md) file on how to resolve this.
|
1063
1062
|
|
1063
|
+
## How do I easily discover the flags needed for GoogleTest? ##
|
1064
|
+
|
1065
|
+
GoogleTest (and GoogleMock) now support discovering all necessary flags using pkg-config.
|
1066
|
+
See the [pkg-config guide](Pkgconfig.md) on how you can easily discover all compiler and
|
1067
|
+
linker flags using pkg-config.
|
1068
|
+
|
1064
1069
|
## My question is not covered in your FAQ! ##
|
1065
1070
|
|
1066
1071
|
If you cannot find the answer to your question in this FAQ, there are
|
@@ -23,6 +23,40 @@ So let's go!
|
|
23
23
|
_Note:_ We sometimes refer to Google C++ Testing Framework informally
|
24
24
|
as _Google Test_.
|
25
25
|
|
26
|
+
# Beware of the nomenclature #
|
27
|
+
|
28
|
+
_Note:_ There might be some confusion of idea due to different
|
29
|
+
definitions of the terms _Test_, _Test Case_ and _Test Suite_, so beware
|
30
|
+
of misunderstanding these.
|
31
|
+
|
32
|
+
Historically, the Google C++ Testing Framework started to use the term
|
33
|
+
_Test Case_ for grouping related tests, whereas current publications
|
34
|
+
including the International Software Testing Qualifications Board
|
35
|
+
([ISTQB](http://www.istqb.org/)) and various textbooks on Software
|
36
|
+
Quality use the term _[Test
|
37
|
+
Suite](http://glossary.istqb.org/search/test%20suite)_ for this.
|
38
|
+
|
39
|
+
The related term _Test_, as it is used in the Google C++ Testing
|
40
|
+
Framework, is corresponding to the term _[Test
|
41
|
+
Case](http://glossary.istqb.org/search/test%20case)_ of ISTQB and
|
42
|
+
others.
|
43
|
+
|
44
|
+
The term _Test_ is commonly of broad enough sense, including ISTQB's
|
45
|
+
definition of _Test Case_, so it's not much of a problem here. But the
|
46
|
+
term _Test Case_ as used in Google Test is of contradictory sense and thus confusing.
|
47
|
+
|
48
|
+
Unfortunately replacing the term _Test Case_ by _Test Suite_ throughout
|
49
|
+
the Google C++ Testing Framework is not easy without breaking dependent
|
50
|
+
projects, as `TestCase` is part of the public API at various places.
|
51
|
+
|
52
|
+
So for the time being, please be aware of the different definitions of
|
53
|
+
the terms:
|
54
|
+
|
55
|
+
Meaning | Google Test Term | [ISTQB](http://www.istqb.org/) Term
|
56
|
+
------- | ---------------- | -----------------------------------
|
57
|
+
Exercise a particular program path with specific input values and verify the results | [TEST()](#simple-tests) | [Test Case](http://glossary.istqb.org/search/test%20case)
|
58
|
+
A set of several tests related to one component | [Test Case](#basic-concepts) | [Test Suite](http://glossary.istqb.org/search/test%20suite)
|
59
|
+
|
26
60
|
# Setting up a New Test Project #
|
27
61
|
|
28
62
|
To write a test program using Google Test, you need to compile Google
|
@@ -179,7 +213,7 @@ two `string` objects, use `EXPECT_EQ`, `EXPECT_NE`, and etc instead.
|
|
179
213
|
|
180
214
|
| **Fatal assertion** | **Nonfatal assertion** | **Verifies** |
|
181
215
|
|:--------------------|:-----------------------|:-------------|
|
182
|
-
| `ASSERT_STREQ(`_str1_`, `_str2_`);` | `EXPECT_STREQ(`_str1_`, `
|
216
|
+
| `ASSERT_STREQ(`_str1_`, `_str2_`);` | `EXPECT_STREQ(`_str1_`, `_str2_`);` | the two C strings have the same content |
|
183
217
|
| `ASSERT_STRNE(`_str1_`, `_str2_`);` | `EXPECT_STRNE(`_str1_`, `_str2_`);` | the two C strings have different content |
|
184
218
|
| `ASSERT_STRCASEEQ(`_str1_`, `_str2_`);`| `EXPECT_STRCASEEQ(`_str1_`, `_str2_`);` | the two C strings have the same content, ignoring case |
|
185
219
|
| `ASSERT_STRCASENE(`_str1_`, `_str2_`);`| `EXPECT_STRCASENE(`_str1_`, `_str2_`);` | the two C strings have different content, ignoring case |
|
@@ -195,7 +229,7 @@ A `NULL` pointer and an empty string are considered _different_.
|
|
195
229
|
_Availability_: Linux, Windows, Mac.
|
196
230
|
|
197
231
|
See also: For more string comparison tricks (substring, prefix, suffix, and
|
198
|
-
regular expression matching, for example), see the [Advanced Google Test Guide](
|
232
|
+
regular expression matching, for example), see the [Advanced Google Test Guide](advanced.md).
|
199
233
|
|
200
234
|
# Simple Tests #
|
201
235
|
|
@@ -205,7 +239,7 @@ To create a test:
|
|
205
239
|
1. The test's result is determined by the assertions; if any assertion in the test fails (either fatally or non-fatally), or if the test crashes, the entire test fails. Otherwise, it succeeds.
|
206
240
|
|
207
241
|
```
|
208
|
-
TEST(
|
242
|
+
TEST(testCaseName, testName) {
|
209
243
|
... test body ...
|
210
244
|
}
|
211
245
|
```
|
@@ -256,7 +290,7 @@ To create a fixture, just:
|
|
256
290
|
1. Derive a class from `::testing::Test` . Start its body with `protected:` or `public:` as we'll want to access fixture members from sub-classes.
|
257
291
|
1. Inside the class, declare any objects you plan to use.
|
258
292
|
1. If necessary, write a default constructor or `SetUp()` function to prepare the objects for each test. A common mistake is to spell `SetUp()` as `Setup()` with a small `u` - don't let that happen to you.
|
259
|
-
1. If necessary, write a destructor or `TearDown()` function to release any resources you allocated in `SetUp()` . To learn when you should use the constructor/destructor and when you should use `SetUp()/TearDown()`, read this [FAQ entry](
|
293
|
+
1. If necessary, write a destructor or `TearDown()` function to release any resources you allocated in `SetUp()` . To learn when you should use the constructor/destructor and when you should use `SetUp()/TearDown()`, read this [FAQ entry](faq.md#should-i-use-the-constructordestructor-of-the-test-fixture-or-the-set-uptear-down-function).
|
260
294
|
1. If needed, define subroutines for your tests to share.
|
261
295
|
|
262
296
|
When using a fixture, use `TEST_F()` instead of `TEST()` as it allows you to
|
@@ -281,7 +315,7 @@ declaration`".
|
|
281
315
|
|
282
316
|
For each test defined with `TEST_F()`, Google Test will:
|
283
317
|
1. Create a _fresh_ test fixture at runtime
|
284
|
-
1. Immediately initialize it via `SetUp()`
|
318
|
+
1. Immediately initialize it via `SetUp()`
|
285
319
|
1. Run the test
|
286
320
|
1. Clean up by calling `TearDown()`
|
287
321
|
1. Delete the test fixture. Note that different tests in the same test case have different test fixture objects, and Google Test always deletes a test fixture before it creates the next one. Google Test does not reuse the same test fixture for multiple tests. Any changes one test makes to the fixture do not affect other tests.
|
@@ -382,7 +416,7 @@ When invoked, the `RUN_ALL_TESTS()` macro:
|
|
382
416
|
1. Restores the state of all Google Test flags.
|
383
417
|
1. Repeats the above steps for the next test, until all tests have run.
|
384
418
|
|
385
|
-
In addition, if the
|
419
|
+
In addition, if the test fixture's constructor generates a fatal failure in
|
386
420
|
step 2, there is no point for step 3 - 5 and they are thus skipped. Similarly,
|
387
421
|
if step 3 generates a fatal failure, step 4 will be skipped.
|
388
422
|
|
@@ -460,7 +494,7 @@ int main(int argc, char **argv) {
|
|
460
494
|
|
461
495
|
The `::testing::InitGoogleTest()` function parses the command line for Google
|
462
496
|
Test flags, and removes all recognized flags. This allows the user to control a
|
463
|
-
test program's behavior via various flags, which we'll cover in [AdvancedGuide](
|
497
|
+
test program's behavior via various flags, which we'll cover in [AdvancedGuide](advanced.md).
|
464
498
|
You must call this function before calling `RUN_ALL_TESTS()`, or the flags
|
465
499
|
won't be properly initialized.
|
466
500
|
|
@@ -488,8 +522,8 @@ There is one more pitfall, though. If you use Google Test as a static library (t
|
|
488
522
|
# Where to Go from Here #
|
489
523
|
|
490
524
|
Congratulations! You've learned the Google Test basics. You can start writing
|
491
|
-
and running Google Test tests, read some [samples](
|
492
|
-
[AdvancedGuide](
|
525
|
+
and running Google Test tests, read some [samples](samples.md), or continue with
|
526
|
+
[AdvancedGuide](advanced.md), which describes many more useful Google Test features.
|
493
527
|
|
494
528
|
# Known Limitations #
|
495
529
|
|