Home
last modified time | relevance | path

Searched refs:j_array (Results 1 – 25 of 45) sorted by relevance

12

/third_party/json/tests/src/
Dunit-algorithms.cpp16 json j_array = {13, 29, 3, {{"one", 1}, {"two", 2}}, true, false, {1, 2, 3}, "foo", "baz"}; variable
23 CHECK(std::all_of(j_array.begin(), j_array.end(), [](const json & value)
35 CHECK(std::any_of(j_array.begin(), j_array.end(), [](const json & value)
47 CHECK(std::none_of(j_array.begin(), j_array.end(), [](const json & value)
63 std::for_each(j_array.cbegin(), j_array.cend(), [&sum](const json & value)
84 std::for_each(j_array.begin(), j_array.end(), add17);
86 CHECK(j_array[6] == json({1, 2, 3, 17}));
92 CHECK(std::count(j_array.begin(), j_array.end(), json(true)) == 1);
97 CHECK(std::count_if(j_array.begin(), j_array.end(), [](const json & value)
101 CHECK(std::count_if(j_array.begin(), j_array.end(), [](const json&)
[all …]
Dunit-modifiers.cpp512 json j_array = {1, 2, 3, 4}; variable
519 auto it = j_array.insert(j_array.begin(), j_value);
520 CHECK(j_array.size() == 5);
522 CHECK(j_array.begin() == it);
523 CHECK(j_array == json({5, 1, 2, 3, 4}));
528 auto it = j_array.insert(j_array.begin() + 2, j_value);
529 CHECK(j_array.size() == 5);
531 CHECK((it - j_array.begin()) == 2);
532 CHECK(j_array == json({1, 2, 5, 3, 4}));
537 auto it = j_array.insert(j_array.end(), j_value);
[all …]
Dunit-iterators2.cpp247 json j_array = {1, 2, 3, 4, 5, 6}; variable
308 auto it = j_array.begin();
310 CHECK((j_array.begin() + 3) == it);
311 CHECK((3 + j_array.begin()) == it);
312 CHECK((it - 3) == j_array.begin());
313 CHECK((it - j_array.begin()) == 3);
319 auto it = j_array.cbegin();
321 CHECK((j_array.cbegin() + 3) == it);
322 CHECK((3 + j_array.cbegin()) == it);
323 CHECK((it - 3) == j_array.cbegin());
[all …]
/third_party/json/docs/examples/
Ddump.cpp10 json j_array = {1, 2, 4, 8, 16}; in main() local
22 << j_array.dump() << "\n\n" in main()
23 << j_array.dump(-1) << "\n\n" in main()
24 << j_array.dump(0) << "\n\n" in main()
25 << j_array.dump(4) << "\n\n" in main()
26 << j_array.dump(1, '\t') << "\n\n"; in main()
Derase__IteratorType_IteratorType.cpp13 json j_array = {1, 2, 4, 8, 16}; in main() local
21 j_array.erase(j_array.begin() + 1, j_array.begin() + 3); in main()
29 std::cout << j_array << '\n'; in main()
Derase__IteratorType.cpp13 json j_array = {1, 2, 4, 8, 16}; in main() local
21 j_array.erase(j_array.begin() + 2); in main()
29 std::cout << j_array << '\n'; in main()
Derase__size_type.cpp9 json j_array = {0, 1, 2, 3, 4, 5}; in main() local
12 j_array.erase(2); in main()
15 std::cout << j_array << '\n'; in main()
Doperator_ltlt__basic_json.cpp11 json j_array = {1, 2, 4, 8, 16}; in main() local
15 std::cout << j_array << "\n\n"; in main()
19 std::cout << std::setw(2) << j_array << "\n\n"; in main()
Dbasic_json__InputIt_InputIt.cpp9 json j_array = {"alpha", "bravo", "charly", "delta", "easy"}; in main() local
14 json j_array_range(j_array.begin() + 1, j_array.end() - 2); in main()
Dclear.cpp14 json j_array = {1, 2, 4, 8, 16}; in main() local
23 j_array.clear(); in main()
32 std::cout << j_array << '\n'; in main()
Dtype_name.cpp15 json j_array = {1, 2, 4, 8, 16}; in main() local
25 std::cout << j_array << " is an " << j_array.type_name() << '\n'; in main()
Ditems.cpp10 json j_array = {1, 2, 4, 8, 16}; in main() local
19 for (auto& x : j_array.items()) in main()
Dcontains__object_t_key_type.cpp11 json j_array = R"( [1, 2, 3] )"_json; in main() local
17 "j_array contains 'key': " << j_array.contains("key") << std::endl; in main()
Dbasic_json__list_init_t.cpp11 json j_array = {1, 2, 3, 4}; in main() local
18 std::cout << j_array << '\n'; in main()
Dcontains__keytype.c++17.cpp13 json j_array = R"( [1, 2, 3] )"_json; in main() local
19 "j_array contains 'key': " << j_array.contains("key"sv) << std::endl; in main()
Dmax_size.cpp14 json j_array = {1, 2, 4, 8, 16}; in main() local
23 std::cout << j_array.max_size() << '\n'; in main()
Dfront.cpp15 json j_array = {1, 2, 4, 8, 16}; in main() local
26 std::cout << j_array.front() << '\n'; in main()
Dback.cpp14 json j_array = {1, 2, 4, 8, 16}; in main() local
24 std::cout << j_array.back() << '\n'; in main()
Dbasic_json__value_t.cpp14 json j_array(json::value_t::array); in main() local
23 std::cout << j_array << '\n'; in main()
Dis_boolean.cpp15 json j_array = {1, 2, 4, 8, 16}; in main() local
27 std::cout << j_array.is_boolean() << '\n'; in main()
Dis_primitive.cpp15 json j_array = {1, 2, 4, 8, 16}; in main() local
27 std::cout << j_array.is_primitive() << '\n'; in main()
Dis_number.cpp15 json j_array = {1, 2, 4, 8, 16}; in main() local
27 std::cout << j_array.is_number() << '\n'; in main()
Dis_number_unsigned.cpp15 json j_array = {1, 2, 4, 8, 16}; in main() local
27 std::cout << j_array.is_number_unsigned() << '\n'; in main()
Dis_discarded.cpp15 json j_array = {1, 2, 4, 8, 16}; in main() local
27 std::cout << j_array.is_discarded() << '\n'; in main()
Dis_null.cpp15 json j_array = {1, 2, 4, 8, 16}; in main() local
27 std::cout << j_array.is_null() << '\n'; in main()

12