use a zip archive with everything inside for tests

This commit is contained in:
Théo DELRIEU 2018-09-20 18:17:02 +02:00
parent c3d07d39af
commit fdfc240bb2
No known key found for this signature in database
GPG Key ID: A5A505438C20539A
1073 changed files with 14 additions and 1284 deletions

View File

@ -93,24 +93,22 @@ endif()
include(ExternalData) include(ExternalData)
set(ExternalData_URL_TEMPLATES set(ExternalData_URL_TEMPLATES
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/big-list-of-naughty-strings/%(hash)" "https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/cbor_regression/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/json-patch-tests/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/json.org/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/json_nlohmann_tests/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/json_roundtrip/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/json_tests/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/json_testsuite/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/markus_kuhn/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/nst_json_testsuite/test_parsing/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/nst_json_testsuite2/test_parsing/%(hash)"
"https://github.com/theodelrieu/cmake_external_data/raw/master/json/%(algo)/regression/%(hash)"
) )
set(ExternalData_BINARY_ROOT ${CMAKE_BINARY_DIR}/data)
# Force download of every test file ExternalData_Expand_Arguments(json_test_data _ DATA{data/json_data.zip})
ExternalData_Expand_Arguments(json_test_data _ DATA{data/,RECURSE:,REGEX:.*})
ExternalData_Add_Target(json_test_data) ExternalData_Add_Target(json_test_data)
add_custom_target(unzip_json_test_data)
add_dependencies(unzip_json_test_data json_test_data)
add_custom_command(TARGET unzip_json_test_data PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/data/
COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_BINARY_DIR}/data/test/data/json_data.zip ${CMAKE_CURRENT_BINARY_DIR}/data
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Unpacking json test data..."
VERBATIM)
file(GLOB files "src/unit-*.cpp") file(GLOB files "src/unit-*.cpp")
foreach(file ${files}) foreach(file ${files})
get_filename_component(file_basename ${file} NAME_WE) get_filename_component(file_basename ${file} NAME_WE)
@ -155,5 +153,5 @@ foreach(file ${files})
set_tests_properties("${testcase}_valgrind" PROPERTIES LABELS "valgrind") set_tests_properties("${testcase}_valgrind" PROPERTIES LABELS "valgrind")
endif() endif()
add_dependencies(${testcase} json_test_data) add_dependencies(${testcase} unzip_json_test_data)
endforeach() endforeach()

View File

@ -1,22 +0,0 @@
The MIT License (MIT)
Copyright (c) 2015 Max Woolf
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1 +0,0 @@
6ea2e2a76f7ba084b93bbb43479e44dd22fdaa1c403502e868c081408c5e5f66

View File

@ -1 +0,0 @@
4c9942d3d7db0f470b9faa46c811a52046d3f391b382747a4d1e0922c76a87ca

View File

@ -1 +0,0 @@
b0558456ed284a9c6301c1fc265ffb8ae9f720bc0a83b2d4af121e77e67e6427

View File

@ -1 +0,0 @@
54e9e6a4ea427f8b294cc85eec5614519e775fc196a86a7456394f288d8ae28a

View File

@ -1 +0,0 @@
2b2a7940620935c2813c0a8fcbca4117cfac3f7471a92a1c5f6d77e420f57269

View File

@ -1 +0,0 @@
cf5dad6f0dc030863318689482d867b9282edd1d88db645f2c5fbeee8d8459f2

View File

@ -1 +0,0 @@
af099af08cc608bcaa986ab1395c6c6a3de1a130e039552b54a106233b5e17ad

View File

@ -1 +0,0 @@
77e598866dc02bc2dfefa1a52749af73130289bba2fba09b03993187f15735a4

View File

@ -1 +0,0 @@
1ba4afaaa2850cb91ac3d2cb49b9dd2ecdd3430bcbda6a153529c28ab0ed008f

View File

@ -1 +0,0 @@
49ebc900f8c9723c5f62487bae51db507dd8bac797abb5416075f5d495dc51f0

View File

@ -1 +0,0 @@
620a853fb1261b0bd12748efb46f38eac2c70a1bed550562f9332e7f730ef7d4

View File

@ -1 +0,0 @@
0df5fc1b391a555ca59a9d2cdff7a731c28e96f814051cb13b80eee39f7ff00e

View File

@ -1 +0,0 @@
4bce5f7dc5b314aaa90d6e30f4e936489b7f9f0b327e006bbba81ceeb8c79224

View File

