rj_schema 0.2.4 → 0.2.5
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/CHANGELOG.md +158 -0
- data/ext/rj_schema/rapidjson/CMakeLists.txt +226 -0
- data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +30 -0
- data/ext/rj_schema/rapidjson/RapidJSON.pc.in +7 -0
- data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +25 -0
- data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +10 -0
- data/ext/rj_schema/rapidjson/appveyor.yml +54 -0
- data/ext/rj_schema/rapidjson/bin/data/abcde.txt +1 -0
- data/ext/rj_schema/rapidjson/bin/data/glossary.json +22 -0
- data/ext/rj_schema/rapidjson/bin/data/menu.json +27 -0
- data/ext/rj_schema/rapidjson/bin/data/readme.txt +1 -0
- data/ext/rj_schema/rapidjson/bin/data/sample.json +3315 -0
- data/ext/rj_schema/rapidjson/bin/data/webapp.json +88 -0
- data/ext/rj_schema/rapidjson/bin/data/widget.json +26 -0
- data/ext/rj_schema/rapidjson/bin/draft-04/schema +150 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16be.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16bebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16le.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16lebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32be.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32bebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32le.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32lebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf8.json +7 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +7 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +2 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +2 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +58 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +1 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +6 -0
- data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +3 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +19 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +148 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +283 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +3 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +3 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +8 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +82 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +88 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +49 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +108 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +80 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +60 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +71 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +94 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +46 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +33 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +42 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +33 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +42 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +107 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +222 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +18 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +15 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +34 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +110 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +92 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +159 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +74 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +53 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +474 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +79 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +82 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +88 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +112 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +68 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +49 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +32 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +113 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +72 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +46 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +33 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +42 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +33 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +28 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +42 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +60 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +96 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +68 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +107 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +148 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +15 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +34 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +110 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +92 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +159 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +74 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +39 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +330 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +79 -0
- data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +8 -0
- data/ext/rj_schema/rapidjson/bin/types/booleans.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/floats.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/guids.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/integers.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/mixed.json +592 -0
- data/ext/rj_schema/rapidjson/bin/types/nulls.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +102 -0
- data/ext/rj_schema/rapidjson/bin/types/readme.txt +1 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +45 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/README.md +7 -0
- data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +38 -0
- data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +27 -0
- data/ext/rj_schema/rapidjson/doc/Doxyfile.in +2369 -0
- data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +2369 -0
- data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +50 -0
- data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +65 -0
- data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +62 -0
- data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/makefile +8 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +47 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +62 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +60 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +56 -0
- data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +54 -0
- data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +58 -0
- data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +73 -0
- data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
- data/ext/rj_schema/rapidjson/doc/dom.md +281 -0
- data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +285 -0
- data/ext/rj_schema/rapidjson/doc/encoding.md +146 -0
- data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +152 -0
- data/ext/rj_schema/rapidjson/doc/faq.md +289 -0
- data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +290 -0
- data/ext/rj_schema/rapidjson/doc/features.md +104 -0
- data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +103 -0
- data/ext/rj_schema/rapidjson/doc/internals.md +368 -0
- data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +363 -0
- data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
- data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +119 -0
- data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +194 -0
- data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +274 -0
- data/ext/rj_schema/rapidjson/doc/misc/footer.html +11 -0
- data/ext/rj_schema/rapidjson/doc/misc/header.html +24 -0
- data/ext/rj_schema/rapidjson/doc/npm.md +31 -0
- data/ext/rj_schema/rapidjson/doc/performance.md +26 -0
- data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +26 -0
- data/ext/rj_schema/rapidjson/doc/pointer.md +234 -0
- data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +234 -0
- data/ext/rj_schema/rapidjson/doc/sax.md +509 -0
- data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +487 -0
- data/ext/rj_schema/rapidjson/doc/schema.md +505 -0
- data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +237 -0
- data/ext/rj_schema/rapidjson/doc/stream.md +429 -0
- data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +429 -0
- data/ext/rj_schema/rapidjson/doc/tutorial.md +536 -0
- data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +535 -0
- data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +8 -0
- data/ext/rj_schema/rapidjson/example/CMakeLists.txt +46 -0
- data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +292 -0
- data/ext/rj_schema/rapidjson/example/archiver/archiver.h +145 -0
- data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +287 -0
- data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +67 -0
- data/ext/rj_schema/rapidjson/example/condense/condense.cpp +32 -0
- data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +135 -0
- data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +170 -0
- data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +207 -0
- data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +350 -0
- data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +105 -0
- data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +176 -0
- data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +30 -0
- data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +56 -0
- data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +78 -0
- data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +173 -0
- data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +29 -0
- data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +53 -0
- data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +42 -0
- data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +36 -0
- data/ext/rj_schema/rapidjson/example/sortkeys/sortkeys.cpp +62 -0
- data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +151 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +284 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +78 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/document.h +2732 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +299 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +716 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +74 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +161 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +99 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +104 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +151 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +290 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/clzll.h +71 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +257 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +245 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +78 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +308 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +186 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +55 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +739 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +232 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +69 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +290 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +46 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +128 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +70 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +71 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +316 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +300 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +81 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +1415 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +277 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +676 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +2236 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +2496 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +223 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +121 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +710 -0
- data/ext/rj_schema/rapidjson/include_dirs.js +2 -0
- data/ext/rj_schema/rapidjson/library.json +15 -0
- data/ext/rj_schema/rapidjson/license.txt +57 -0
- data/ext/rj_schema/rapidjson/package.json +24 -0
- data/ext/rj_schema/rapidjson/rapidjson.autopkg +77 -0
- data/ext/rj_schema/rapidjson/readme.md +210 -0
- data/ext/rj_schema/rapidjson/readme.zh-cn.md +152 -0
- data/ext/rj_schema/rapidjson/test/CMakeLists.txt +20 -0
- data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +28 -0
- data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +974 -0
- data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +24 -0
- data/ext/rj_schema/rapidjson/test/perftest/perftest.h +185 -0
- data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +166 -0
- data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +546 -0
- data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +223 -0
- data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +92 -0
- data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +100 -0
- data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +138 -0
- data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +115 -0
- data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +672 -0
- data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +98 -0
- data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +313 -0
- data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +451 -0
- data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +155 -0
- data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +230 -0
- data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +181 -0
- data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +160 -0
- data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +143 -0
- data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +70 -0
- data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +92 -0
- data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +1638 -0
- data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +373 -0
- data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +2225 -0
- data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +639 -0
- data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +2072 -0
- data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +219 -0
- data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +30 -0
- data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +192 -0
- data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +132 -0
- data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +51 -0
- data/ext/rj_schema/rapidjson/test/unittest/unittest.h +143 -0
- data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +1851 -0
- data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +598 -0
- data/ext/rj_schema/rapidjson/test/valgrind.supp +17 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/BUILD.bazel +175 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +33 -0
- 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 +122 -0
- 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 +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +242 -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 +344 -0
- 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 +146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +564 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +3660 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +280 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +15 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +447 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +627 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +19 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +1262 -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 +2571 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +833 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +1379 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +347 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +2258 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +675 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +458 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +178 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +5255 -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 +91 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +1918 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +95 -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 +38 -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 +286 -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 +574 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +87 -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 +46 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +145 -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 +151 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +176 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +46 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +145 -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 +151 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +176 -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 +34 -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 +204 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +573 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +883 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +205 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +54 -0
- 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 +1575 -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 +1230 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +647 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +129 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +1341 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +718 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +6767 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +710 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +511 -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 +2771 -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 +691 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +183 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +310 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +317 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +323 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +262 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +110 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +157 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +312 -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 +339 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +341 -0
- 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 +280 -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/Pkgconfig.md +146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/advanced.md +2416 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/faq.md +1092 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/primer.md +536 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/samples.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +342 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +249 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +1438 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +501 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +1082 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +231 -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 +264 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +2332 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +357 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +61 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +70 -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 +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +275 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +205 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +1277 -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 +5139 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +279 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +723 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +100 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +2687 -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 +3347 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +313 -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/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 +127 -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 +140 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +154 -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 +110 -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 +152 -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 +49 -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 +225 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +118 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +174 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +157 -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 +1536 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +385 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +1175 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +1277 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +458 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +102 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +119 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +5846 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +38 -0
- 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_ex_test.cc +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +1424 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +652 -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 +213 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +61 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +1110 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +53 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +1303 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +1737 -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_assert_by_exception_test.cc +119 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +210 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +87 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +235 -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 +129 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +63 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +119 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +124 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +189 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +638 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +138 -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_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 +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 +344 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +1067 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +781 -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 +236 -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 +250 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +318 -0
- 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_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 +69 -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 +7797 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +48 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +48 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +140 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +378 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +179 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +196 -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 +1182 -0
- data/ext/rj_schema/rapidjson/travis-doxygen.sh +128 -0
- metadata +613 -1
@@ -0,0 +1,59 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
#
|
3
|
+
# Copyright 2007 Neal Norwitz
|
4
|
+
# Portions Copyright 2007 Google Inc.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
|
18
|
+
"""C++ keywords and helper utilities for determining keywords."""
|
19
|
+
|
20
|
+
__author__ = 'nnorwitz@google.com (Neal Norwitz)'
|
21
|
+
|
22
|
+
|
23
|
+
try:
|
24
|
+
# Python 3.x
|
25
|
+
import builtins
|
26
|
+
except ImportError:
|
27
|
+
# Python 2.x
|
28
|
+
import __builtin__ as builtins
|
29
|
+
|
30
|
+
|
31
|
+
if not hasattr(builtins, 'set'):
|
32
|
+
# Nominal support for Python 2.3.
|
33
|
+
from sets import Set as set
|
34
|
+
|
35
|
+
|
36
|
+
TYPES = set('bool char int long short double float void wchar_t unsigned signed'.split())
|
37
|
+
TYPE_MODIFIERS = set('auto register const inline extern static virtual volatile mutable'.split())
|
38
|
+
ACCESS = set('public protected private friend'.split())
|
39
|
+
|
40
|
+
CASTS = set('static_cast const_cast dynamic_cast reinterpret_cast'.split())
|
41
|
+
|
42
|
+
OTHERS = set('true false asm class namespace using explicit this operator sizeof'.split())
|
43
|
+
OTHER_TYPES = set('new delete typedef struct union enum typeid typename template'.split())
|
44
|
+
|
45
|
+
CONTROL = set('case switch default if else return goto'.split())
|
46
|
+
EXCEPTION = set('try catch throw'.split())
|
47
|
+
LOOP = set('while do for break continue'.split())
|
48
|
+
|
49
|
+
ALL = TYPES | TYPE_MODIFIERS | ACCESS | CASTS | OTHERS | OTHER_TYPES | CONTROL | EXCEPTION | LOOP
|
50
|
+
|
51
|
+
|
52
|
+
def IsKeyword(token):
|
53
|
+
return token in ALL
|
54
|
+
|
55
|
+
def IsBuiltinType(token):
|
56
|
+
if token in ('virtual', 'inline'):
|
57
|
+
# These only apply to methods, they can't be types by themselves.
|
58
|
+
return False
|
59
|
+
return token in TYPES or token in TYPE_MODIFIERS
|
@@ -0,0 +1,287 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
#
|
3
|
+
# Copyright 2007 Neal Norwitz
|
4
|
+
# Portions Copyright 2007 Google Inc.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
|
18
|
+
"""Tokenize C++ source code."""
|
19
|
+
|
20
|
+
__author__ = 'nnorwitz@google.com (Neal Norwitz)'
|
21
|
+
|
22
|
+
|
23
|
+
try:
|
24
|
+
# Python 3.x
|
25
|
+
import builtins
|
26
|
+
except ImportError:
|
27
|
+
# Python 2.x
|
28
|
+
import __builtin__ as builtins
|
29
|
+
|
30
|
+
|
31
|
+
import sys
|
32
|
+
|
33
|
+
from cpp import utils
|
34
|
+
|
35
|
+
|
36
|
+
if not hasattr(builtins, 'set'):
|
37
|
+
# Nominal support for Python 2.3.
|
38
|
+
from sets import Set as set
|
39
|
+
|
40
|
+
|
41
|
+
# Add $ as a valid identifier char since so much code uses it.
|
42
|
+
_letters = 'abcdefghijklmnopqrstuvwxyz'
|
43
|
+
VALID_IDENTIFIER_CHARS = set(_letters + _letters.upper() + '_0123456789$')
|
44
|
+
HEX_DIGITS = set('0123456789abcdefABCDEF')
|
45
|
+
INT_OR_FLOAT_DIGITS = set('01234567890eE-+')
|
46
|
+
|
47
|
+
|
48
|
+
# C++0x string preffixes.
|
49
|
+
_STR_PREFIXES = set(('R', 'u8', 'u8R', 'u', 'uR', 'U', 'UR', 'L', 'LR'))
|
50
|
+
|
51
|
+
|
52
|
+
# Token types.
|
53
|
+
UNKNOWN = 'UNKNOWN'
|
54
|
+
SYNTAX = 'SYNTAX'
|
55
|
+
CONSTANT = 'CONSTANT'
|
56
|
+
NAME = 'NAME'
|
57
|
+
PREPROCESSOR = 'PREPROCESSOR'
|
58
|
+
|
59
|
+
# Where the token originated from. This can be used for backtracking.
|
60
|
+
# It is always set to WHENCE_STREAM in this code.
|
61
|
+
WHENCE_STREAM, WHENCE_QUEUE = range(2)
|
62
|
+
|
63
|
+
|
64
|
+
class Token(object):
|
65
|
+
"""Data container to represent a C++ token.
|
66
|
+
|
67
|
+
Tokens can be identifiers, syntax char(s), constants, or
|
68
|
+
pre-processor directives.
|
69
|
+
|
70
|
+
start contains the index of the first char of the token in the source
|
71
|
+
end contains the index of the last char of the token in the source
|
72
|
+
"""
|
73
|
+
|
74
|
+
def __init__(self, token_type, name, start, end):
|
75
|
+
self.token_type = token_type
|
76
|
+
self.name = name
|
77
|
+
self.start = start
|
78
|
+
self.end = end
|
79
|
+
self.whence = WHENCE_STREAM
|
80
|
+
|
81
|
+
def __str__(self):
|
82
|
+
if not utils.DEBUG:
|
83
|
+
return 'Token(%r)' % self.name
|
84
|
+
return 'Token(%r, %s, %s)' % (self.name, self.start, self.end)
|
85
|
+
|
86
|
+
__repr__ = __str__
|
87
|
+
|
88
|
+
|
89
|
+
def _GetString(source, start, i):
|
90
|
+
i = source.find('"', i+1)
|
91
|
+
while source[i-1] == '\\':
|
92
|
+
# Count the trailing backslashes.
|
93
|
+
backslash_count = 1
|
94
|
+
j = i - 2
|
95
|
+
while source[j] == '\\':
|
96
|
+
backslash_count += 1
|
97
|
+
j -= 1
|
98
|
+
# When trailing backslashes are even, they escape each other.
|
99
|
+
if (backslash_count % 2) == 0:
|
100
|
+
break
|
101
|
+
i = source.find('"', i+1)
|
102
|
+
return i + 1
|
103
|
+
|
104
|
+
|
105
|
+
def _GetChar(source, start, i):
|
106
|
+
# NOTE(nnorwitz): may not be quite correct, should be good enough.
|
107
|
+
i = source.find("'", i+1)
|
108
|
+
while source[i-1] == '\\':
|
109
|
+
# Need to special case '\\'.
|
110
|
+
if (i - 2) > start and source[i-2] == '\\':
|
111
|
+
break
|
112
|
+
i = source.find("'", i+1)
|
113
|
+
# Try to handle unterminated single quotes (in a #if 0 block).
|
114
|
+
if i < 0:
|
115
|
+
i = start
|
116
|
+
return i + 1
|
117
|
+
|
118
|
+
|
119
|
+
def GetTokens(source):
|
120
|
+
"""Returns a sequence of Tokens.
|
121
|
+
|
122
|
+
Args:
|
123
|
+
source: string of C++ source code.
|
124
|
+
|
125
|
+
Yields:
|
126
|
+
Token that represents the next token in the source.
|
127
|
+
"""
|
128
|
+
# Cache various valid character sets for speed.
|
129
|
+
valid_identifier_chars = VALID_IDENTIFIER_CHARS
|
130
|
+
hex_digits = HEX_DIGITS
|
131
|
+
int_or_float_digits = INT_OR_FLOAT_DIGITS
|
132
|
+
int_or_float_digits2 = int_or_float_digits | set('.')
|
133
|
+
|
134
|
+
# Only ignore errors while in a #if 0 block.
|
135
|
+
ignore_errors = False
|
136
|
+
count_ifs = 0
|
137
|
+
|
138
|
+
i = 0
|
139
|
+
end = len(source)
|
140
|
+
while i < end:
|
141
|
+
# Skip whitespace.
|
142
|
+
while i < end and source[i].isspace():
|
143
|
+
i += 1
|
144
|
+
if i >= end:
|
145
|
+
return
|
146
|
+
|
147
|
+
token_type = UNKNOWN
|
148
|
+
start = i
|
149
|
+
c = source[i]
|
150
|
+
if c.isalpha() or c == '_': # Find a string token.
|
151
|
+
token_type = NAME
|
152
|
+
while source[i] in valid_identifier_chars:
|
153
|
+
i += 1
|
154
|
+
# String and character constants can look like a name if
|
155
|
+
# they are something like L"".
|
156
|
+
if (source[i] == "'" and (i - start) == 1 and
|
157
|
+
source[start:i] in 'uUL'):
|
158
|
+
# u, U, and L are valid C++0x character preffixes.
|
159
|
+
token_type = CONSTANT
|
160
|
+
i = _GetChar(source, start, i)
|
161
|
+
elif source[i] == "'" and source[start:i] in _STR_PREFIXES:
|
162
|
+
token_type = CONSTANT
|
163
|
+
i = _GetString(source, start, i)
|
164
|
+
elif c == '/' and source[i+1] == '/': # Find // comments.
|
165
|
+
i = source.find('\n', i)
|
166
|
+
if i == -1: # Handle EOF.
|
167
|
+
i = end
|
168
|
+
continue
|
169
|
+
elif c == '/' and source[i+1] == '*': # Find /* comments. */
|
170
|
+
i = source.find('*/', i) + 2
|
171
|
+
continue
|
172
|
+
elif c in ':+-<>&|*=': # : or :: (plus other chars).
|
173
|
+
token_type = SYNTAX
|
174
|
+
i += 1
|
175
|
+
new_ch = source[i]
|
176
|
+
if new_ch == c and c != '>': # Treat ">>" as two tokens.
|
177
|
+
i += 1
|
178
|
+
elif c == '-' and new_ch == '>':
|
179
|
+
i += 1
|
180
|
+
elif new_ch == '=':
|
181
|
+
i += 1
|
182
|
+
elif c in '()[]{}~!?^%;/.,': # Handle single char tokens.
|
183
|
+
token_type = SYNTAX
|
184
|
+
i += 1
|
185
|
+
if c == '.' and source[i].isdigit():
|
186
|
+
token_type = CONSTANT
|
187
|
+
i += 1
|
188
|
+
while source[i] in int_or_float_digits:
|
189
|
+
i += 1
|
190
|
+
# Handle float suffixes.
|
191
|
+
for suffix in ('l', 'f'):
|
192
|
+
if suffix == source[i:i+1].lower():
|
193
|
+
i += 1
|
194
|
+
break
|
195
|
+
elif c.isdigit(): # Find integer.
|
196
|
+
token_type = CONSTANT
|
197
|
+
if c == '0' and source[i+1] in 'xX':
|
198
|
+
# Handle hex digits.
|
199
|
+
i += 2
|
200
|
+
while source[i] in hex_digits:
|
201
|
+
i += 1
|
202
|
+
else:
|
203
|
+
while source[i] in int_or_float_digits2:
|
204
|
+
i += 1
|
205
|
+
# Handle integer (and float) suffixes.
|
206
|
+
for suffix in ('ull', 'll', 'ul', 'l', 'f', 'u'):
|
207
|
+
size = len(suffix)
|
208
|
+
if suffix == source[i:i+size].lower():
|
209
|
+
i += size
|
210
|
+
break
|
211
|
+
elif c == '"': # Find string.
|
212
|
+
token_type = CONSTANT
|
213
|
+
i = _GetString(source, start, i)
|
214
|
+
elif c == "'": # Find char.
|
215
|
+
token_type = CONSTANT
|
216
|
+
i = _GetChar(source, start, i)
|
217
|
+
elif c == '#': # Find pre-processor command.
|
218
|
+
token_type = PREPROCESSOR
|
219
|
+
got_if = source[i:i+3] == '#if' and source[i+3:i+4].isspace()
|
220
|
+
if got_if:
|
221
|
+
count_ifs += 1
|
222
|
+
elif source[i:i+6] == '#endif':
|
223
|
+
count_ifs -= 1
|
224
|
+
if count_ifs == 0:
|
225
|
+
ignore_errors = False
|
226
|
+
|
227
|
+
# TODO(nnorwitz): handle preprocessor statements (\ continuations).
|
228
|
+
while 1:
|
229
|
+
i1 = source.find('\n', i)
|
230
|
+
i2 = source.find('//', i)
|
231
|
+
i3 = source.find('/*', i)
|
232
|
+
i4 = source.find('"', i)
|
233
|
+
# NOTE(nnorwitz): doesn't handle comments in #define macros.
|
234
|
+
# Get the first important symbol (newline, comment, EOF/end).
|
235
|
+
i = min([x for x in (i1, i2, i3, i4, end) if x != -1])
|
236
|
+
|
237
|
+
# Handle #include "dir//foo.h" properly.
|
238
|
+
if source[i] == '"':
|
239
|
+
i = source.find('"', i+1) + 1
|
240
|
+
assert i > 0
|
241
|
+
continue
|
242
|
+
# Keep going if end of the line and the line ends with \.
|
243
|
+
if not (i == i1 and source[i-1] == '\\'):
|
244
|
+
if got_if:
|
245
|
+
condition = source[start+4:i].lstrip()
|
246
|
+
if (condition.startswith('0') or
|
247
|
+
condition.startswith('(0)')):
|
248
|
+
ignore_errors = True
|
249
|
+
break
|
250
|
+
i += 1
|
251
|
+
elif c == '\\': # Handle \ in code.
|
252
|
+
# This is different from the pre-processor \ handling.
|
253
|
+
i += 1
|
254
|
+
continue
|
255
|
+
elif ignore_errors:
|
256
|
+
# The tokenizer seems to be in pretty good shape. This
|
257
|
+
# raise is conditionally disabled so that bogus code
|
258
|
+
# in an #if 0 block can be handled. Since we will ignore
|
259
|
+
# it anyways, this is probably fine. So disable the
|
260
|
+
# exception and return the bogus char.
|
261
|
+
i += 1
|
262
|
+
else:
|
263
|
+
sys.stderr.write('Got invalid token in %s @ %d token:%s: %r\n' %
|
264
|
+
('?', i, c, source[i-10:i+10]))
|
265
|
+
raise RuntimeError('unexpected token')
|
266
|
+
|
267
|
+
if i <= 0:
|
268
|
+
print('Invalid index, exiting now.')
|
269
|
+
return
|
270
|
+
yield Token(token_type, source[start:i], start, i)
|
271
|
+
|
272
|
+
|
273
|
+
if __name__ == '__main__':
|
274
|
+
def main(argv):
|
275
|
+
"""Driver mostly for testing purposes."""
|
276
|
+
for filename in argv[1:]:
|
277
|
+
source = utils.ReadFile(filename)
|
278
|
+
if source is None:
|
279
|
+
continue
|
280
|
+
|
281
|
+
for token in GetTokens(source):
|
282
|
+
print('%-12s: %s' % (token.token_type, token.name))
|
283
|
+
# print('\r%6.2f%%' % (100.0 * index / token.end),)
|
284
|
+
sys.stdout.write('\n')
|
285
|
+
|
286
|
+
|
287
|
+
main(sys.argv)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
#
|
3
|
+
# Copyright 2007 Neal Norwitz
|
4
|
+
# Portions Copyright 2007 Google Inc.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
|
18
|
+
"""Generic utilities for C++ parsing."""
|
19
|
+
|
20
|
+
__author__ = 'nnorwitz@google.com (Neal Norwitz)'
|
21
|
+
|
22
|
+
|
23
|
+
import sys
|
24
|
+
|
25
|
+
|
26
|
+
# Set to True to see the start/end token indices.
|
27
|
+
DEBUG = True
|
28
|
+
|
29
|
+
|
30
|
+
def ReadFile(filename, print_error=True):
|
31
|
+
"""Returns the contents of a file."""
|
32
|
+
try:
|
33
|
+
fp = open(filename)
|
34
|
+
try:
|
35
|
+
return fp.read()
|
36
|
+
finally:
|
37
|
+
fp.close()
|
38
|
+
except IOError:
|
39
|
+
if print_error:
|
40
|
+
print('Error reading %s: %s' % (filename, sys.exc_info()[1]))
|
41
|
+
return None
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
#
|
3
|
+
# Copyright 2008 Google Inc. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
"""Driver for starting up Google Mock class generator."""
|
18
|
+
|
19
|
+
__author__ = 'nnorwitz@google.com (Neal Norwitz)'
|
20
|
+
|
21
|
+
import os
|
22
|
+
import sys
|
23
|
+
|
24
|
+
if __name__ == '__main__':
|
25
|
+
# Add the directory of this script to the path so we can import gmock_class.
|
26
|
+
sys.path.append(os.path.dirname(__file__))
|
27
|
+
|
28
|
+
from cpp import gmock_class
|
29
|
+
# Fix the docstring in case they require the usage.
|
30
|
+
gmock_class.__doc__ = gmock_class.__doc__.replace('gmock_class.py', __file__)
|
31
|
+
gmock_class.main()
|
@@ -0,0 +1,303 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
# These variables are automatically filled in by the configure script.
|
4
|
+
name="@PACKAGE_TARNAME@"
|
5
|
+
version="@PACKAGE_VERSION@"
|
6
|
+
|
7
|
+
show_usage()
|
8
|
+
{
|
9
|
+
echo "Usage: gmock-config [OPTIONS...]"
|
10
|
+
}
|
11
|
+
|
12
|
+
show_help()
|
13
|
+
{
|
14
|
+
show_usage
|
15
|
+
cat <<\EOF
|
16
|
+
|
17
|
+
The `gmock-config' script provides access to the necessary compile and linking
|
18
|
+
flags to connect with Google C++ Mocking Framework, both in a build prior to
|
19
|
+
installation, and on the system proper after installation. The installation
|
20
|
+
overrides may be issued in combination with any other queries, but will only
|
21
|
+
affect installation queries if called on a built but not installed gmock. The
|
22
|
+
installation queries may not be issued with any other types of queries, and
|
23
|
+
only one installation query may be made at a time. The version queries and
|
24
|
+
compiler flag queries may be combined as desired but not mixed. Different
|
25
|
+
version queries are always combined with logical "and" semantics, and only the
|
26
|
+
last of any particular query is used while all previous ones ignored. All
|
27
|
+
versions must be specified as a sequence of numbers separated by periods.
|
28
|
+
Compiler flag queries output the union of the sets of flags when combined.
|
29
|
+
|
30
|
+
Examples:
|
31
|
+
gmock-config --min-version=1.0 || echo "Insufficient Google Mock version."
|
32
|
+
|
33
|
+
g++ $(gmock-config --cppflags --cxxflags) -o foo.o -c foo.cpp
|
34
|
+
g++ $(gmock-config --ldflags --libs) -o foo foo.o
|
35
|
+
|
36
|
+
# When using a built but not installed Google Mock:
|
37
|
+
g++ $(../../my_gmock_build/scripts/gmock-config ...) ...
|
38
|
+
|
39
|
+
# When using an installed Google Mock, but with installation overrides:
|
40
|
+
export GMOCK_PREFIX="/opt"
|
41
|
+
g++ $(gmock-config --libdir="/opt/lib64" ...) ...
|
42
|
+
|
43
|
+
Help:
|
44
|
+
--usage brief usage information
|
45
|
+
--help display this help message
|
46
|
+
|
47
|
+
Installation Overrides:
|
48
|
+
--prefix=<dir> overrides the installation prefix
|
49
|
+
--exec-prefix=<dir> overrides the executable installation prefix
|
50
|
+
--libdir=<dir> overrides the library installation prefix
|
51
|
+
--includedir=<dir> overrides the header file installation prefix
|
52
|
+
|
53
|
+
Installation Queries:
|
54
|
+
--prefix installation prefix
|
55
|
+
--exec-prefix executable installation prefix
|
56
|
+
--libdir library installation directory
|
57
|
+
--includedir header file installation directory
|
58
|
+
--version the version of the Google Mock installation
|
59
|
+
|
60
|
+
Version Queries:
|
61
|
+
--min-version=VERSION return 0 if the version is at least VERSION
|
62
|
+
--exact-version=VERSION return 0 if the version is exactly VERSION
|
63
|
+
--max-version=VERSION return 0 if the version is at most VERSION
|
64
|
+
|
65
|
+
Compilation Flag Queries:
|
66
|
+
--cppflags compile flags specific to the C-like preprocessors
|
67
|
+
--cxxflags compile flags appropriate for C++ programs
|
68
|
+
--ldflags linker flags
|
69
|
+
--libs libraries for linking
|
70
|
+
|
71
|
+
EOF
|
72
|
+
}
|
73
|
+
|
74
|
+
# This function bounds our version with a min and a max. It uses some clever
|
75
|
+
# POSIX-compliant variable expansion to portably do all the work in the shell
|
76
|
+
# and avoid any dependency on a particular "sed" or "awk" implementation.
|
77
|
+
# Notable is that it will only ever compare the first 3 components of versions.
|
78
|
+
# Further components will be cleanly stripped off. All versions must be
|
79
|
+
# unadorned, so "v1.0" will *not* work. The minimum version must be in $1, and
|
80
|
+
# the max in $2. TODO(chandlerc@google.com): If this ever breaks, we should
|
81
|
+
# investigate expanding this via autom4te from AS_VERSION_COMPARE rather than
|
82
|
+
# continuing to maintain our own shell version.
|
83
|
+
check_versions()
|
84
|
+
{
|
85
|
+
major_version=${version%%.*}
|
86
|
+
minor_version="0"
|
87
|
+
point_version="0"
|
88
|
+
if test "${version#*.}" != "${version}"; then
|
89
|
+
minor_version=${version#*.}
|
90
|
+
minor_version=${minor_version%%.*}
|
91
|
+
fi
|
92
|
+
if test "${version#*.*.}" != "${version}"; then
|
93
|
+
point_version=${version#*.*.}
|
94
|
+
point_version=${point_version%%.*}
|
95
|
+
fi
|
96
|
+
|
97
|
+
min_version="$1"
|
98
|
+
min_major_version=${min_version%%.*}
|
99
|
+
min_minor_version="0"
|
100
|
+
min_point_version="0"
|
101
|
+
if test "${min_version#*.}" != "${min_version}"; then
|
102
|
+
min_minor_version=${min_version#*.}
|
103
|
+
min_minor_version=${min_minor_version%%.*}
|
104
|
+
fi
|
105
|
+
if test "${min_version#*.*.}" != "${min_version}"; then
|
106
|
+
min_point_version=${min_version#*.*.}
|
107
|
+
min_point_version=${min_point_version%%.*}
|
108
|
+
fi
|
109
|
+
|
110
|
+
max_version="$2"
|
111
|
+
max_major_version=${max_version%%.*}
|
112
|
+
max_minor_version="0"
|
113
|
+
max_point_version="0"
|
114
|
+
if test "${max_version#*.}" != "${max_version}"; then
|
115
|
+
max_minor_version=${max_version#*.}
|
116
|
+
max_minor_version=${max_minor_version%%.*}
|
117
|
+
fi
|
118
|
+
if test "${max_version#*.*.}" != "${max_version}"; then
|
119
|
+
max_point_version=${max_version#*.*.}
|
120
|
+
max_point_version=${max_point_version%%.*}
|
121
|
+
fi
|
122
|
+
|
123
|
+
test $(($major_version)) -lt $(($min_major_version)) && exit 1
|
124
|
+
if test $(($major_version)) -eq $(($min_major_version)); then
|
125
|
+
test $(($minor_version)) -lt $(($min_minor_version)) && exit 1
|
126
|
+
if test $(($minor_version)) -eq $(($min_minor_version)); then
|
127
|
+
test $(($point_version)) -lt $(($min_point_version)) && exit 1
|
128
|
+
fi
|
129
|
+
fi
|
130
|
+
|
131
|
+
test $(($major_version)) -gt $(($max_major_version)) && exit 1
|
132
|
+
if test $(($major_version)) -eq $(($max_major_version)); then
|
133
|
+
test $(($minor_version)) -gt $(($max_minor_version)) && exit 1
|
134
|
+
if test $(($minor_version)) -eq $(($max_minor_version)); then
|
135
|
+
test $(($point_version)) -gt $(($max_point_version)) && exit 1
|
136
|
+
fi
|
137
|
+
fi
|
138
|
+
|
139
|
+
exit 0
|
140
|
+
}
|
141
|
+
|
142
|
+
# Show the usage line when no arguments are specified.
|
143
|
+
if test $# -eq 0; then
|
144
|
+
show_usage
|
145
|
+
exit 1
|
146
|
+
fi
|
147
|
+
|
148
|
+
while test $# -gt 0; do
|
149
|
+
case $1 in
|
150
|
+
--usage) show_usage; exit 0;;
|
151
|
+
--help) show_help; exit 0;;
|
152
|
+
|
153
|
+
# Installation overrides
|
154
|
+
--prefix=*) GMOCK_PREFIX=${1#--prefix=};;
|
155
|
+
--exec-prefix=*) GMOCK_EXEC_PREFIX=${1#--exec-prefix=};;
|
156
|
+
--libdir=*) GMOCK_LIBDIR=${1#--libdir=};;
|
157
|
+
--includedir=*) GMOCK_INCLUDEDIR=${1#--includedir=};;
|
158
|
+
|
159
|
+
# Installation queries
|
160
|
+
--prefix|--exec-prefix|--libdir|--includedir|--version)
|
161
|
+
if test -n "${do_query}"; then
|
162
|
+
show_usage
|
163
|
+
exit 1
|
164
|
+
fi
|
165
|
+
do_query=${1#--}
|
166
|
+
;;
|
167
|
+
|
168
|
+
# Version checking
|
169
|
+
--min-version=*)
|
170
|
+
do_check_versions=yes
|
171
|
+
min_version=${1#--min-version=}
|
172
|
+
;;
|
173
|
+
--max-version=*)
|
174
|
+
do_check_versions=yes
|
175
|
+
max_version=${1#--max-version=}
|
176
|
+
;;
|
177
|
+
--exact-version=*)
|
178
|
+
do_check_versions=yes
|
179
|
+
exact_version=${1#--exact-version=}
|
180
|
+
;;
|
181
|
+
|
182
|
+
# Compiler flag output
|
183
|
+
--cppflags) echo_cppflags=yes;;
|
184
|
+
--cxxflags) echo_cxxflags=yes;;
|
185
|
+
--ldflags) echo_ldflags=yes;;
|
186
|
+
--libs) echo_libs=yes;;
|
187
|
+
|
188
|
+
# Everything else is an error
|
189
|
+
*) show_usage; exit 1;;
|
190
|
+
esac
|
191
|
+
shift
|
192
|
+
done
|
193
|
+
|
194
|
+
# These have defaults filled in by the configure script but can also be
|
195
|
+
# overridden by environment variables or command line parameters.
|
196
|
+
prefix="${GMOCK_PREFIX:-@prefix@}"
|
197
|
+
exec_prefix="${GMOCK_EXEC_PREFIX:-@exec_prefix@}"
|
198
|
+
libdir="${GMOCK_LIBDIR:-@libdir@}"
|
199
|
+
includedir="${GMOCK_INCLUDEDIR:-@includedir@}"
|
200
|
+
|
201
|
+
# We try and detect if our binary is not located at its installed location. If
|
202
|
+
# it's not, we provide variables pointing to the source and build tree rather
|
203
|
+
# than to the install tree. We also locate Google Test using the configured
|
204
|
+
# gtest-config script rather than searching the PATH and our bindir for one.
|
205
|
+
# This allows building against a just-built gmock rather than an installed
|
206
|
+
# gmock.
|
207
|
+
bindir="@bindir@"
|
208
|
+
this_relative_bindir=`dirname $0`
|
209
|
+
this_bindir=`cd ${this_relative_bindir}; pwd -P`
|
210
|
+
if test "${this_bindir}" = "${this_bindir%${bindir}}"; then
|
211
|
+
# The path to the script doesn't end in the bindir sequence from Autoconf,
|
212
|
+
# assume that we are in a build tree.
|
213
|
+
build_dir=`dirname ${this_bindir}`
|
214
|
+
src_dir=`cd ${this_bindir}/@top_srcdir@; pwd -P`
|
215
|
+
|
216
|
+
# TODO(chandlerc@google.com): This is a dangerous dependency on libtool, we
|
217
|
+
# should work to remove it, and/or remove libtool altogether, replacing it
|
218
|
+
# with direct references to the library and a link path.
|
219
|
+
gmock_libs="${build_dir}/lib/libgmock.la"
|
220
|
+
gmock_ldflags=""
|
221
|
+
|
222
|
+
# We provide hooks to include from either the source or build dir, where the
|
223
|
+
# build dir is always preferred. This will potentially allow us to write
|
224
|
+
# build rules for generated headers and have them automatically be preferred
|
225
|
+
# over provided versions.
|
226
|
+
gmock_cppflags="-I${build_dir}/include -I${src_dir}/include"
|
227
|
+
gmock_cxxflags=""
|
228
|
+
|
229
|
+
# Directly invoke the gtest-config script used during the build process.
|
230
|
+
gtest_config="@GTEST_CONFIG@"
|
231
|
+
else
|
232
|
+
# We're using an installed gmock, although it may be staged under some
|
233
|
+
# prefix. Assume (as our own libraries do) that we can resolve the prefix,
|
234
|
+
# and are present in the dynamic link paths.
|
235
|
+
gmock_ldflags="-L${libdir}"
|
236
|
+
gmock_libs="-l${name}"
|
237
|
+
gmock_cppflags="-I${includedir}"
|
238
|
+
gmock_cxxflags=""
|
239
|
+
|
240
|
+
# We also prefer any gtest-config script installed in our prefix. Lacking
|
241
|
+
# one, we look in the PATH for one.
|
242
|
+
gtest_config="${bindir}/gtest-config"
|
243
|
+
if test ! -x "${gtest_config}"; then
|
244
|
+
gtest_config=`which gtest-config`
|
245
|
+
fi
|
246
|
+
fi
|
247
|
+
|
248
|
+
# Ensure that we have located a Google Test to link against.
|
249
|
+
if ! test -x "${gtest_config}"; then
|
250
|
+
echo "Unable to locate Google Test, check your Google Mock configuration" \
|
251
|
+
"and installation" >&2
|
252
|
+
exit 1
|
253
|
+
elif ! "${gtest_config}" "--exact-version=@GTEST_VERSION@"; then
|
254
|
+
echo "The Google Test found is not the same version as Google Mock was " \
|
255
|
+
"built against" >&2
|
256
|
+
exit 1
|
257
|
+
fi
|
258
|
+
|
259
|
+
# Add the necessary Google Test bits into the various flag variables
|
260
|
+
gmock_cppflags="${gmock_cppflags} `${gtest_config} --cppflags`"
|
261
|
+
gmock_cxxflags="${gmock_cxxflags} `${gtest_config} --cxxflags`"
|
262
|
+
gmock_ldflags="${gmock_ldflags} `${gtest_config} --ldflags`"
|
263
|
+
gmock_libs="${gmock_libs} `${gtest_config} --libs`"
|
264
|
+
|
265
|
+
# Do an installation query if requested.
|
266
|
+
if test -n "$do_query"; then
|
267
|
+
case $do_query in
|
268
|
+
prefix) echo $prefix; exit 0;;
|
269
|
+
exec-prefix) echo $exec_prefix; exit 0;;
|
270
|
+
libdir) echo $libdir; exit 0;;
|
271
|
+
includedir) echo $includedir; exit 0;;
|
272
|
+
version) echo $version; exit 0;;
|
273
|
+
*) show_usage; exit 1;;
|
274
|
+
esac
|
275
|
+
fi
|
276
|
+
|
277
|
+
# Do a version check if requested.
|
278
|
+
if test "$do_check_versions" = "yes"; then
|
279
|
+
# Make sure we didn't receive a bad combination of parameters.
|
280
|
+
test "$echo_cppflags" = "yes" && show_usage && exit 1
|
281
|
+
test "$echo_cxxflags" = "yes" && show_usage && exit 1
|
282
|
+
test "$echo_ldflags" = "yes" && show_usage && exit 1
|
283
|
+
test "$echo_libs" = "yes" && show_usage && exit 1
|
284
|
+
|
285
|
+
if test "$exact_version" != ""; then
|
286
|
+
check_versions $exact_version $exact_version
|
287
|
+
# unreachable
|
288
|
+
else
|
289
|
+
check_versions ${min_version:-0.0.0} ${max_version:-9999.9999.9999}
|
290
|
+
# unreachable
|
291
|
+
fi
|
292
|
+
fi
|
293
|
+
|
294
|
+
# Do the output in the correct order so that these can be used in-line of
|
295
|
+
# a compiler invocation.
|
296
|
+
output=""
|
297
|
+
test "$echo_cppflags" = "yes" && output="$output $gmock_cppflags"
|
298
|
+
test "$echo_cxxflags" = "yes" && output="$output $gmock_cxxflags"
|
299
|
+
test "$echo_ldflags" = "yes" && output="$output $gmock_ldflags"
|
300
|
+
test "$echo_libs" = "yes" && output="$output $gmock_libs"
|
301
|
+
echo $output
|
302
|
+
|
303
|
+
exit 0
|