| /third_party/json/tests/src/ |
| H A D | unit-deserialization.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 12 #include <nlohmann/json.hpp> 13 using nlohmann::json; 25 struct SaxEventLogger : public nlohmann::json_sax<json> 39 bool number_integer(json::number_integer_t val) override 45 bool number_unsigned(json::number_unsigned_t val) override 51 bool number_float(json::number_float_t /*val*/, const std::string& s) override 63 bool binary(json::binary_t& val) override 122 bool parse_error(std::size_t position, const std::string& /*last_token*/, const json 394 CHECK(json::parse(v) == json(true)); global() variable 406 CHECK(json::parse(v) == json(true)); global() variable 418 CHECK(json::parse(v) == json(true)); global() variable 435 CHECK(json::parse(v) == json(true)); global() variable 449 CHECK(json::parse(v) == json(true)); global() variable 461 CHECK(json::parse(v) == json(true)); global() variable 489 CHECK(json::parse(std::begin(v), std::end(v)) == json(true)); global() member in std 502 CHECK(json::parse(std::begin(v), std::end(v)) == json(true)); global() member in std 514 CHECK(json::parse(std::begin(v), std::end(v)) == json(true)); global() member in std 526 CHECK(json::parse(std::begin(v), std::end(v)) == json(true)); global() member in std 538 CHECK(json::parse(std::begin(v), std::end(v)) == json(true)); global() member in std 550 CHECK(json::parse(std::begin(v), std::end(v)) == json(true)); global() member in std 589 input_format_t::json, false)); global() member in input_format_t 987 CHECK(json::parse(std::istringstream(s + "null")) == json()); global() variable 1143 CHECK(json::parse(v) == json(true)); global() variable [all...] |
| H A D | unit-class_lexer.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 12 #include <nlohmann/json.hpp> 13 using nlohmann::json; 18 json::lexer::token_type scan_string(const char* s, bool ignore_comments = false); 19 json::lexer::token_type scan_string(const char* s, const bool ignore_comments) in scan_string() 22 return nlohmann::detail::lexer<json, decltype(ia)>(std::move(ia), ignore_comments).scan(); // NOLINT(hicpp-move-const-arg,performance-move-const-arg) in scan_string() 30 auto lexer = nlohmann::detail::lexer<json, decltype(ia)>(std::move(ia), ignore_comments); // NOLINT(hicpp-move-const-arg,performance-move-const-arg) in get_error_message() 41 CHECK((scan_string("[") == json::lexer::token_type::begin_array)); 42 CHECK((scan_string("]") == json [all...] |
| H A D | unit-pointer_access.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 11 #include <nlohmann/json.hpp> 12 using nlohmann::json; 18 using test_type = json::object_t; 19 json value = {{"one", 1}, {"two", 2}}; 35 CHECK(value.get_ptr<json::object_t*>() != nullptr); 36 CHECK(value.get_ptr<json::array_t*>() == nullptr); 37 CHECK(value.get_ptr<json::string_t*>() == nullptr); 38 CHECK(value.get_ptr<json [all...] |
| H A D | unit-iterators1.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 12 #include <nlohmann/json.hpp> 13 using nlohmann::json; 21 json::iterator it; 24 json::const_iterator cit; 30 json j = true; 31 json j_const(j); 33 SECTION("json + begin/end") 35 json [all...] |
| H A D | unit-regression1.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 11 // for some reason including this after the json header leads to linker errors with VS 2017... 15 #include <nlohmann/json.hpp> 16 using nlohmann::json; 105 friend void to_json(json& j, const nocopy& n) in to_json() 119 json j = json::parse(s); 131 CHECK(json(NAN).dump() == "null"); 132 CHECK(json(jso [all...] |
| H A D | unit-bson.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 11 #include <nlohmann/json.hpp> 12 using nlohmann::json; 25 json j = nullptr; 26 CHECK_THROWS_WITH_AS(json::to_bson(j), "[json.exception.type_error.317] to serialize to BSON, top-level type must be object, but is null", json::type_error&); 33 json j = true; 34 CHECK_THROWS_WITH_AS(json [all...] |
| H A D | unit-class_parser.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 12 #include <nlohmann/json.hpp> 13 using nlohmann::json; 37 bool number_integer(json::number_integer_t val) in number_integer() 43 bool number_unsigned(json::number_unsigned_t val) in number_unsigned() 49 bool number_float(json::number_float_t /*unused*/, const std::string& s) in number_float() 61 bool binary(json::binary_t& val) in binary() 120 bool parse_error(std::size_t position, const std::string& /*unused*/, const json::exception& /*unused*/) in parse_error() 131 class SaxCountdown : public nlohmann::json [all...] |
| H A D | unit-class_iterator.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 12 #include <nlohmann/json.hpp> 13 using nlohmann::json; 29 json j(json::value_t::null); 30 json::iterator it(&j); 35 json j(json::value_t::object); 36 json [all...] |
| H A D | unit-constructor2.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 11 #include <nlohmann/json.hpp> 12 using nlohmann::json; 20 json j {{"foo", 1}, {"bar", false}}; 21 json k(j); // NOLINT(performance-unnecessary-copy-initialization) 27 json j {"foo", 1, 42.23, false}; 28 json k(j); // NOLINT(performance-unnecessary-copy-initialization) 34 json j(nullptr); 35 json [all...] |
| H A D | unit-class_const_iterator.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 12 #include <nlohmann/json.hpp> 13 using nlohmann::json; 23 json j(json::value_t::null); 24 json::const_iterator it(&j); 29 json j(json::value_t::object); 30 json [all...] |
| H A D | unit-inspection.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 11 #include <nlohmann/json.hpp> 12 using nlohmann::json; 24 json j {{"foo", 1}, {"bar", false}}; 42 json j {"foo", 1, 1u, 42.23, false}; 60 json j(nullptr); 78 json j(true); 96 json j("Hello world"); 114 json [all...] |
| /foundation/communication/netmanager_ext/test/vpnmanager/unittest/vpn_manager_ext_test/ |
| H A D | networkvpn_service_ext_test.cpp | 102 cJSON *json = cJSON_CreateObject(); in HWTEST_F() local 103 if (json != nullptr) { in HWTEST_F() 104 instance_->ConvertNetAddrToJson(sourAddr, json); in HWTEST_F() 105 instance_->ConvertNetAddrToConfig(destAddr, json); in HWTEST_F() 106 cJSON_Delete(json); in HWTEST_F() 107 json = nullptr; in HWTEST_F() 115 cJSON *json = cJSON_CreateObject(); in HWTEST_F() local 116 if (json != nullptr) { in HWTEST_F() 117 instance_->ConvertNetAddrToConfig(destAddr, json); in HWTEST_F() 118 cJSON_Delete(json); in HWTEST_F() 128 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 149 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 172 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 184 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 205 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 225 cJSON *json = cJSON_CreateObject(); HWTEST_F() local [all...] |
| /foundation/arkui/ace_engine/test/component_test/test_cases/components/scroll_container/entry/src/main/ets/pages/MyTest/ |
| H A D | SwiperIndicatorTest.ets | 57 assertEqual(JSON.parse(JSON.parse(indicator1).$attrs.indicator).itemWidth, '30.00px') 58 assertEqual(JSON.parse(JSON.parse(indicator1).$attrs.indicator).itemHeight, '40.00px') 59 assertEqual(JSON.parse(JSON.parse(indicator1).$attrs.indicator).selectedItemWidth, 61 assertEqual(JSON.parse(JSON.parse(indicator1).$attrs.indicator).selectedItemHeight, 63 assertFalse(JSON.parse(JSON [all...] |
| /foundation/communication/dsoftbus/tests/core/common/json_utils/uttest/ |
| H A D | softbus_json_utils_test.cpp | 54 * @tc.desc: When the json parameter is nullptr, the return value is SOFTBUS_INVALID_PARAM
73 cJSON *json = cJSON_CreateObject();
in HWTEST_F() local 75 int32_t ret = GetStringItemByJsonObject(json, nullptr, target, ARRAY_LEN);
in HWTEST_F() 77 cJSON_Delete(json);
in HWTEST_F() 88 cJSON *json = cJSON_CreateObject();
in HWTEST_F() local 89 int32_t ret = GetStringItemByJsonObject(json, "string", nullptr, ARRAY_LEN);
in HWTEST_F() 91 cJSON_Delete(json);
in HWTEST_F() 96 * @tc.desc: Test returns SOFTBUS_PARSE_JSON_ERR when the specified string does not exist in the json object
102 cJSON *json = cJSON_CreateObject();
in HWTEST_F() local 104 int32_t ret = GetStringItemByJsonObject(json, "strin in HWTEST_F() 117 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 134 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 150 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 173 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 210 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 225 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 239 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 254 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 284 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 299 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 313 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 328 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 345 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 382 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 397 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 411 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 427 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 443 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 473 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 487 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 502 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 517 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 534 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 571 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 585 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 600 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 614 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 634 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 652 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 684 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 699 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 731 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 745 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 759 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 775 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 803 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 818 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 834 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 851 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 884 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 900 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 916 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 933 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 963 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 978 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 992 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 1007 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 1023 cJSON *json = cJSON_CreateObject(); HWTEST_F() local [all...] |
| /third_party/json/docs/mkdocs/docs/home/ |
| H A D | exceptions.md | 7 All exceptions inherit from class `json::exception` (which in turn inherits from `std::exception`). It is used as the base class for all exceptions thrown by the `basic_json` class. This class can hence be used as "wildcard" to catch exceptions. 10 std::exception <|-- json::exception 11 json::exception <|-- json::parse_error 12 json::exception <|-- json::invalid_iterator 13 json::exception <|-- json::type_error 14 json::exception <|-- json [all...] |
| /foundation/arkui/ace_engine/test/component_test/test_cases/components/common/entry/src/main/ets/pages/MyTest/ |
| H A D | BorderTest.ets | 61 assertEqual(JSON.parse(JSON.parse(border1).$attrs.border).width, '10.00vp') 62 assertEqual(JSON.parse(JSON.parse(border1).$attrs.border).color.toLowerCase(), Color.Black) 63 assertEqual(JSON.parse(JSON.parse(border1).$attrs.border).radius, '30.00vp') 64 assertEqual(JSON.parse(JSON.parse(border1).$attrs.border).style, 'BorderStyle.Solid') 67 assertEqual(JSON.parse(JSON [all...] |
| H A D | BorderImageTest_two.ets | 55 assertEqual(JSON.parse(JSON.parse(borderImage1).$attrs.borderImage).slice, '10.00px') 56 assertEqual(JSON.parse(JSON.parse(borderImage1).$attrs.borderImage).colors, 'rgb(72, 61, 139)') 57 assertEqual(JSON.parse(JSON.parse(borderImage1).$attrs.borderImage).direction, GradientDirection.Left) 61 assertEqual(JSON.parse(JSON.parse(borderImage2).$attrs.borderImage).slice, 10) 62 assertEqual(JSON.parse(JSON [all...] |
| /third_party/skia/bench/ |
| H A D | DecodeBench.cpp | 98 "skottie/skottie-text-scale-to-fit-minmax.json")); 100 "skottie/skottie-sphere-effect.json")); 102 "skottie/skottie_sample_multiframe.json")); 104 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_connecting.json", // 216x216 105 "skottie/skottie-phonehub-connecting.json")); 106 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_generic_error.json", // 216x217 107 "skottie/skottie-phonehub-generic-error.json")); 108 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_onboard.json", // 217x217 109 "skottie/skottie-phonehub-onboard.json")); 112 DEF_BENCH(return new SkottieDecodeBench("skottie_phonehub_svgo_connecting.json", [all...] |
| /foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/test/unittest/common/componentloader/src/ |
| H A D | component_loader_test.cpp | 459 cJSON *json = cJSON_CreateObject(); in HWTEST_F() local 460 if (json == nullptr) { in HWTEST_F() 463 cJSON_AddNumberToObject(json, COMP_NAME.c_str(), 4801); in HWTEST_F() 465 from_json(json, cfg); in HWTEST_F() 466 cJSON_Delete(json); in HWTEST_F() 479 cJSON *json = cJSON_CreateObject(); in HWTEST_F() local 480 if (json == nullptr) { in HWTEST_F() 483 cJSON_AddStringToObject(json, COMP_NAME.c_str(), "name"); in HWTEST_F() 484 cJSON_AddNumberToObject(json, COMP_TYPE.c_str(), 0x02); in HWTEST_F() 486 from_json(json, cf in HWTEST_F() 500 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 522 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 545 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 569 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 594 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 620 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 647 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 675 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 704 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 727 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 740 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 754 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 769 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 796 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 829 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 861 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 901 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 914 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 928 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 943 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 959 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 975 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 988 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 1002 cJSON *json = cJSON_CreateObject(); HWTEST_F() local 1017 cJSON *json = cJSON_CreateObject(); HWTEST_F() local [all...] |
| /third_party/typescript/src/testRunner/unittests/config/ |
| H A D | configurationExtension.ts | 7 "dev/node_modules/config-box/package.json": JSON.stringify({
10 tsconfig: "./strict.json"
12 "dev/node_modules/config-box/strict.json": JSON.stringify({
17 "dev/node_modules/config-box/unstrict.json": JSON.stringify({
22 "dev/tsconfig.extendsBox.json": JSON.stringify({
28 "dev/tsconfig.extendsStrict.json" [all...] |
| /third_party/jsoncpp/ |
| H A D | jsoncpp-1.9.5.tar.gz | |
| /foundation/arkui/ace_engine/test/component_test/test_cases/components/button_and_selection/entry/src/main/ets/pages/MyTest/ |
| H A D | ButtonLabelStyleTest.ets | 82 assertEqual(JSON.parse(JSON.parse(labelStyle1).$attrs.labelStyle).overflow, 'TextOverflow.None') 85 assertEqual(JSON.parse(JSON.parse(labelStyle2).$attrs.labelStyle).overflow, 'TextOverflow.Clip') 88 assertEqual(JSON.parse(JSON.parse(labelStyle3).$attrs.labelStyle).overflow, 'TextOverflow.Ellipsis') 91 assertEqual(JSON.parse(JSON.parse(labelStyle4).$attrs.labelStyle).maxLines, '3') 92 assertEqual(JSON.parse(JSON [all...] |
| /third_party/json/tests/benchmarks/src/ |
| H A D | benchmarks.cpp | 2 // __| | __| | | | JSON for Modern C++ (supporting code) 4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json 10 #include <nlohmann/json.hpp> 16 using json = nlohmann::json; 19 // parse JSON from file 28 auto* j = new json(); in ParseFile() 31 *j = json::parse(*f); in ParseFile() 42 BENCHMARK_CAPTURE(ParseFile, jeopardy, TEST_DATA_DIRECTORY "/jeopardy/jeopardy.json"); 43 BENCHMARK_CAPTURE(ParseFile, canada, TEST_DATA_DIRECTORY "/nativejson-benchmark/canada.json"); [all...] |
| /third_party/jerryscript/tests/jerry/ |
| H A D | json-stringify.js | 16 assert (JSON.stringify ("") === '""'); 19 assert (JSON.stringify (normal_string) == '"asdasd"'); 22 assert (JSON.stringify (format_characters) == '"\\ba\\fs\\nd\\ra\\tsd"'); 25 assert (JSON.stringify (ctl_string) == '"asd\\u001fasd"'); 28 assert (JSON.stringify (escpad_string) == '"\\"asdasd"'); 30 assert (JSON.stringify('\u2040') == '"⁀"'); 31 assert (JSON.stringify('abc\u2040\u2030cba') == '"abc⁀‰cba"'); 34 assert (JSON.stringify (1) === '1'); 35 assert (JSON.stringify (true) === 'true'); 36 assert (JSON [all...] |
| /third_party/python/Lib/test/test_json/ |
| H A D | test_fail.py | 5 # https://json.org/JSON_checker/test/fail1.json 6 '"A JSON payload should be an object or array, not a string."', 7 # https://json.org/JSON_checker/test/fail2.json 9 # https://json.org/JSON_checker/test/fail3.json 11 # https://json.org/JSON_checker/test/fail4.json 13 # https://json [all...] |