@ -1 +0,0 @@
837d6de2eb3e3392aaf63c1e1cf518855b8990fd5b10e8e51f572be4cabceae7

View File

@ -1 +0,0 @@
072ec7eaac2c09f2c82037089f01775ee3b465b2551da87fcf341aaaf17a9acc

View File

@ -1 +0,0 @@
3d309d17c75cb989abb9a6e775ca7d480ae7d13460c6801538ce9b3afe01c16b

View File

@ -1 +0,0 @@
92adf1f61f37e431b3fd4d923d54a2e998152164f6d7e8f81d3fdfacc0c6d016

View File

@ -1 +0,0 @@
67f44b58d0fca85ce58e8617759591bd8c7e6fdbb3628d20f2769e0a968792b1

View File

@ -1 +0,0 @@
499c8d5dda964353cd620f7d3bbba5b5be614fc547d26e062daa9ad7333646db

View File

@ -1 +0,0 @@
cc4813bef02b0cabbc973f32aa612d0bac8a80e5a7e593db6f7b454921b8730c

View File

@ -1 +0,0 @@
995f6070ab65101299a8ce5310aa562b3f5554c5f22c04ee3a51efcfce25fc73

View File

@ -1 +0,0 @@
87e94a78efc6f39930964478536e0beed1150a6dee64c7f29c55952671086fd6

View File

