rj_schema 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +3 -615
- data/ext/rj_schema/rapidjson/CHANGELOG.md +0 -158
- data/ext/rj_schema/rapidjson/CMakeLists.txt +0 -221
- data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +0 -30
- data/ext/rj_schema/rapidjson/RapidJSON.pc.in +0 -7
- data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +0 -15
- data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +0 -10
- data/ext/rj_schema/rapidjson/appveyor.yml +0 -41
- data/ext/rj_schema/rapidjson/bin/data/glossary.json +0 -22
- data/ext/rj_schema/rapidjson/bin/data/menu.json +0 -27
- data/ext/rj_schema/rapidjson/bin/data/readme.txt +0 -1
- data/ext/rj_schema/rapidjson/bin/data/sample.json +0 -3315
- data/ext/rj_schema/rapidjson/bin/data/webapp.json +0 -88
- data/ext/rj_schema/rapidjson/bin/data/widget.json +0 -26
- data/ext/rj_schema/rapidjson/bin/draft-04/schema +0 -150
- 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 +0 -7
- data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +0 -7
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +0 -2
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +0 -2
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +0 -58
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +0 -6
- data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +0 -3
- data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +0 -19
- data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +0 -148
- data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +0 -283
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +0 -3
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +0 -3
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +0 -8
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +0 -82
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +0 -88
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +0 -49
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +0 -108
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +0 -80
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +0 -60
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +0 -71
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +0 -94
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +0 -46
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +0 -33
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +0 -42
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +0 -33
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +0 -42
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +0 -107
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +0 -222
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +0 -18
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +0 -15
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +0 -34
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +0 -110
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +0 -92
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +0 -159
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +0 -74
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +0 -53
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +0 -474
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +0 -79
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +0 -82
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +0 -88
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +0 -112
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +0 -68
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +0 -49
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +0 -32
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +0 -113
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +0 -72
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +0 -46
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +0 -33
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +0 -42
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +0 -33
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +0 -42
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +0 -60
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +0 -96
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +0 -68
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +0 -107
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +0 -148
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +0 -15
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +0 -34
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +0 -110
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +0 -92
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +0 -159
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +0 -74
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +0 -39
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +0 -330
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +0 -79
- data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +0 -8
- data/ext/rj_schema/rapidjson/bin/types/booleans.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/floats.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/guids.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/integers.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/mixed.json +0 -592
- data/ext/rj_schema/rapidjson/bin/types/nulls.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/readme.txt +0 -1
- data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +0 -45
- data/ext/rj_schema/rapidjson/contrib/natvis/README.md +0 -7
- data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +0 -38
- data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +0 -27
- data/ext/rj_schema/rapidjson/doc/Doxyfile.in +0 -2369
- data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +0 -2369
- data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +0 -50
- data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +0 -65
- data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +0 -62
- data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/makefile +0 -8
- data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +0 -47
- data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +0 -62
- data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +0 -60
- data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +0 -56
- data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +0 -54
- data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +0 -58
- data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +0 -73
- data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
- data/ext/rj_schema/rapidjson/doc/dom.md +0 -280
- data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +0 -284
- data/ext/rj_schema/rapidjson/doc/encoding.md +0 -146
- data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +0 -152
- data/ext/rj_schema/rapidjson/doc/faq.md +0 -289
- data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +0 -290
- data/ext/rj_schema/rapidjson/doc/features.md +0 -104
- data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +0 -103
- data/ext/rj_schema/rapidjson/doc/internals.md +0 -368
- data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +0 -363
- data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
- data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +0 -119
- data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +0 -194
- data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +0 -274
- data/ext/rj_schema/rapidjson/doc/misc/footer.html +0 -11
- data/ext/rj_schema/rapidjson/doc/misc/header.html +0 -24
- data/ext/rj_schema/rapidjson/doc/npm.md +0 -31
- data/ext/rj_schema/rapidjson/doc/performance.md +0 -26
- data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +0 -26
- data/ext/rj_schema/rapidjson/doc/pointer.md +0 -234
- data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +0 -234
- data/ext/rj_schema/rapidjson/doc/sax.md +0 -509
- data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +0 -487
- data/ext/rj_schema/rapidjson/doc/schema.md +0 -505
- data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +0 -237
- data/ext/rj_schema/rapidjson/doc/stream.md +0 -429
- data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +0 -429
- data/ext/rj_schema/rapidjson/doc/tutorial.md +0 -536
- data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +0 -534
- data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +0 -8
- data/ext/rj_schema/rapidjson/example/CMakeLists.txt +0 -45
- data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +0 -292
- data/ext/rj_schema/rapidjson/example/archiver/archiver.h +0 -145
- data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +0 -287
- data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +0 -67
- data/ext/rj_schema/rapidjson/example/condense/condense.cpp +0 -32
- data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +0 -135
- data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +0 -170
- data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +0 -207
- data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +0 -350
- data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +0 -105
- data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +0 -176
- data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +0 -30
- data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +0 -56
- data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +0 -78
- data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +0 -173
- data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +0 -29
- data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +0 -53
- data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +0 -42
- data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +0 -36
- data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +0 -151
- data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +0 -284
- data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -78
- data/ext/rj_schema/rapidjson/include/rapidjson/document.h +0 -2648
- data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +0 -299
- data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +0 -716
- data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +0 -74
- data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +0 -161
- data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +0 -99
- data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +0 -104
- data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +0 -151
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +0 -290
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +0 -271
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +0 -245
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +0 -78
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +0 -308
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +0 -186
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +0 -55
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +0 -732
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +0 -231
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +0 -69
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +0 -290
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +0 -46
- data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +0 -113
- data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +0 -70
- data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +0 -71
- data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -316
- data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -300
- data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +0 -81
- data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +0 -1357
- data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +0 -277
- data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +0 -630
- data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +0 -2230
- data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +0 -2494
- data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +0 -223
- data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +0 -121
- data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +0 -710
- data/ext/rj_schema/rapidjson/include_dirs.js +0 -2
- data/ext/rj_schema/rapidjson/library.json +0 -15
- data/ext/rj_schema/rapidjson/license.txt +0 -57
- data/ext/rj_schema/rapidjson/package.json +0 -24
- data/ext/rj_schema/rapidjson/rapidjson.autopkg +0 -77
- data/ext/rj_schema/rapidjson/readme.md +0 -160
- data/ext/rj_schema/rapidjson/readme.zh-cn.md +0 -152
- data/ext/rj_schema/rapidjson/test/CMakeLists.txt +0 -20
- data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +0 -28
- data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +0 -974
- data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +0 -24
- data/ext/rj_schema/rapidjson/test/perftest/perftest.h +0 -185
- data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +0 -166
- data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +0 -472
- data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +0 -223
- data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +0 -92
- data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +0 -100
- data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +0 -138
- data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +0 -115
- data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +0 -672
- data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +0 -98
- data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +0 -313
- data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +0 -451
- data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +0 -112
- data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +0 -230
- data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +0 -181
- data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +0 -160
- data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +0 -143
- data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +0 -70
- data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +0 -92
- data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +0 -1529
- data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +0 -373
- data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +0 -2190
- data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +0 -638
- data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +0 -2072
- data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +0 -219
- data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +0 -30
- data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +0 -192
- data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +0 -132
- data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +0 -51
- data/ext/rj_schema/rapidjson/test/unittest/unittest.h +0 -140
- data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +0 -1851
- data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +0 -598
- data/ext/rj_schema/rapidjson/test/valgrind.supp +0 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +0 -16
- data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +0 -141
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +0 -202
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +0 -40
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +0 -28
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +0 -224
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +0 -333
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +0 -146
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +0 -562
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +0 -3675
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +0 -280
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +0 -19
- 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/googlemock/include/gmock/gmock-actions.h +0 -1205
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +0 -2377
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +0 -794
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +0 -1095
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +0 -291
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +0 -2179
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +0 -672
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +0 -397
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +0 -161
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +0 -4399
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +0 -246
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +0 -58
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +0 -1847
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +0 -94
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +0 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +0 -10
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +0 -39
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +0 -46
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +0 -279
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +0 -136
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +0 -511
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +0 -91
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +0 -101
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +0 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +0 -191
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +0 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +0 -187
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +0 -201
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +0 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +0 -82
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +0 -19
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +0 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +0 -101
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +0 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +0 -84
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +0 -19
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +0 -90
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +0 -103
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +0 -240
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +0 -203
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +0 -35
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +0 -115
- 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 +0 -1733
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +0 -227
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +0 -448
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +0 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +0 -287
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +0 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +0 -31
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +0 -303
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +0 -640
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +0 -1387
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +0 -78
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +0 -47
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +0 -156
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +0 -174
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +0 -498
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +0 -823
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +0 -183
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +0 -54
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +0 -1411
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +0 -428
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +0 -1228
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +0 -622
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +0 -127
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +0 -1286
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +0 -699
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +0 -5648
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +0 -708
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +0 -424
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +0 -43
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +0 -2644
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +0 -51
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +0 -81
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +0 -108
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +0 -100
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +0 -40
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +0 -40
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +0 -669
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +0 -180
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +0 -291
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +0 -310
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +0 -322
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +0 -220
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +0 -112
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +0 -157
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +0 -286
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +0 -37
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +0 -28
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +0 -310
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +0 -280
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +0 -242
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +0 -138
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +0 -54
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +0 -38
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +0 -40
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +0 -82
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +0 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +0 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +0 -2182
- 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/FAQ.md +0 -1087
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +0 -502
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.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/docs/XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +0 -294
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +0 -250
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +0 -1444
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +0 -510
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +0 -993
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +0 -232
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +0 -179
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +0 -263
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +0 -2236
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +0 -358
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +0 -58
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +0 -69
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +0 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -319
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +0 -206
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +0 -1238
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5146
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -286
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +0 -731
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +0 -2554
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +0 -167
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +0 -3331
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -297
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +0 -363
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +0 -74
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +0 -82
- 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/googletest/samples/prime_tables.h +0 -123
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +0 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +0 -43
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -144
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +0 -153
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +0 -56
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +0 -85
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +0 -109
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +0 -172
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +0 -151
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +0 -46
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +0 -53
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +0 -199
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +0 -224
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +0 -130
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +0 -173
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -160
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +0 -83
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +0 -253
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +0 -730
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +0 -274
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +0 -855
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +0 -158
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +0 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +0 -1387
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +0 -78
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +0 -48
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +0 -1342
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +0 -387
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +0 -1183
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +0 -1259
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +0 -373
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +0 -110
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +0 -118
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +0 -5388
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +0 -38
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +0 -1427
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +0 -662
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +0 -154
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +0 -311
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +0 -159
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +0 -215
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +0 -65
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +0 -1055
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +0 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +0 -1304
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +0 -1635
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +0 -208
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +0 -320
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +0 -380
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +0 -66
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +0 -341
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +0 -47
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +0 -212
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +0 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -237
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +0 -311
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +0 -130
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -71
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +0 -117
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -192
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +0 -636
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -140
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +0 -172
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +0 -46
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +0 -207
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +0 -157
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +0 -56
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +0 -340
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +0 -1062
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +0 -743
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +0 -2427
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +0 -127
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +0 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +0 -253
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +0 -325
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +0 -103
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +0 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -256
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +0 -320
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +0 -92
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +0 -171
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +0 -72
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +0 -70
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +0 -43
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +0 -7706
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -49
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -49
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +0 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +0 -308
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -181
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +0 -194
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +0 -36
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +0 -55
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +0 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +0 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +0 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +0 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +0 -18
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +0 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +0 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +0 -28
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +0 -457
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +0 -62
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +0 -63
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +0 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +0 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +0 -65
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +0 -100
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +0 -1135
- data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
- data/ext/rj_schema/rapidjson/travis-doxygen.sh +0 -121
@@ -1,57 +0,0 @@
|
|
1
|
-
// Copyright 2008, Google Inc.
|
2
|
-
// All rights reserved.
|
3
|
-
//
|
4
|
-
// Redistribution and use in source and binary forms, with or without
|
5
|
-
// modification, are permitted provided that the following conditions are
|
6
|
-
// met:
|
7
|
-
//
|
8
|
-
// * Redistributions of source code must retain the above copyright
|
9
|
-
// notice, this list of conditions and the following disclaimer.
|
10
|
-
// * Redistributions in binary form must reproduce the above
|
11
|
-
// copyright notice, this list of conditions and the following disclaimer
|
12
|
-
// in the documentation and/or other materials provided with the
|
13
|
-
// distribution.
|
14
|
-
// * Neither the name of Google Inc. nor the names of its
|
15
|
-
// contributors may be used to endorse or promote products derived from
|
16
|
-
// this software without specific prior written permission.
|
17
|
-
//
|
18
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
-
//
|
30
|
-
// Authors: vladl@google.com (Vlad Losev)
|
31
|
-
//
|
32
|
-
// The Google C++ Testing Framework (Google Test)
|
33
|
-
//
|
34
|
-
// This header file provides classes and functions used internally
|
35
|
-
// for testing Google Test itself.
|
36
|
-
|
37
|
-
#ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
|
38
|
-
#define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
|
39
|
-
|
40
|
-
#include "gtest/gtest.h"
|
41
|
-
|
42
|
-
#if GTEST_HAS_PARAM_TEST
|
43
|
-
|
44
|
-
// Test fixture for testing definition and instantiation of a test
|
45
|
-
// in separate translation units.
|
46
|
-
class ExternalInstantiationTest : public ::testing::TestWithParam<int> {
|
47
|
-
};
|
48
|
-
|
49
|
-
// Test fixture for testing instantiation of a test in multiple
|
50
|
-
// translation units.
|
51
|
-
class InstantiationInMultipleTranslaionUnitsTest
|
52
|
-
: public ::testing::TestWithParam<int> {
|
53
|
-
};
|
54
|
-
|
55
|
-
#endif // GTEST_HAS_PARAM_TEST
|
56
|
-
|
57
|
-
#endif // GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
|
@@ -1,1304 +0,0 @@
|
|
1
|
-
// Copyright 2008, Google Inc.
|
2
|
-
// All rights reserved.
|
3
|
-
//
|
4
|
-
// Redistribution and use in source and binary forms, with or without
|
5
|
-
// modification, are permitted provided that the following conditions are
|
6
|
-
// met:
|
7
|
-
//
|
8
|
-
// * Redistributions of source code must retain the above copyright
|
9
|
-
// notice, this list of conditions and the following disclaimer.
|
10
|
-
// * Redistributions in binary form must reproduce the above
|
11
|
-
// copyright notice, this list of conditions and the following disclaimer
|
12
|
-
// in the documentation and/or other materials provided with the
|
13
|
-
// distribution.
|
14
|
-
// * Neither the name of Google Inc. nor the names of its
|
15
|
-
// contributors may be used to endorse or promote products derived from
|
16
|
-
// this software without specific prior written permission.
|
17
|
-
//
|
18
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
-
//
|
30
|
-
// Authors: vladl@google.com (Vlad Losev), wan@google.com (Zhanyong Wan)
|
31
|
-
//
|
32
|
-
// This file tests the internal cross-platform support utilities.
|
33
|
-
|
34
|
-
#include "gtest/internal/gtest-port.h"
|
35
|
-
|
36
|
-
#include <stdio.h>
|
37
|
-
|
38
|
-
#if GTEST_OS_MAC
|
39
|
-
# include <time.h>
|
40
|
-
#endif // GTEST_OS_MAC
|
41
|
-
|
42
|
-
#include <list>
|
43
|
-
#include <utility> // For std::pair and std::make_pair.
|
44
|
-
#include <vector>
|
45
|
-
|
46
|
-
#include "gtest/gtest.h"
|
47
|
-
#include "gtest/gtest-spi.h"
|
48
|
-
|
49
|
-
// Indicates that this translation unit is part of Google Test's
|
50
|
-
// implementation. It must come before gtest-internal-inl.h is
|
51
|
-
// included, or there will be a compiler error. This trick is to
|
52
|
-
// prevent a user from accidentally including gtest-internal-inl.h in
|
53
|
-
// his code.
|
54
|
-
#define GTEST_IMPLEMENTATION_ 1
|
55
|
-
#include "src/gtest-internal-inl.h"
|
56
|
-
#undef GTEST_IMPLEMENTATION_
|
57
|
-
|
58
|
-
using std::make_pair;
|
59
|
-
using std::pair;
|
60
|
-
|
61
|
-
namespace testing {
|
62
|
-
namespace internal {
|
63
|
-
|
64
|
-
TEST(IsXDigitTest, WorksForNarrowAscii) {
|
65
|
-
EXPECT_TRUE(IsXDigit('0'));
|
66
|
-
EXPECT_TRUE(IsXDigit('9'));
|
67
|
-
EXPECT_TRUE(IsXDigit('A'));
|
68
|
-
EXPECT_TRUE(IsXDigit('F'));
|
69
|
-
EXPECT_TRUE(IsXDigit('a'));
|
70
|
-
EXPECT_TRUE(IsXDigit('f'));
|
71
|
-
|
72
|
-
EXPECT_FALSE(IsXDigit('-'));
|
73
|
-
EXPECT_FALSE(IsXDigit('g'));
|
74
|
-
EXPECT_FALSE(IsXDigit('G'));
|
75
|
-
}
|
76
|
-
|
77
|
-
TEST(IsXDigitTest, ReturnsFalseForNarrowNonAscii) {
|
78
|
-
EXPECT_FALSE(IsXDigit('\x80'));
|
79
|
-
EXPECT_FALSE(IsXDigit(static_cast<char>('0' | '\x80')));
|
80
|
-
}
|
81
|
-
|
82
|
-
TEST(IsXDigitTest, WorksForWideAscii) {
|
83
|
-
EXPECT_TRUE(IsXDigit(L'0'));
|
84
|
-
EXPECT_TRUE(IsXDigit(L'9'));
|
85
|
-
EXPECT_TRUE(IsXDigit(L'A'));
|
86
|
-
EXPECT_TRUE(IsXDigit(L'F'));
|
87
|
-
EXPECT_TRUE(IsXDigit(L'a'));
|
88
|
-
EXPECT_TRUE(IsXDigit(L'f'));
|
89
|
-
|
90
|
-
EXPECT_FALSE(IsXDigit(L'-'));
|
91
|
-
EXPECT_FALSE(IsXDigit(L'g'));
|
92
|
-
EXPECT_FALSE(IsXDigit(L'G'));
|
93
|
-
}
|
94
|
-
|
95
|
-
TEST(IsXDigitTest, ReturnsFalseForWideNonAscii) {
|
96
|
-
EXPECT_FALSE(IsXDigit(static_cast<wchar_t>(0x80)));
|
97
|
-
EXPECT_FALSE(IsXDigit(static_cast<wchar_t>(L'0' | 0x80)));
|
98
|
-
EXPECT_FALSE(IsXDigit(static_cast<wchar_t>(L'0' | 0x100)));
|
99
|
-
}
|
100
|
-
|
101
|
-
class Base {
|
102
|
-
public:
|
103
|
-
// Copy constructor and assignment operator do exactly what we need, so we
|
104
|
-
// use them.
|
105
|
-
Base() : member_(0) {}
|
106
|
-
explicit Base(int n) : member_(n) {}
|
107
|
-
virtual ~Base() {}
|
108
|
-
int member() { return member_; }
|
109
|
-
|
110
|
-
private:
|
111
|
-
int member_;
|
112
|
-
};
|
113
|
-
|
114
|
-
class Derived : public Base {
|
115
|
-
public:
|
116
|
-
explicit Derived(int n) : Base(n) {}
|
117
|
-
};
|
118
|
-
|
119
|
-
TEST(ImplicitCastTest, ConvertsPointers) {
|
120
|
-
Derived derived(0);
|
121
|
-
EXPECT_TRUE(&derived == ::testing::internal::ImplicitCast_<Base*>(&derived));
|
122
|
-
}
|
123
|
-
|
124
|
-
TEST(ImplicitCastTest, CanUseInheritance) {
|
125
|
-
Derived derived(1);
|
126
|
-
Base base = ::testing::internal::ImplicitCast_<Base>(derived);
|
127
|
-
EXPECT_EQ(derived.member(), base.member());
|
128
|
-
}
|
129
|
-
|
130
|
-
class Castable {
|
131
|
-
public:
|
132
|
-
explicit Castable(bool* converted) : converted_(converted) {}
|
133
|
-
operator Base() {
|
134
|
-
*converted_ = true;
|
135
|
-
return Base();
|
136
|
-
}
|
137
|
-
|
138
|
-
private:
|
139
|
-
bool* converted_;
|
140
|
-
};
|
141
|
-
|
142
|
-
TEST(ImplicitCastTest, CanUseNonConstCastOperator) {
|
143
|
-
bool converted = false;
|
144
|
-
Castable castable(&converted);
|
145
|
-
Base base = ::testing::internal::ImplicitCast_<Base>(castable);
|
146
|
-
EXPECT_TRUE(converted);
|
147
|
-
}
|
148
|
-
|
149
|
-
class ConstCastable {
|
150
|
-
public:
|
151
|
-
explicit ConstCastable(bool* converted) : converted_(converted) {}
|
152
|
-
operator Base() const {
|
153
|
-
*converted_ = true;
|
154
|
-
return Base();
|
155
|
-
}
|
156
|
-
|
157
|
-
private:
|
158
|
-
bool* converted_;
|
159
|
-
};
|
160
|
-
|
161
|
-
TEST(ImplicitCastTest, CanUseConstCastOperatorOnConstValues) {
|
162
|
-
bool converted = false;
|
163
|
-
const ConstCastable const_castable(&converted);
|
164
|
-
Base base = ::testing::internal::ImplicitCast_<Base>(const_castable);
|
165
|
-
EXPECT_TRUE(converted);
|
166
|
-
}
|
167
|
-
|
168
|
-
class ConstAndNonConstCastable {
|
169
|
-
public:
|
170
|
-
ConstAndNonConstCastable(bool* converted, bool* const_converted)
|
171
|
-
: converted_(converted), const_converted_(const_converted) {}
|
172
|
-
operator Base() {
|
173
|
-
*converted_ = true;
|
174
|
-
return Base();
|
175
|
-
}
|
176
|
-
operator Base() const {
|
177
|
-
*const_converted_ = true;
|
178
|
-
return Base();
|
179
|
-
}
|
180
|
-
|
181
|
-
private:
|
182
|
-
bool* converted_;
|
183
|
-
bool* const_converted_;
|
184
|
-
};
|
185
|
-
|
186
|
-
TEST(ImplicitCastTest, CanSelectBetweenConstAndNonConstCasrAppropriately) {
|
187
|
-
bool converted = false;
|
188
|
-
bool const_converted = false;
|
189
|
-
ConstAndNonConstCastable castable(&converted, &const_converted);
|
190
|
-
Base base = ::testing::internal::ImplicitCast_<Base>(castable);
|
191
|
-
EXPECT_TRUE(converted);
|
192
|
-
EXPECT_FALSE(const_converted);
|
193
|
-
|
194
|
-
converted = false;
|
195
|
-
const_converted = false;
|
196
|
-
const ConstAndNonConstCastable const_castable(&converted, &const_converted);
|
197
|
-
base = ::testing::internal::ImplicitCast_<Base>(const_castable);
|
198
|
-
EXPECT_FALSE(converted);
|
199
|
-
EXPECT_TRUE(const_converted);
|
200
|
-
}
|
201
|
-
|
202
|
-
class To {
|
203
|
-
public:
|
204
|
-
To(bool* converted) { *converted = true; } // NOLINT
|
205
|
-
};
|
206
|
-
|
207
|
-
TEST(ImplicitCastTest, CanUseImplicitConstructor) {
|
208
|
-
bool converted = false;
|
209
|
-
To to = ::testing::internal::ImplicitCast_<To>(&converted);
|
210
|
-
(void)to;
|
211
|
-
EXPECT_TRUE(converted);
|
212
|
-
}
|
213
|
-
|
214
|
-
TEST(IteratorTraitsTest, WorksForSTLContainerIterators) {
|
215
|
-
StaticAssertTypeEq<int,
|
216
|
-
IteratorTraits< ::std::vector<int>::const_iterator>::value_type>();
|
217
|
-
StaticAssertTypeEq<bool,
|
218
|
-
IteratorTraits< ::std::list<bool>::iterator>::value_type>();
|
219
|
-
}
|
220
|
-
|
221
|
-
TEST(IteratorTraitsTest, WorksForPointerToNonConst) {
|
222
|
-
StaticAssertTypeEq<char, IteratorTraits<char*>::value_type>();
|
223
|
-
StaticAssertTypeEq<const void*, IteratorTraits<const void**>::value_type>();
|
224
|
-
}
|
225
|
-
|
226
|
-
TEST(IteratorTraitsTest, WorksForPointerToConst) {
|
227
|
-
StaticAssertTypeEq<char, IteratorTraits<const char*>::value_type>();
|
228
|
-
StaticAssertTypeEq<const void*,
|
229
|
-
IteratorTraits<const void* const*>::value_type>();
|
230
|
-
}
|
231
|
-
|
232
|
-
// Tests that the element_type typedef is available in scoped_ptr and refers
|
233
|
-
// to the parameter type.
|
234
|
-
TEST(ScopedPtrTest, DefinesElementType) {
|
235
|
-
StaticAssertTypeEq<int, ::testing::internal::scoped_ptr<int>::element_type>();
|
236
|
-
}
|
237
|
-
|
238
|
-
// TODO(vladl@google.com): Implement THE REST of scoped_ptr tests.
|
239
|
-
|
240
|
-
TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) {
|
241
|
-
if (AlwaysFalse())
|
242
|
-
GTEST_CHECK_(false) << "This should never be executed; "
|
243
|
-
"It's a compilation test only.";
|
244
|
-
|
245
|
-
if (AlwaysTrue())
|
246
|
-
GTEST_CHECK_(true);
|
247
|
-
else
|
248
|
-
; // NOLINT
|
249
|
-
|
250
|
-
if (AlwaysFalse())
|
251
|
-
; // NOLINT
|
252
|
-
else
|
253
|
-
GTEST_CHECK_(true) << "";
|
254
|
-
}
|
255
|
-
|
256
|
-
TEST(GtestCheckSyntaxTest, WorksWithSwitch) {
|
257
|
-
switch (0) {
|
258
|
-
case 1:
|
259
|
-
break;
|
260
|
-
default:
|
261
|
-
GTEST_CHECK_(true);
|
262
|
-
}
|
263
|
-
|
264
|
-
switch (0)
|
265
|
-
case 0:
|
266
|
-
GTEST_CHECK_(true) << "Check failed in switch case";
|
267
|
-
}
|
268
|
-
|
269
|
-
// Verifies behavior of FormatFileLocation.
|
270
|
-
TEST(FormatFileLocationTest, FormatsFileLocation) {
|
271
|
-
EXPECT_PRED_FORMAT2(IsSubstring, "foo.cc", FormatFileLocation("foo.cc", 42));
|
272
|
-
EXPECT_PRED_FORMAT2(IsSubstring, "42", FormatFileLocation("foo.cc", 42));
|
273
|
-
}
|
274
|
-
|
275
|
-
TEST(FormatFileLocationTest, FormatsUnknownFile) {
|
276
|
-
EXPECT_PRED_FORMAT2(
|
277
|
-
IsSubstring, "unknown file", FormatFileLocation(NULL, 42));
|
278
|
-
EXPECT_PRED_FORMAT2(IsSubstring, "42", FormatFileLocation(NULL, 42));
|
279
|
-
}
|
280
|
-
|
281
|
-
TEST(FormatFileLocationTest, FormatsUknownLine) {
|
282
|
-
EXPECT_EQ("foo.cc:", FormatFileLocation("foo.cc", -1));
|
283
|
-
}
|
284
|
-
|
285
|
-
TEST(FormatFileLocationTest, FormatsUknownFileAndLine) {
|
286
|
-
EXPECT_EQ("unknown file:", FormatFileLocation(NULL, -1));
|
287
|
-
}
|
288
|
-
|
289
|
-
// Verifies behavior of FormatCompilerIndependentFileLocation.
|
290
|
-
TEST(FormatCompilerIndependentFileLocationTest, FormatsFileLocation) {
|
291
|
-
EXPECT_EQ("foo.cc:42", FormatCompilerIndependentFileLocation("foo.cc", 42));
|
292
|
-
}
|
293
|
-
|
294
|
-
TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFile) {
|
295
|
-
EXPECT_EQ("unknown file:42",
|
296
|
-
FormatCompilerIndependentFileLocation(NULL, 42));
|
297
|
-
}
|
298
|
-
|
299
|
-
TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownLine) {
|
300
|
-
EXPECT_EQ("foo.cc", FormatCompilerIndependentFileLocation("foo.cc", -1));
|
301
|
-
}
|
302
|
-
|
303
|
-
TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFileAndLine) {
|
304
|
-
EXPECT_EQ("unknown file", FormatCompilerIndependentFileLocation(NULL, -1));
|
305
|
-
}
|
306
|
-
|
307
|
-
#if GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX
|
308
|
-
void* ThreadFunc(void* data) {
|
309
|
-
internal::Mutex* mutex = static_cast<internal::Mutex*>(data);
|
310
|
-
mutex->Lock();
|
311
|
-
mutex->Unlock();
|
312
|
-
return NULL;
|
313
|
-
}
|
314
|
-
|
315
|
-
TEST(GetThreadCountTest, ReturnsCorrectValue) {
|
316
|
-
const size_t starting_count = GetThreadCount();
|
317
|
-
pthread_t thread_id;
|
318
|
-
|
319
|
-
internal::Mutex mutex;
|
320
|
-
{
|
321
|
-
internal::MutexLock lock(&mutex);
|
322
|
-
pthread_attr_t attr;
|
323
|
-
ASSERT_EQ(0, pthread_attr_init(&attr));
|
324
|
-
ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE));
|
325
|
-
|
326
|
-
const int status = pthread_create(&thread_id, &attr, &ThreadFunc, &mutex);
|
327
|
-
ASSERT_EQ(0, pthread_attr_destroy(&attr));
|
328
|
-
ASSERT_EQ(0, status);
|
329
|
-
EXPECT_EQ(starting_count + 1, GetThreadCount());
|
330
|
-
}
|
331
|
-
|
332
|
-
void* dummy;
|
333
|
-
ASSERT_EQ(0, pthread_join(thread_id, &dummy));
|
334
|
-
|
335
|
-
// The OS may not immediately report the updated thread count after
|
336
|
-
// joining a thread, causing flakiness in this test. To counter that, we
|
337
|
-
// wait for up to .5 seconds for the OS to report the correct value.
|
338
|
-
for (int i = 0; i < 5; ++i) {
|
339
|
-
if (GetThreadCount() == starting_count)
|
340
|
-
break;
|
341
|
-
|
342
|
-
SleepMilliseconds(100);
|
343
|
-
}
|
344
|
-
|
345
|
-
EXPECT_EQ(starting_count, GetThreadCount());
|
346
|
-
}
|
347
|
-
#else
|
348
|
-
TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads) {
|
349
|
-
EXPECT_EQ(0U, GetThreadCount());
|
350
|
-
}
|
351
|
-
#endif // GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX
|
352
|
-
|
353
|
-
TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) {
|
354
|
-
const bool a_false_condition = false;
|
355
|
-
const char regex[] =
|
356
|
-
#ifdef _MSC_VER
|
357
|
-
"gtest-port_test\\.cc\\(\\d+\\):"
|
358
|
-
#elif GTEST_USES_POSIX_RE
|
359
|
-
"gtest-port_test\\.cc:[0-9]+"
|
360
|
-
#else
|
361
|
-
"gtest-port_test\\.cc:\\d+"
|
362
|
-
#endif // _MSC_VER
|
363
|
-
".*a_false_condition.*Extra info.*";
|
364
|
-
|
365
|
-
EXPECT_DEATH_IF_SUPPORTED(GTEST_CHECK_(a_false_condition) << "Extra info",
|
366
|
-
regex);
|
367
|
-
}
|
368
|
-
|
369
|
-
#if GTEST_HAS_DEATH_TEST
|
370
|
-
|
371
|
-
TEST(GtestCheckDeathTest, LivesSilentlyOnSuccess) {
|
372
|
-
EXPECT_EXIT({
|
373
|
-
GTEST_CHECK_(true) << "Extra info";
|
374
|
-
::std::cerr << "Success\n";
|
375
|
-
exit(0); },
|
376
|
-
::testing::ExitedWithCode(0), "Success");
|
377
|
-
}
|
378
|
-
|
379
|
-
#endif // GTEST_HAS_DEATH_TEST
|
380
|
-
|
381
|
-
// Verifies that Google Test choose regular expression engine appropriate to
|
382
|
-
// the platform. The test will produce compiler errors in case of failure.
|
383
|
-
// For simplicity, we only cover the most important platforms here.
|
384
|
-
TEST(RegexEngineSelectionTest, SelectsCorrectRegexEngine) {
|
385
|
-
#if !GTEST_USES_PCRE
|
386
|
-
# if GTEST_HAS_POSIX_RE
|
387
|
-
|
388
|
-
EXPECT_TRUE(GTEST_USES_POSIX_RE);
|
389
|
-
|
390
|
-
# else
|
391
|
-
|
392
|
-
EXPECT_TRUE(GTEST_USES_SIMPLE_RE);
|
393
|
-
|
394
|
-
# endif
|
395
|
-
#endif // !GTEST_USES_PCRE
|
396
|
-
}
|
397
|
-
|
398
|
-
#if GTEST_USES_POSIX_RE
|
399
|
-
|
400
|
-
# if GTEST_HAS_TYPED_TEST
|
401
|
-
|
402
|
-
template <typename Str>
|
403
|
-
class RETest : public ::testing::Test {};
|
404
|
-
|
405
|
-
// Defines StringTypes as the list of all string types that class RE
|
406
|
-
// supports.
|
407
|
-
typedef testing::Types<
|
408
|
-
::std::string,
|
409
|
-
# if GTEST_HAS_GLOBAL_STRING
|
410
|
-
::string,
|
411
|
-
# endif // GTEST_HAS_GLOBAL_STRING
|
412
|
-
const char*> StringTypes;
|
413
|
-
|
414
|
-
TYPED_TEST_CASE(RETest, StringTypes);
|
415
|
-
|
416
|
-
// Tests RE's implicit constructors.
|
417
|
-
TYPED_TEST(RETest, ImplicitConstructorWorks) {
|
418
|
-
const RE empty(TypeParam(""));
|
419
|
-
EXPECT_STREQ("", empty.pattern());
|
420
|
-
|
421
|
-
const RE simple(TypeParam("hello"));
|
422
|
-
EXPECT_STREQ("hello", simple.pattern());
|
423
|
-
|
424
|
-
const RE normal(TypeParam(".*(\\w+)"));
|
425
|
-
EXPECT_STREQ(".*(\\w+)", normal.pattern());
|
426
|
-
}
|
427
|
-
|
428
|
-
// Tests that RE's constructors reject invalid regular expressions.
|
429
|
-
TYPED_TEST(RETest, RejectsInvalidRegex) {
|
430
|
-
EXPECT_NONFATAL_FAILURE({
|
431
|
-
const RE invalid(TypeParam("?"));
|
432
|
-
}, "\"?\" is not a valid POSIX Extended regular expression.");
|
433
|
-
}
|
434
|
-
|
435
|
-
// Tests RE::FullMatch().
|
436
|
-
TYPED_TEST(RETest, FullMatchWorks) {
|
437
|
-
const RE empty(TypeParam(""));
|
438
|
-
EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty));
|
439
|
-
EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty));
|
440
|
-
|
441
|
-
const RE re(TypeParam("a.*z"));
|
442
|
-
EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re));
|
443
|
-
EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re));
|
444
|
-
EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re));
|
445
|
-
EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re));
|
446
|
-
}
|
447
|
-
|
448
|
-
// Tests RE::PartialMatch().
|
449
|
-
TYPED_TEST(RETest, PartialMatchWorks) {
|
450
|
-
const RE empty(TypeParam(""));
|
451
|
-
EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty));
|
452
|
-
EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty));
|
453
|
-
|
454
|
-
const RE re(TypeParam("a.*z"));
|
455
|
-
EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re));
|
456
|
-
EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re));
|
457
|
-
EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re));
|
458
|
-
EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re));
|
459
|
-
EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
|
460
|
-
}
|
461
|
-
|
462
|
-
# endif // GTEST_HAS_TYPED_TEST
|
463
|
-
|
464
|
-
#elif GTEST_USES_SIMPLE_RE
|
465
|
-
|
466
|
-
TEST(IsInSetTest, NulCharIsNotInAnySet) {
|
467
|
-
EXPECT_FALSE(IsInSet('\0', ""));
|
468
|
-
EXPECT_FALSE(IsInSet('\0', "\0"));
|
469
|
-
EXPECT_FALSE(IsInSet('\0', "a"));
|
470
|
-
}
|
471
|
-
|
472
|
-
TEST(IsInSetTest, WorksForNonNulChars) {
|
473
|
-
EXPECT_FALSE(IsInSet('a', "Ab"));
|
474
|
-
EXPECT_FALSE(IsInSet('c', ""));
|
475
|
-
|
476
|
-
EXPECT_TRUE(IsInSet('b', "bcd"));
|
477
|
-
EXPECT_TRUE(IsInSet('b', "ab"));
|
478
|
-
}
|
479
|
-
|
480
|
-
TEST(IsAsciiDigitTest, IsFalseForNonDigit) {
|
481
|
-
EXPECT_FALSE(IsAsciiDigit('\0'));
|
482
|
-
EXPECT_FALSE(IsAsciiDigit(' '));
|
483
|
-
EXPECT_FALSE(IsAsciiDigit('+'));
|
484
|
-
EXPECT_FALSE(IsAsciiDigit('-'));
|
485
|
-
EXPECT_FALSE(IsAsciiDigit('.'));
|
486
|
-
EXPECT_FALSE(IsAsciiDigit('a'));
|
487
|
-
}
|
488
|
-
|
489
|
-
TEST(IsAsciiDigitTest, IsTrueForDigit) {
|
490
|
-
EXPECT_TRUE(IsAsciiDigit('0'));
|
491
|
-
EXPECT_TRUE(IsAsciiDigit('1'));
|
492
|
-
EXPECT_TRUE(IsAsciiDigit('5'));
|
493
|
-
EXPECT_TRUE(IsAsciiDigit('9'));
|
494
|
-
}
|
495
|
-
|
496
|
-
TEST(IsAsciiPunctTest, IsFalseForNonPunct) {
|
497
|
-
EXPECT_FALSE(IsAsciiPunct('\0'));
|
498
|
-
EXPECT_FALSE(IsAsciiPunct(' '));
|
499
|
-
EXPECT_FALSE(IsAsciiPunct('\n'));
|
500
|
-
EXPECT_FALSE(IsAsciiPunct('a'));
|
501
|
-
EXPECT_FALSE(IsAsciiPunct('0'));
|
502
|
-
}
|
503
|
-
|
504
|
-
TEST(IsAsciiPunctTest, IsTrueForPunct) {
|
505
|
-
for (const char* p = "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"; *p; p++) {
|
506
|
-
EXPECT_PRED1(IsAsciiPunct, *p);
|
507
|
-
}
|
508
|
-
}
|
509
|
-
|
510
|
-
TEST(IsRepeatTest, IsFalseForNonRepeatChar) {
|
511
|
-
EXPECT_FALSE(IsRepeat('\0'));
|
512
|
-
EXPECT_FALSE(IsRepeat(' '));
|
513
|
-
EXPECT_FALSE(IsRepeat('a'));
|
514
|
-
EXPECT_FALSE(IsRepeat('1'));
|
515
|
-
EXPECT_FALSE(IsRepeat('-'));
|
516
|
-
}
|
517
|
-
|
518
|
-
TEST(IsRepeatTest, IsTrueForRepeatChar) {
|
519
|
-
EXPECT_TRUE(IsRepeat('?'));
|
520
|
-
EXPECT_TRUE(IsRepeat('*'));
|
521
|
-
EXPECT_TRUE(IsRepeat('+'));
|
522
|
-
}
|
523
|
-
|
524
|
-
TEST(IsAsciiWhiteSpaceTest, IsFalseForNonWhiteSpace) {
|
525
|
-
EXPECT_FALSE(IsAsciiWhiteSpace('\0'));
|
526
|
-
EXPECT_FALSE(IsAsciiWhiteSpace('a'));
|
527
|
-
EXPECT_FALSE(IsAsciiWhiteSpace('1'));
|
528
|
-
EXPECT_FALSE(IsAsciiWhiteSpace('+'));
|
529
|
-
EXPECT_FALSE(IsAsciiWhiteSpace('_'));
|
530
|
-
}
|
531
|
-
|
532
|
-
TEST(IsAsciiWhiteSpaceTest, IsTrueForWhiteSpace) {
|
533
|
-
EXPECT_TRUE(IsAsciiWhiteSpace(' '));
|
534
|
-
EXPECT_TRUE(IsAsciiWhiteSpace('\n'));
|
535
|
-
EXPECT_TRUE(IsAsciiWhiteSpace('\r'));
|
536
|
-
EXPECT_TRUE(IsAsciiWhiteSpace('\t'));
|
537
|
-
EXPECT_TRUE(IsAsciiWhiteSpace('\v'));
|
538
|
-
EXPECT_TRUE(IsAsciiWhiteSpace('\f'));
|
539
|
-
}
|
540
|
-
|
541
|
-
TEST(IsAsciiWordCharTest, IsFalseForNonWordChar) {
|
542
|
-
EXPECT_FALSE(IsAsciiWordChar('\0'));
|
543
|
-
EXPECT_FALSE(IsAsciiWordChar('+'));
|
544
|
-
EXPECT_FALSE(IsAsciiWordChar('.'));
|
545
|
-
EXPECT_FALSE(IsAsciiWordChar(' '));
|
546
|
-
EXPECT_FALSE(IsAsciiWordChar('\n'));
|
547
|
-
}
|
548
|
-
|
549
|
-
TEST(IsAsciiWordCharTest, IsTrueForLetter) {
|
550
|
-
EXPECT_TRUE(IsAsciiWordChar('a'));
|
551
|
-
EXPECT_TRUE(IsAsciiWordChar('b'));
|
552
|
-
EXPECT_TRUE(IsAsciiWordChar('A'));
|
553
|
-
EXPECT_TRUE(IsAsciiWordChar('Z'));
|
554
|
-
}
|
555
|
-
|
556
|
-
TEST(IsAsciiWordCharTest, IsTrueForDigit) {
|
557
|
-
EXPECT_TRUE(IsAsciiWordChar('0'));
|
558
|
-
EXPECT_TRUE(IsAsciiWordChar('1'));
|
559
|
-
EXPECT_TRUE(IsAsciiWordChar('7'));
|
560
|
-
EXPECT_TRUE(IsAsciiWordChar('9'));
|
561
|
-
}
|
562
|
-
|
563
|
-
TEST(IsAsciiWordCharTest, IsTrueForUnderscore) {
|
564
|
-
EXPECT_TRUE(IsAsciiWordChar('_'));
|
565
|
-
}
|
566
|
-
|
567
|
-
TEST(IsValidEscapeTest, IsFalseForNonPrintable) {
|
568
|
-
EXPECT_FALSE(IsValidEscape('\0'));
|
569
|
-
EXPECT_FALSE(IsValidEscape('\007'));
|
570
|
-
}
|
571
|
-
|
572
|
-
TEST(IsValidEscapeTest, IsFalseForDigit) {
|
573
|
-
EXPECT_FALSE(IsValidEscape('0'));
|
574
|
-
EXPECT_FALSE(IsValidEscape('9'));
|
575
|
-
}
|
576
|
-
|
577
|
-
TEST(IsValidEscapeTest, IsFalseForWhiteSpace) {
|
578
|
-
EXPECT_FALSE(IsValidEscape(' '));
|
579
|
-
EXPECT_FALSE(IsValidEscape('\n'));
|
580
|
-
}
|
581
|
-
|
582
|
-
TEST(IsValidEscapeTest, IsFalseForSomeLetter) {
|
583
|
-
EXPECT_FALSE(IsValidEscape('a'));
|
584
|
-
EXPECT_FALSE(IsValidEscape('Z'));
|
585
|
-
}
|
586
|
-
|
587
|
-
TEST(IsValidEscapeTest, IsTrueForPunct) {
|
588
|
-
EXPECT_TRUE(IsValidEscape('.'));
|
589
|
-
EXPECT_TRUE(IsValidEscape('-'));
|
590
|
-
EXPECT_TRUE(IsValidEscape('^'));
|
591
|
-
EXPECT_TRUE(IsValidEscape('$'));
|
592
|
-
EXPECT_TRUE(IsValidEscape('('));
|
593
|
-
EXPECT_TRUE(IsValidEscape(']'));
|
594
|
-
EXPECT_TRUE(IsValidEscape('{'));
|
595
|
-
EXPECT_TRUE(IsValidEscape('|'));
|
596
|
-
}
|
597
|
-
|
598
|
-
TEST(IsValidEscapeTest, IsTrueForSomeLetter) {
|
599
|
-
EXPECT_TRUE(IsValidEscape('d'));
|
600
|
-
EXPECT_TRUE(IsValidEscape('D'));
|
601
|
-
EXPECT_TRUE(IsValidEscape('s'));
|
602
|
-
EXPECT_TRUE(IsValidEscape('S'));
|
603
|
-
EXPECT_TRUE(IsValidEscape('w'));
|
604
|
-
EXPECT_TRUE(IsValidEscape('W'));
|
605
|
-
}
|
606
|
-
|
607
|
-
TEST(AtomMatchesCharTest, EscapedPunct) {
|
608
|
-
EXPECT_FALSE(AtomMatchesChar(true, '\\', '\0'));
|
609
|
-
EXPECT_FALSE(AtomMatchesChar(true, '\\', ' '));
|
610
|
-
EXPECT_FALSE(AtomMatchesChar(true, '_', '.'));
|
611
|
-
EXPECT_FALSE(AtomMatchesChar(true, '.', 'a'));
|
612
|
-
|
613
|
-
EXPECT_TRUE(AtomMatchesChar(true, '\\', '\\'));
|
614
|
-
EXPECT_TRUE(AtomMatchesChar(true, '_', '_'));
|
615
|
-
EXPECT_TRUE(AtomMatchesChar(true, '+', '+'));
|
616
|
-
EXPECT_TRUE(AtomMatchesChar(true, '.', '.'));
|
617
|
-
}
|
618
|
-
|
619
|
-
TEST(AtomMatchesCharTest, Escaped_d) {
|
620
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'd', '\0'));
|
621
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'd', 'a'));
|
622
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'd', '.'));
|
623
|
-
|
624
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'd', '0'));
|
625
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'd', '9'));
|
626
|
-
}
|
627
|
-
|
628
|
-
TEST(AtomMatchesCharTest, Escaped_D) {
|
629
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'D', '0'));
|
630
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'D', '9'));
|
631
|
-
|
632
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'D', '\0'));
|
633
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'D', 'a'));
|
634
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'D', '-'));
|
635
|
-
}
|
636
|
-
|
637
|
-
TEST(AtomMatchesCharTest, Escaped_s) {
|
638
|
-
EXPECT_FALSE(AtomMatchesChar(true, 's', '\0'));
|
639
|
-
EXPECT_FALSE(AtomMatchesChar(true, 's', 'a'));
|
640
|
-
EXPECT_FALSE(AtomMatchesChar(true, 's', '.'));
|
641
|
-
EXPECT_FALSE(AtomMatchesChar(true, 's', '9'));
|
642
|
-
|
643
|
-
EXPECT_TRUE(AtomMatchesChar(true, 's', ' '));
|
644
|
-
EXPECT_TRUE(AtomMatchesChar(true, 's', '\n'));
|
645
|
-
EXPECT_TRUE(AtomMatchesChar(true, 's', '\t'));
|
646
|
-
}
|
647
|
-
|
648
|
-
TEST(AtomMatchesCharTest, Escaped_S) {
|
649
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'S', ' '));
|
650
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'S', '\r'));
|
651
|
-
|
652
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'S', '\0'));
|
653
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'S', 'a'));
|
654
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'S', '9'));
|
655
|
-
}
|
656
|
-
|
657
|
-
TEST(AtomMatchesCharTest, Escaped_w) {
|
658
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'w', '\0'));
|
659
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'w', '+'));
|
660
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'w', ' '));
|
661
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'w', '\n'));
|
662
|
-
|
663
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'w', '0'));
|
664
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'w', 'b'));
|
665
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'w', 'C'));
|
666
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'w', '_'));
|
667
|
-
}
|
668
|
-
|
669
|
-
TEST(AtomMatchesCharTest, Escaped_W) {
|
670
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'W', 'A'));
|
671
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'W', 'b'));
|
672
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'W', '9'));
|
673
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'W', '_'));
|
674
|
-
|
675
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'W', '\0'));
|
676
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'W', '*'));
|
677
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'W', '\n'));
|
678
|
-
}
|
679
|
-
|
680
|
-
TEST(AtomMatchesCharTest, EscapedWhiteSpace) {
|
681
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'f', '\0'));
|
682
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'f', '\n'));
|
683
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'n', '\0'));
|
684
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'n', '\r'));
|
685
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'r', '\0'));
|
686
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'r', 'a'));
|
687
|
-
EXPECT_FALSE(AtomMatchesChar(true, 't', '\0'));
|
688
|
-
EXPECT_FALSE(AtomMatchesChar(true, 't', 't'));
|
689
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'v', '\0'));
|
690
|
-
EXPECT_FALSE(AtomMatchesChar(true, 'v', '\f'));
|
691
|
-
|
692
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'f', '\f'));
|
693
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'n', '\n'));
|
694
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'r', '\r'));
|
695
|
-
EXPECT_TRUE(AtomMatchesChar(true, 't', '\t'));
|
696
|
-
EXPECT_TRUE(AtomMatchesChar(true, 'v', '\v'));
|
697
|
-
}
|
698
|
-
|
699
|
-
TEST(AtomMatchesCharTest, UnescapedDot) {
|
700
|
-
EXPECT_FALSE(AtomMatchesChar(false, '.', '\n'));
|
701
|
-
|
702
|
-
EXPECT_TRUE(AtomMatchesChar(false, '.', '\0'));
|
703
|
-
EXPECT_TRUE(AtomMatchesChar(false, '.', '.'));
|
704
|
-
EXPECT_TRUE(AtomMatchesChar(false, '.', 'a'));
|
705
|
-
EXPECT_TRUE(AtomMatchesChar(false, '.', ' '));
|
706
|
-
}
|
707
|
-
|
708
|
-
TEST(AtomMatchesCharTest, UnescapedChar) {
|
709
|
-
EXPECT_FALSE(AtomMatchesChar(false, 'a', '\0'));
|
710
|
-
EXPECT_FALSE(AtomMatchesChar(false, 'a', 'b'));
|
711
|
-
EXPECT_FALSE(AtomMatchesChar(false, '$', 'a'));
|
712
|
-
|
713
|
-
EXPECT_TRUE(AtomMatchesChar(false, '$', '$'));
|
714
|
-
EXPECT_TRUE(AtomMatchesChar(false, '5', '5'));
|
715
|
-
EXPECT_TRUE(AtomMatchesChar(false, 'Z', 'Z'));
|
716
|
-
}
|
717
|
-
|
718
|
-
TEST(ValidateRegexTest, GeneratesFailureAndReturnsFalseForInvalid) {
|
719
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex(NULL)),
|
720
|
-
"NULL is not a valid simple regular expression");
|
721
|
-
EXPECT_NONFATAL_FAILURE(
|
722
|
-
ASSERT_FALSE(ValidateRegex("a\\")),
|
723
|
-
"Syntax error at index 1 in simple regular expression \"a\\\": ");
|
724
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a\\")),
|
725
|
-
"'\\' cannot appear at the end");
|
726
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("\\n\\")),
|
727
|
-
"'\\' cannot appear at the end");
|
728
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("\\s\\hb")),
|
729
|
-
"invalid escape sequence \"\\h\"");
|
730
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^^")),
|
731
|
-
"'^' can only appear at the beginning");
|
732
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex(".*^b")),
|
733
|
-
"'^' can only appear at the beginning");
|
734
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("$$")),
|
735
|
-
"'$' can only appear at the end");
|
736
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^$a")),
|
737
|
-
"'$' can only appear at the end");
|
738
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a(b")),
|
739
|
-
"'(' is unsupported");
|
740
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("ab)")),
|
741
|
-
"')' is unsupported");
|
742
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("[ab")),
|
743
|
-
"'[' is unsupported");
|
744
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a{2")),
|
745
|
-
"'{' is unsupported");
|
746
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("?")),
|
747
|
-
"'?' can only follow a repeatable token");
|
748
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^*")),
|
749
|
-
"'*' can only follow a repeatable token");
|
750
|
-
EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("5*+")),
|
751
|
-
"'+' can only follow a repeatable token");
|
752
|
-
}
|
753
|
-
|
754
|
-
TEST(ValidateRegexTest, ReturnsTrueForValid) {
|
755
|
-
EXPECT_TRUE(ValidateRegex(""));
|
756
|
-
EXPECT_TRUE(ValidateRegex("a"));
|
757
|
-
EXPECT_TRUE(ValidateRegex(".*"));
|
758
|
-
EXPECT_TRUE(ValidateRegex("^a_+"));
|
759
|
-
EXPECT_TRUE(ValidateRegex("^a\\t\\&?"));
|
760
|
-
EXPECT_TRUE(ValidateRegex("09*$"));
|
761
|
-
EXPECT_TRUE(ValidateRegex("^Z$"));
|
762
|
-
EXPECT_TRUE(ValidateRegex("a\\^Z\\$\\(\\)\\|\\[\\]\\{\\}"));
|
763
|
-
}
|
764
|
-
|
765
|
-
TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrOne) {
|
766
|
-
EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "a", "ba"));
|
767
|
-
// Repeating more than once.
|
768
|
-
EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "aab"));
|
769
|
-
|
770
|
-
// Repeating zero times.
|
771
|
-
EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "ba"));
|
772
|
-
// Repeating once.
|
773
|
-
EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "ab"));
|
774
|
-
EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '#', '?', ".", "##"));
|
775
|
-
}
|
776
|
-
|
777
|
-
TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrMany) {
|
778
|
-
EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '*', "a$", "baab"));
|
779
|
-
|
780
|
-
// Repeating zero times.
|
781
|
-
EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '*', "b", "bc"));
|
782
|
-
// Repeating once.
|
783
|
-
EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '*', "b", "abc"));
|
784
|
-
// Repeating more than once.
|
785
|
-
EXPECT_TRUE(MatchRepetitionAndRegexAtHead(true, 'w', '*', "-", "ab_1-g"));
|
786
|
-
}
|
787
|
-
|
788
|
-
TEST(MatchRepetitionAndRegexAtHeadTest, WorksForOneOrMany) {
|
789
|
-
EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '+', "a$", "baab"));
|
790
|
-
// Repeating zero times.
|
791
|
-
EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '+', "b", "bc"));
|
792
|
-
|
793
|
-
// Repeating once.
|
794
|
-
EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '+', "b", "abc"));
|
795
|
-
// Repeating more than once.
|
796
|
-
EXPECT_TRUE(MatchRepetitionAndRegexAtHead(true, 'w', '+', "-", "ab_1-g"));
|
797
|
-
}
|
798
|
-
|
799
|
-
TEST(MatchRegexAtHeadTest, ReturnsTrueForEmptyRegex) {
|
800
|
-
EXPECT_TRUE(MatchRegexAtHead("", ""));
|
801
|
-
EXPECT_TRUE(MatchRegexAtHead("", "ab"));
|
802
|
-
}
|
803
|
-
|
804
|
-
TEST(MatchRegexAtHeadTest, WorksWhenDollarIsInRegex) {
|
805
|
-
EXPECT_FALSE(MatchRegexAtHead("$", "a"));
|
806
|
-
|
807
|
-
EXPECT_TRUE(MatchRegexAtHead("$", ""));
|
808
|
-
EXPECT_TRUE(MatchRegexAtHead("a$", "a"));
|
809
|
-
}
|
810
|
-
|
811
|
-
TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithEscapeSequence) {
|
812
|
-
EXPECT_FALSE(MatchRegexAtHead("\\w", "+"));
|
813
|
-
EXPECT_FALSE(MatchRegexAtHead("\\W", "ab"));
|
814
|
-
|
815
|
-
EXPECT_TRUE(MatchRegexAtHead("\\sa", "\nab"));
|
816
|
-
EXPECT_TRUE(MatchRegexAtHead("\\d", "1a"));
|
817
|
-
}
|
818
|
-
|
819
|
-
TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetition) {
|
820
|
-
EXPECT_FALSE(MatchRegexAtHead(".+a", "abc"));
|
821
|
-
EXPECT_FALSE(MatchRegexAtHead("a?b", "aab"));
|
822
|
-
|
823
|
-
EXPECT_TRUE(MatchRegexAtHead(".*a", "bc12-ab"));
|
824
|
-
EXPECT_TRUE(MatchRegexAtHead("a?b", "b"));
|
825
|
-
EXPECT_TRUE(MatchRegexAtHead("a?b", "ab"));
|
826
|
-
}
|
827
|
-
|
828
|
-
TEST(MatchRegexAtHeadTest,
|
829
|
-
WorksWhenRegexStartsWithRepetionOfEscapeSequence) {
|
830
|
-
EXPECT_FALSE(MatchRegexAtHead("\\.+a", "abc"));
|
831
|
-
EXPECT_FALSE(MatchRegexAtHead("\\s?b", " b"));
|
832
|
-
|
833
|
-
EXPECT_TRUE(MatchRegexAtHead("\\(*a", "((((ab"));
|
834
|
-
EXPECT_TRUE(MatchRegexAtHead("\\^?b", "^b"));
|
835
|
-
EXPECT_TRUE(MatchRegexAtHead("\\\\?b", "b"));
|
836
|
-
EXPECT_TRUE(MatchRegexAtHead("\\\\?b", "\\b"));
|
837
|
-
}
|
838
|
-
|
839
|
-
TEST(MatchRegexAtHeadTest, MatchesSequentially) {
|
840
|
-
EXPECT_FALSE(MatchRegexAtHead("ab.*c", "acabc"));
|
841
|
-
|
842
|
-
EXPECT_TRUE(MatchRegexAtHead("ab.*c", "ab-fsc"));
|
843
|
-
}
|
844
|
-
|
845
|
-
TEST(MatchRegexAnywhereTest, ReturnsFalseWhenStringIsNull) {
|
846
|
-
EXPECT_FALSE(MatchRegexAnywhere("", NULL));
|
847
|
-
}
|
848
|
-
|
849
|
-
TEST(MatchRegexAnywhereTest, WorksWhenRegexStartsWithCaret) {
|
850
|
-
EXPECT_FALSE(MatchRegexAnywhere("^a", "ba"));
|
851
|
-
EXPECT_FALSE(MatchRegexAnywhere("^$", "a"));
|
852
|
-
|
853
|
-
EXPECT_TRUE(MatchRegexAnywhere("^a", "ab"));
|
854
|
-
EXPECT_TRUE(MatchRegexAnywhere("^", "ab"));
|
855
|
-
EXPECT_TRUE(MatchRegexAnywhere("^$", ""));
|
856
|
-
}
|
857
|
-
|
858
|
-
TEST(MatchRegexAnywhereTest, ReturnsFalseWhenNoMatch) {
|
859
|
-
EXPECT_FALSE(MatchRegexAnywhere("a", "bcde123"));
|
860
|
-
EXPECT_FALSE(MatchRegexAnywhere("a.+a", "--aa88888888"));
|
861
|
-
}
|
862
|
-
|
863
|
-
TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingPrefix) {
|
864
|
-
EXPECT_TRUE(MatchRegexAnywhere("\\w+", "ab1_ - 5"));
|
865
|
-
EXPECT_TRUE(MatchRegexAnywhere(".*=", "="));
|
866
|
-
EXPECT_TRUE(MatchRegexAnywhere("x.*ab?.*bc", "xaaabc"));
|
867
|
-
}
|
868
|
-
|
869
|
-
TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingNonPrefix) {
|
870
|
-
EXPECT_TRUE(MatchRegexAnywhere("\\w+", "$$$ ab1_ - 5"));
|
871
|
-
EXPECT_TRUE(MatchRegexAnywhere("\\.+=", "= ...="));
|
872
|
-
}
|
873
|
-
|
874
|
-
// Tests RE's implicit constructors.
|
875
|
-
TEST(RETest, ImplicitConstructorWorks) {
|
876
|
-
const RE empty("");
|
877
|
-
EXPECT_STREQ("", empty.pattern());
|
878
|
-
|
879
|
-
const RE simple("hello");
|
880
|
-
EXPECT_STREQ("hello", simple.pattern());
|
881
|
-
}
|
882
|
-
|
883
|
-
// Tests that RE's constructors reject invalid regular expressions.
|
884
|
-
TEST(RETest, RejectsInvalidRegex) {
|
885
|
-
EXPECT_NONFATAL_FAILURE({
|
886
|
-
const RE normal(NULL);
|
887
|
-
}, "NULL is not a valid simple regular expression");
|
888
|
-
|
889
|
-
EXPECT_NONFATAL_FAILURE({
|
890
|
-
const RE normal(".*(\\w+");
|
891
|
-
}, "'(' is unsupported");
|
892
|
-
|
893
|
-
EXPECT_NONFATAL_FAILURE({
|
894
|
-
const RE invalid("^?");
|
895
|
-
}, "'?' can only follow a repeatable token");
|
896
|
-
}
|
897
|
-
|
898
|
-
// Tests RE::FullMatch().
|
899
|
-
TEST(RETest, FullMatchWorks) {
|
900
|
-
const RE empty("");
|
901
|
-
EXPECT_TRUE(RE::FullMatch("", empty));
|
902
|
-
EXPECT_FALSE(RE::FullMatch("a", empty));
|
903
|
-
|
904
|
-
const RE re1("a");
|
905
|
-
EXPECT_TRUE(RE::FullMatch("a", re1));
|
906
|
-
|
907
|
-
const RE re("a.*z");
|
908
|
-
EXPECT_TRUE(RE::FullMatch("az", re));
|
909
|
-
EXPECT_TRUE(RE::FullMatch("axyz", re));
|
910
|
-
EXPECT_FALSE(RE::FullMatch("baz", re));
|
911
|
-
EXPECT_FALSE(RE::FullMatch("azy", re));
|
912
|
-
}
|
913
|
-
|
914
|
-
// Tests RE::PartialMatch().
|
915
|
-
TEST(RETest, PartialMatchWorks) {
|
916
|
-
const RE empty("");
|
917
|
-
EXPECT_TRUE(RE::PartialMatch("", empty));
|
918
|
-
EXPECT_TRUE(RE::PartialMatch("a", empty));
|
919
|
-
|
920
|
-
const RE re("a.*z");
|
921
|
-
EXPECT_TRUE(RE::PartialMatch("az", re));
|
922
|
-
EXPECT_TRUE(RE::PartialMatch("axyz", re));
|
923
|
-
EXPECT_TRUE(RE::PartialMatch("baz", re));
|
924
|
-
EXPECT_TRUE(RE::PartialMatch("azy", re));
|
925
|
-
EXPECT_FALSE(RE::PartialMatch("zza", re));
|
926
|
-
}
|
927
|
-
|
928
|
-
#endif // GTEST_USES_POSIX_RE
|
929
|
-
|
930
|
-
#if !GTEST_OS_WINDOWS_MOBILE
|
931
|
-
|
932
|
-
TEST(CaptureTest, CapturesStdout) {
|
933
|
-
CaptureStdout();
|
934
|
-
fprintf(stdout, "abc");
|
935
|
-
EXPECT_STREQ("abc", GetCapturedStdout().c_str());
|
936
|
-
|
937
|
-
CaptureStdout();
|
938
|
-
fprintf(stdout, "def%cghi", '\0');
|
939
|
-
EXPECT_EQ(::std::string("def\0ghi", 7), ::std::string(GetCapturedStdout()));
|
940
|
-
}
|
941
|
-
|
942
|
-
TEST(CaptureTest, CapturesStderr) {
|
943
|
-
CaptureStderr();
|
944
|
-
fprintf(stderr, "jkl");
|
945
|
-
EXPECT_STREQ("jkl", GetCapturedStderr().c_str());
|
946
|
-
|
947
|
-
CaptureStderr();
|
948
|
-
fprintf(stderr, "jkl%cmno", '\0');
|
949
|
-
EXPECT_EQ(::std::string("jkl\0mno", 7), ::std::string(GetCapturedStderr()));
|
950
|
-
}
|
951
|
-
|
952
|
-
// Tests that stdout and stderr capture don't interfere with each other.
|
953
|
-
TEST(CaptureTest, CapturesStdoutAndStderr) {
|
954
|
-
CaptureStdout();
|
955
|
-
CaptureStderr();
|
956
|
-
fprintf(stdout, "pqr");
|
957
|
-
fprintf(stderr, "stu");
|
958
|
-
EXPECT_STREQ("pqr", GetCapturedStdout().c_str());
|
959
|
-
EXPECT_STREQ("stu", GetCapturedStderr().c_str());
|
960
|
-
}
|
961
|
-
|
962
|
-
TEST(CaptureDeathTest, CannotReenterStdoutCapture) {
|
963
|
-
CaptureStdout();
|
964
|
-
EXPECT_DEATH_IF_SUPPORTED(CaptureStdout(),
|
965
|
-
"Only one stdout capturer can exist at a time");
|
966
|
-
GetCapturedStdout();
|
967
|
-
|
968
|
-
// We cannot test stderr capturing using death tests as they use it
|
969
|
-
// themselves.
|
970
|
-
}
|
971
|
-
|
972
|
-
#endif // !GTEST_OS_WINDOWS_MOBILE
|
973
|
-
|
974
|
-
TEST(ThreadLocalTest, DefaultConstructorInitializesToDefaultValues) {
|
975
|
-
ThreadLocal<int> t1;
|
976
|
-
EXPECT_EQ(0, t1.get());
|
977
|
-
|
978
|
-
ThreadLocal<void*> t2;
|
979
|
-
EXPECT_TRUE(t2.get() == NULL);
|
980
|
-
}
|
981
|
-
|
982
|
-
TEST(ThreadLocalTest, SingleParamConstructorInitializesToParam) {
|
983
|
-
ThreadLocal<int> t1(123);
|
984
|
-
EXPECT_EQ(123, t1.get());
|
985
|
-
|
986
|
-
int i = 0;
|
987
|
-
ThreadLocal<int*> t2(&i);
|
988
|
-
EXPECT_EQ(&i, t2.get());
|
989
|
-
}
|
990
|
-
|
991
|
-
class NoDefaultContructor {
|
992
|
-
public:
|
993
|
-
explicit NoDefaultContructor(const char*) {}
|
994
|
-
NoDefaultContructor(const NoDefaultContructor&) {}
|
995
|
-
};
|
996
|
-
|
997
|
-
TEST(ThreadLocalTest, ValueDefaultContructorIsNotRequiredForParamVersion) {
|
998
|
-
ThreadLocal<NoDefaultContructor> bar(NoDefaultContructor("foo"));
|
999
|
-
bar.pointer();
|
1000
|
-
}
|
1001
|
-
|
1002
|
-
TEST(ThreadLocalTest, GetAndPointerReturnSameValue) {
|
1003
|
-
ThreadLocal<std::string> thread_local_string;
|
1004
|
-
|
1005
|
-
EXPECT_EQ(thread_local_string.pointer(), &(thread_local_string.get()));
|
1006
|
-
|
1007
|
-
// Verifies the condition still holds after calling set.
|
1008
|
-
thread_local_string.set("foo");
|
1009
|
-
EXPECT_EQ(thread_local_string.pointer(), &(thread_local_string.get()));
|
1010
|
-
}
|
1011
|
-
|
1012
|
-
TEST(ThreadLocalTest, PointerAndConstPointerReturnSameValue) {
|
1013
|
-
ThreadLocal<std::string> thread_local_string;
|
1014
|
-
const ThreadLocal<std::string>& const_thread_local_string =
|
1015
|
-
thread_local_string;
|
1016
|
-
|
1017
|
-
EXPECT_EQ(thread_local_string.pointer(), const_thread_local_string.pointer());
|
1018
|
-
|
1019
|
-
thread_local_string.set("foo");
|
1020
|
-
EXPECT_EQ(thread_local_string.pointer(), const_thread_local_string.pointer());
|
1021
|
-
}
|
1022
|
-
|
1023
|
-
#if GTEST_IS_THREADSAFE
|
1024
|
-
|
1025
|
-
void AddTwo(int* param) { *param += 2; }
|
1026
|
-
|
1027
|
-
TEST(ThreadWithParamTest, ConstructorExecutesThreadFunc) {
|
1028
|
-
int i = 40;
|
1029
|
-
ThreadWithParam<int*> thread(&AddTwo, &i, NULL);
|
1030
|
-
thread.Join();
|
1031
|
-
EXPECT_EQ(42, i);
|
1032
|
-
}
|
1033
|
-
|
1034
|
-
TEST(MutexDeathTest, AssertHeldShouldAssertWhenNotLocked) {
|
1035
|
-
// AssertHeld() is flaky only in the presence of multiple threads accessing
|
1036
|
-
// the lock. In this case, the test is robust.
|
1037
|
-
EXPECT_DEATH_IF_SUPPORTED({
|
1038
|
-
Mutex m;
|
1039
|
-
{ MutexLock lock(&m); }
|
1040
|
-
m.AssertHeld();
|
1041
|
-
},
|
1042
|
-
"thread .*hold");
|
1043
|
-
}
|
1044
|
-
|
1045
|
-
TEST(MutexTest, AssertHeldShouldNotAssertWhenLocked) {
|
1046
|
-
Mutex m;
|
1047
|
-
MutexLock lock(&m);
|
1048
|
-
m.AssertHeld();
|
1049
|
-
}
|
1050
|
-
|
1051
|
-
class AtomicCounterWithMutex {
|
1052
|
-
public:
|
1053
|
-
explicit AtomicCounterWithMutex(Mutex* mutex) :
|
1054
|
-
value_(0), mutex_(mutex), random_(42) {}
|
1055
|
-
|
1056
|
-
void Increment() {
|
1057
|
-
MutexLock lock(mutex_);
|
1058
|
-
int temp = value_;
|
1059
|
-
{
|
1060
|
-
// We need to put up a memory barrier to prevent reads and writes to
|
1061
|
-
// value_ rearranged with the call to SleepMilliseconds when observed
|
1062
|
-
// from other threads.
|
1063
|
-
#if GTEST_HAS_PTHREAD
|
1064
|
-
// On POSIX, locking a mutex puts up a memory barrier. We cannot use
|
1065
|
-
// Mutex and MutexLock here or rely on their memory barrier
|
1066
|
-
// functionality as we are testing them here.
|
1067
|
-
pthread_mutex_t memory_barrier_mutex;
|
1068
|
-
GTEST_CHECK_POSIX_SUCCESS_(
|
1069
|
-
pthread_mutex_init(&memory_barrier_mutex, NULL));
|
1070
|
-
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&memory_barrier_mutex));
|
1071
|
-
|
1072
|
-
SleepMilliseconds(random_.Generate(30));
|
1073
|
-
|
1074
|
-
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&memory_barrier_mutex));
|
1075
|
-
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&memory_barrier_mutex));
|
1076
|
-
#elif GTEST_OS_WINDOWS
|
1077
|
-
// On Windows, performing an interlocked access puts up a memory barrier.
|
1078
|
-
volatile LONG dummy = 0;
|
1079
|
-
::InterlockedIncrement(&dummy);
|
1080
|
-
SleepMilliseconds(random_.Generate(30));
|
1081
|
-
::InterlockedIncrement(&dummy);
|
1082
|
-
#else
|
1083
|
-
# error "Memory barrier not implemented on this platform."
|
1084
|
-
#endif // GTEST_HAS_PTHREAD
|
1085
|
-
}
|
1086
|
-
value_ = temp + 1;
|
1087
|
-
}
|
1088
|
-
int value() const { return value_; }
|
1089
|
-
|
1090
|
-
private:
|
1091
|
-
volatile int value_;
|
1092
|
-
Mutex* const mutex_; // Protects value_.
|
1093
|
-
Random random_;
|
1094
|
-
};
|
1095
|
-
|
1096
|
-
void CountingThreadFunc(pair<AtomicCounterWithMutex*, int> param) {
|
1097
|
-
for (int i = 0; i < param.second; ++i)
|
1098
|
-
param.first->Increment();
|
1099
|
-
}
|
1100
|
-
|
1101
|
-
// Tests that the mutex only lets one thread at a time to lock it.
|
1102
|
-
TEST(MutexTest, OnlyOneThreadCanLockAtATime) {
|
1103
|
-
Mutex mutex;
|
1104
|
-
AtomicCounterWithMutex locked_counter(&mutex);
|
1105
|
-
|
1106
|
-
typedef ThreadWithParam<pair<AtomicCounterWithMutex*, int> > ThreadType;
|
1107
|
-
const int kCycleCount = 20;
|
1108
|
-
const int kThreadCount = 7;
|
1109
|
-
scoped_ptr<ThreadType> counting_threads[kThreadCount];
|
1110
|
-
Notification threads_can_start;
|
1111
|
-
// Creates and runs kThreadCount threads that increment locked_counter
|
1112
|
-
// kCycleCount times each.
|
1113
|
-
for (int i = 0; i < kThreadCount; ++i) {
|
1114
|
-
counting_threads[i].reset(new ThreadType(&CountingThreadFunc,
|
1115
|
-
make_pair(&locked_counter,
|
1116
|
-
kCycleCount),
|
1117
|
-
&threads_can_start));
|
1118
|
-
}
|
1119
|
-
threads_can_start.Notify();
|
1120
|
-
for (int i = 0; i < kThreadCount; ++i)
|
1121
|
-
counting_threads[i]->Join();
|
1122
|
-
|
1123
|
-
// If the mutex lets more than one thread to increment the counter at a
|
1124
|
-
// time, they are likely to encounter a race condition and have some
|
1125
|
-
// increments overwritten, resulting in the lower then expected counter
|
1126
|
-
// value.
|
1127
|
-
EXPECT_EQ(kCycleCount * kThreadCount, locked_counter.value());
|
1128
|
-
}
|
1129
|
-
|
1130
|
-
template <typename T>
|
1131
|
-
void RunFromThread(void (func)(T), T param) {
|
1132
|
-
ThreadWithParam<T> thread(func, param, NULL);
|
1133
|
-
thread.Join();
|
1134
|
-
}
|
1135
|
-
|
1136
|
-
void RetrieveThreadLocalValue(
|
1137
|
-
pair<ThreadLocal<std::string>*, std::string*> param) {
|
1138
|
-
*param.second = param.first->get();
|
1139
|
-
}
|
1140
|
-
|
1141
|
-
TEST(ThreadLocalTest, ParameterizedConstructorSetsDefault) {
|
1142
|
-
ThreadLocal<std::string> thread_local_string("foo");
|
1143
|
-
EXPECT_STREQ("foo", thread_local_string.get().c_str());
|
1144
|
-
|
1145
|
-
thread_local_string.set("bar");
|
1146
|
-
EXPECT_STREQ("bar", thread_local_string.get().c_str());
|
1147
|
-
|
1148
|
-
std::string result;
|
1149
|
-
RunFromThread(&RetrieveThreadLocalValue,
|
1150
|
-
make_pair(&thread_local_string, &result));
|
1151
|
-
EXPECT_STREQ("foo", result.c_str());
|
1152
|
-
}
|
1153
|
-
|
1154
|
-
// Keeps track of whether of destructors being called on instances of
|
1155
|
-
// DestructorTracker. On Windows, waits for the destructor call reports.
|
1156
|
-
class DestructorCall {
|
1157
|
-
public:
|
1158
|
-
DestructorCall() {
|
1159
|
-
invoked_ = false;
|
1160
|
-
#if GTEST_OS_WINDOWS
|
1161
|
-
wait_event_.Reset(::CreateEvent(NULL, TRUE, FALSE, NULL));
|
1162
|
-
GTEST_CHECK_(wait_event_.Get() != NULL);
|
1163
|
-
#endif
|
1164
|
-
}
|
1165
|
-
|
1166
|
-
bool CheckDestroyed() const {
|
1167
|
-
#if GTEST_OS_WINDOWS
|
1168
|
-
if (::WaitForSingleObject(wait_event_.Get(), 1000) != WAIT_OBJECT_0)
|
1169
|
-
return false;
|
1170
|
-
#endif
|
1171
|
-
return invoked_;
|
1172
|
-
}
|
1173
|
-
|
1174
|
-
void ReportDestroyed() {
|
1175
|
-
invoked_ = true;
|
1176
|
-
#if GTEST_OS_WINDOWS
|
1177
|
-
::SetEvent(wait_event_.Get());
|
1178
|
-
#endif
|
1179
|
-
}
|
1180
|
-
|
1181
|
-
static std::vector<DestructorCall*>& List() { return *list_; }
|
1182
|
-
|
1183
|
-
static void ResetList() {
|
1184
|
-
for (size_t i = 0; i < list_->size(); ++i) {
|
1185
|
-
delete list_->at(i);
|
1186
|
-
}
|
1187
|
-
list_->clear();
|
1188
|
-
}
|
1189
|
-
|
1190
|
-
private:
|
1191
|
-
bool invoked_;
|
1192
|
-
#if GTEST_OS_WINDOWS
|
1193
|
-
AutoHandle wait_event_;
|
1194
|
-
#endif
|
1195
|
-
static std::vector<DestructorCall*>* const list_;
|
1196
|
-
|
1197
|
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(DestructorCall);
|
1198
|
-
};
|
1199
|
-
|
1200
|
-
std::vector<DestructorCall*>* const DestructorCall::list_ =
|
1201
|
-
new std::vector<DestructorCall*>;
|
1202
|
-
|
1203
|
-
// DestructorTracker keeps track of whether its instances have been
|
1204
|
-
// destroyed.
|
1205
|
-
class DestructorTracker {
|
1206
|
-
public:
|
1207
|
-
DestructorTracker() : index_(GetNewIndex()) {}
|
1208
|
-
DestructorTracker(const DestructorTracker& /* rhs */)
|
1209
|
-
: index_(GetNewIndex()) {}
|
1210
|
-
~DestructorTracker() {
|
1211
|
-
// We never access DestructorCall::List() concurrently, so we don't need
|
1212
|
-
// to protect this acccess with a mutex.
|
1213
|
-
DestructorCall::List()[index_]->ReportDestroyed();
|
1214
|
-
}
|
1215
|
-
|
1216
|
-
private:
|
1217
|
-
static size_t GetNewIndex() {
|
1218
|
-
DestructorCall::List().push_back(new DestructorCall);
|
1219
|
-
return DestructorCall::List().size() - 1;
|
1220
|
-
}
|
1221
|
-
const size_t index_;
|
1222
|
-
|
1223
|
-
GTEST_DISALLOW_ASSIGN_(DestructorTracker);
|
1224
|
-
};
|
1225
|
-
|
1226
|
-
typedef ThreadLocal<DestructorTracker>* ThreadParam;
|
1227
|
-
|
1228
|
-
void CallThreadLocalGet(ThreadParam thread_local_param) {
|
1229
|
-
thread_local_param->get();
|
1230
|
-
}
|
1231
|
-
|
1232
|
-
// Tests that when a ThreadLocal object dies in a thread, it destroys
|
1233
|
-
// the managed object for that thread.
|
1234
|
-
TEST(ThreadLocalTest, DestroysManagedObjectForOwnThreadWhenDying) {
|
1235
|
-
DestructorCall::ResetList();
|
1236
|
-
|
1237
|
-
{
|
1238
|
-
ThreadLocal<DestructorTracker> thread_local_tracker;
|
1239
|
-
ASSERT_EQ(0U, DestructorCall::List().size());
|
1240
|
-
|
1241
|
-
// This creates another DestructorTracker object for the main thread.
|
1242
|
-
thread_local_tracker.get();
|
1243
|
-
ASSERT_EQ(1U, DestructorCall::List().size());
|
1244
|
-
ASSERT_FALSE(DestructorCall::List()[0]->CheckDestroyed());
|
1245
|
-
}
|
1246
|
-
|
1247
|
-
// Now thread_local_tracker has died.
|
1248
|
-
ASSERT_EQ(1U, DestructorCall::List().size());
|
1249
|
-
EXPECT_TRUE(DestructorCall::List()[0]->CheckDestroyed());
|
1250
|
-
|
1251
|
-
DestructorCall::ResetList();
|
1252
|
-
}
|
1253
|
-
|
1254
|
-
// Tests that when a thread exits, the thread-local object for that
|
1255
|
-
// thread is destroyed.
|
1256
|
-
TEST(ThreadLocalTest, DestroysManagedObjectAtThreadExit) {
|
1257
|
-
DestructorCall::ResetList();
|
1258
|
-
|
1259
|
-
{
|
1260
|
-
ThreadLocal<DestructorTracker> thread_local_tracker;
|
1261
|
-
ASSERT_EQ(0U, DestructorCall::List().size());
|
1262
|
-
|
1263
|
-
// This creates another DestructorTracker object in the new thread.
|
1264
|
-
ThreadWithParam<ThreadParam> thread(
|
1265
|
-
&CallThreadLocalGet, &thread_local_tracker, NULL);
|
1266
|
-
thread.Join();
|
1267
|
-
|
1268
|
-
// The thread has exited, and we should have a DestroyedTracker
|
1269
|
-
// instance created for it. But it may not have been destroyed yet.
|
1270
|
-
ASSERT_EQ(1U, DestructorCall::List().size());
|
1271
|
-
}
|
1272
|
-
|
1273
|
-
// The thread has exited and thread_local_tracker has died.
|
1274
|
-
ASSERT_EQ(1U, DestructorCall::List().size());
|
1275
|
-
EXPECT_TRUE(DestructorCall::List()[0]->CheckDestroyed());
|
1276
|
-
|
1277
|
-
DestructorCall::ResetList();
|
1278
|
-
}
|
1279
|
-
|
1280
|
-
TEST(ThreadLocalTest, ThreadLocalMutationsAffectOnlyCurrentThread) {
|
1281
|
-
ThreadLocal<std::string> thread_local_string;
|
1282
|
-
thread_local_string.set("Foo");
|
1283
|
-
EXPECT_STREQ("Foo", thread_local_string.get().c_str());
|
1284
|
-
|
1285
|
-
std::string result;
|
1286
|
-
RunFromThread(&RetrieveThreadLocalValue,
|
1287
|
-
make_pair(&thread_local_string, &result));
|
1288
|
-
EXPECT_TRUE(result.empty());
|
1289
|
-
}
|
1290
|
-
|
1291
|
-
#endif // GTEST_IS_THREADSAFE
|
1292
|
-
|
1293
|
-
#if GTEST_OS_WINDOWS
|
1294
|
-
TEST(WindowsTypesTest, HANDLEIsVoidStar) {
|
1295
|
-
StaticAssertTypeEq<HANDLE, void*>();
|
1296
|
-
}
|
1297
|
-
|
1298
|
-
TEST(WindowsTypesTest, CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION) {
|
1299
|
-
StaticAssertTypeEq<CRITICAL_SECTION, _RTL_CRITICAL_SECTION>();
|
1300
|
-
}
|
1301
|
-
#endif // GTEST_OS_WINDOWS
|
1302
|
-
|
1303
|
-
} // namespace internal
|
1304
|
-
} // namespace testing
|