@ -1,75 +0,0 @@
JSON Patch Tests
================
These are test cases for implementations of [IETF JSON Patch (RFC6902)](http://tools.ietf.org/html/rfc6902).
Some implementations can be found at [jsonpatch.com](http://jsonpatch.com).
Test Format
-----------
Each test file is a JSON document that contains an array of test records. A
test record is an object with the following members:
- doc: The JSON document to test against
- patch: The patch(es) to apply
- expected: The expected resulting document, OR
- error: A string describing an expected error
- comment: A string describing the test
- disabled: True if the test should be skipped
All fields except 'doc' and 'patch' are optional. Test records consisting only
of a comment are also OK.
Files
-----
- tests.json: the main test file
- spec_tests.json: tests from the RFC6902 spec
Writing Tests
-------------
All tests should have a descriptive comment. Tests should be as
simple as possible - just what's required to test a specific piece of
behavior. If you want to test interacting behaviors, create tests for
each behavior as well as the interaction.
If an 'error' member is specified, the error text should describe the
error the implementation should raise - *not* what's being tested.
Implementation error strings will vary, but the suggested error should
be easily matched to the implementation error string. Try to avoid
creating error tests that might pass because an incorrect error was
reported.
Please feel free to contribute!
Credits
-------
The seed test set was adapted from Byron Ruth's
[jsonpatch-js](https://github.com/bruth/jsonpatch-js/blob/master/test.js) and
extended by [Mike McCabe](https://github.com/mikemccabe).
License
-------
Copyright 2014 The Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1 +0,0 @@
a26b050292207033e5cccc5d6102b7bd6f8add7db0d0680e5d46a7ecf40a8c7b

View File

@ -1 +0,0 @@
76e630779fbf544b13caf573daf9f4a10b06f142ca361eae0139383d713e258c

View File

@ -1 +0,0 @@
7a5a294c922bf20d55be4faf9387b3c9dc0f774e0af80c5b7c1c494f8022c6c4

View File

@ -1 +0,0 @@
082e673e1c1ff2320d77d479592b4e8d707f3aa8c20cebf57419098ebd62700c

View File

@ -1 +0,0 @@
b03c70f84fecd61f88de1d480a6b151157db38d1459d79fcb08046189946e6ae

View File

@ -1 +0,0 @@
b8f72b0a8950a1d8482b6c3817cfefdb46fb99907f6287dc03da7beb977e654d

View File

@ -1 +0,0 @@
d5fe04fd16232fa122c47e97fb185c53061a32fba129db70cb8de728ffd56107

View File

@ -1 +0,0 @@
6506acea14e48cdb2b7b895f4b9cd2f69d17163f610b1b1e288aaceb3ce67804

View File

@ -1 +0,0 @@
bcf0193107b78a8835fe4bbbee161caa6d803d709cff043f2a1191a49d117c7b

View File

@ -1 +0,0 @@
64ec80bb29013170da233dec8e9115ad269404a035406532c0bd641d12604f30

View File

@ -1 +0,0 @@
1257e19ef695e617bd123cb36acf7af6089dd37256fb25728943beffb1d46b70

View File

@ -1 +0,0 @@
e31ca6f72247bc410b2d85e62acbea3ef41e04c6907cdaf5b981bd4d79bcd33d

View File

@ -1 +0,0 @@
3e1c61bf41db079a61c1e6ab02bb9b0e4391bee0c3d37171b0ff33062b7bbb14

View File

@ -1 +0,0 @@
192242979723cd2c8022915eaf67703e18edb6dfdcd9886a3f6679a4df031a54

View File

@ -1 +0,0 @@
ed77d9a31ac8fccde3f72bc5f3ee5e3d6cd33b502797724eac7ee7941c6059e3

View File

@ -1 +0,0 @@
165fc1fc8d88d8b0b7582de8adba35fb532a11da8b2cef9b8d5dcce6fdb733df

View File

@ -1 +0,0 @@
a544d810cdc6b2ac744ff936c61ea9867de9769ba92df0a3638e8df50f2f8158

View File

@ -1 +0,0 @@
9a718353e1354bfe0629705cff897c079fdcf62d1549ea377565bcc31bbe9df8

View File

@ -1 +0,0 @@
5cd9c486667061e1acbe801311eb48603ceeddfa1a161eda67b62c6f3c78bfb1

View File

@ -1 +0,0 @@
daae5cb8a32cf35f00b375606730c5d21edd835f5b3697b5e35376fb0d479008

View File

@ -1 +0,0 @@
ca990bbe9072b74a586d35691094a752e1327f3f322367acde3f3c9775ffb17e

View File

@ -1 +0,0 @@
cbece156ebf8dcb0275702f04c25872cc3de473fde665ea09a407fd7005c6776

View File

@ -0,0 +1 @@
a8d231c924d7dd5a016f8a5addf95b6b0ed71cde90daa4b085e0f4bb7740e00b

View File

@ -1 +0,0 @@
60913691c50904fc27d997c3e5887a58274087b34dc35786ad1c6ad379f1a016

View File

@ -1 +0,0 @@
25f1cefa27219fea0df2b08fa182dec1647c5870a3b258455cd7617ea9e9773b

View File

@ -1 +0,0 @@
4722e1348ee7931d4099ec5d6bddada335bae416ffd37a159a669b48e3c8d251

View File

@ -1 +0,0 @@
13dae88a4904da24516c4587a4c79b9f37d3af014a65930758928e34351c5d13

View File

@ -1 +0,0 @@
1ebda847467c2b491d945ef5eb28c6828d2793416a6f62b09cb374163772a895

View File

@ -1 +0,0 @@
a0c352dc33656abfe54a532748a103522729c699b9d8ba9d06eaa34457fd6544

View File

@ -1 +0,0 @@
d37a9083fed1fd83f9cbc9e828d6ba77414bbc4157dee32e2b973c94f8dfb3a2

View File

@ -1 +0,0 @@
ba3c63c2b85eb22eaf8c7a61cf2c72d34d0968c3556eef3f74b94052bf587412

View File

@ -1 +0,0 @@
1d8fc6ceb1f94c6326d6d5483d258fcb2e179e9869325b245d105c2219bf69fd

View File

@ -1 +0,0 @@
4ea3c0a00627680bac5057bf7ad0c7522ffbfe3e53560c1a6c979c3b6b5f41ce

View File

@ -1 +0,0 @@
8226e9c1e23220f9d0bd31808a0acd488995205a657445301e7e4b8e69c9c1b4

View File

@ -1 +0,0 @@
8f8874de0fd5126068520065b9c01cf7a821cf1f1b84f346dd706e98a56c638f

View File

@ -1 +0,0 @@
1c28f2eb0958c3d15db1f0f0e7f2b8998ca2b8f67ab426a1fbb3d561fe76fad9

View File

@ -1 +0,0 @@
74c17e2a340b29b3ba7732fe1f4c161569b4936057d4a6f7ac815ef23edbd125

View File

@ -1 +0,0 @@
729b2a4e25b87556c002530dd3132821d83afb35d1ca0af8d858719e502616e2

View File

@ -1 +0,0 @@
8ccd612937023675de7fc67ff40863cc56d4975dff0f995ffe593826cc7a3e3f

View File

@ -1 +0,0 @@
456e2e3fa05ee1e2f4e529558008ce162bbd388a9dd4a923c79543a4a1dba618

View File

@ -1 +0,0 @@
5a9390001cff9e129803228e2419de9f29788d637f89371b7f42fdbf18b79bea

View File

@ -1 +0,0 @@
9037f92bc91fdcc764a89d9144c341d887ffc83351cc8cf0530555c89920a47d

View File

@ -1 +0,0 @@
1d25d76040a1e986b1d60f2cf3209a81bfbf32007d63ff461535a9d73d90ebf4

View File

@ -1 +0,0 @@
d0bca111f8628137adc4c16f123496dcdd1d590d06cb5d9acd68b39fe656fb97

View File

@ -1 +0,0 @@
0286c25d3712308ca150e93b5100be3a7c97cd79388a740f4377433277e9913c

View File

@ -1 +0,0 @@
1444d11aa9773a7af9918293db6570ff4402cfb095b45dca24ecab6e80c1d1eb

View File

@ -1 +0,0 @@
544359b19c4566cef117f55a27aff340943968ffaf6de25d4e784612ae2b0b68

View File

@ -1 +0,0 @@
94edc6173bb7fdb250660a8d91b5ff93cba1bf90e618c7893dd78660cc909bda

View File

@ -1 +0,0 @@
38dd14c4da47b9d8e33fbc6c19ab6f4171cc8bd3cd3d5040556d2ed8a1d91443

View File

@ -1 +0,0 @@
76be8b528d0075f7aae98d6fa57a6d3c83ae480a8469e668d7b0af968995ac71

View File

@ -1 +0,0 @@
9e076ceaf246b6003d9c2680a2b4cf0bffd069805902b0b5edeebf49039fe4bd

View File

@ -1 +0,0 @@
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945

View File

@ -1 +0,0 @@
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945

View File

@ -1 +0,0 @@
c19a797fa1fd590cd2e5b42d1cf5f246e29b91684e2f87404b81dc345c7a56a0

View File

@ -1 +0,0 @@
76be8b528d0075f7aae98d6fa57a6d3c83ae480a8469e668d7b0af968995ac71

View File

@ -1 +0,0 @@
44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a

View File

@ -1 +0,0 @@
44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a

View File

@ -1 +0,0 @@
7be4753cd54111abb56c944c5959d60bf79da015cf82a3ea402e680090fec99c

View File

@ -1 +0,0 @@
347c9071663ba465de7865c7af993b7f75f57dbf4441854b77ad2bd8e931716d

View File

@ -1 +0,0 @@
463f2998327eb3a694145e6014444480b2235be84aa6cfd57871cc64f1cd816c

View File

@ -1 +0,0 @@
ee6b2ab3d9d31f35ba7c29ae0e985a323744b113f6cbfaafe2c74e7c50d4f73a

View File

@ -1 +0,0 @@
2b03a649d6ce093e2a6a90ab4638f896d4362a7fb093ac4a2f2aa688610383bc

View File

@ -1 +0,0 @@
4c128a3b684d83293df4b078bb6b7bfeae83865c8eb3a82bff04111681e13387

View File

@ -1 +0,0 @@
7a38bf81f383f69433ad6e900d35b3e2385593f76a7b7ab5d4355b8ba41ee24b

View File

@ -1 +0,0 @@
7fe98bbdd3946540851adf4c8294b1233b7bafcd30b51e822e333f43c3341900

View File

@ -1 +0,0 @@
ecfa69fc0fb10a608b01d2ca1e39a65b1edf5e219a6eae582ba921d53bf2d33e

View File

@ -1 +0,0 @@
71dd6a4d9a62c5ee85440c973ff3495078c4d967bbcb7898730dbd0c307a512d

View File

@ -1 +0,0 @@
6fb73b8ad3aff90c0318bef81cc8023668dd6de0a29946d2d942238abb54fc46

View File

@ -1 +0,0 @@
3b1bf510909519ca04a40ec43fb298e295b87cfc8bff646659eb484a5f051df2

View File

@ -1 +0,0 @@
0907926ca3287011e38a00d7e01cdddbcaebba385b0e6aeba263ff97bae08302

View File

@ -1 +0,0 @@
6cd06927670bdad21338ca679d3566ee6bc744e6a43c9130b36b85d0c6397c61

View File

@ -1 +0,0 @@
d124b23c696a85177dac41a7a28c853546e55caa5b4798fb917f2c3dc1b331ce

View File

@ -1 +0,0 @@
ea8e65a201aef1f8a8ca1b072a586667d7b1de76c5d4c90ea0120c3eddd7f7c2

View File

@ -1 +0,0 @@
9fec924907f98aa4fb1e9870ec6a1246ead10acb001fa6decc225f4e36947dff

View File

@ -1 +0,0 @@
4171c026fc7e5a3da8ecb47f51c47795b8b0926131894097f06cec204745a0d8

Some files were not shown because too many files have changed in this diff Show More