Lines Matching refs:value
19 json value = {{"one", 1}, {"two", 2}};
22 test_type* p1 = value.get_ptr<test_type*>();
23 CHECK(p1 == value.get_ptr<test_type*>());
24 CHECK(*p1 == value.get<test_type>());
26 const test_type* p2 = value.get_ptr<const test_type*>();
27 CHECK(p2 == value.get_ptr<const test_type*>());
28 CHECK(*p2 == value.get<test_type>());
30 const test_type* const p3 = value.get_ptr<const test_type* const>();
31 CHECK(p3 == value.get_ptr<const test_type* const>());
32 CHECK(*p3 == value.get<test_type>());
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::boolean_t*>() == nullptr);
39 CHECK(value.get_ptr<json::number_integer_t*>() == nullptr);
40 CHECK(value.get_ptr<json::number_unsigned_t*>() == nullptr);
41 CHECK(value.get_ptr<json::number_float_t*>() == nullptr);
42 CHECK(value.get_ptr<json::binary_t*>() == nullptr);
48 const json value = {{"one", 1}, {"two", 2}};
51 test_type* p1 = value.get_ptr<test_type*>();
52 CHECK(p1 == value.get_ptr<test_type*>());
53 CHECK(*p1 == value.get<test_type>());
55 const test_type* p2 = value.get_ptr<const test_type*>();
56 CHECK(p2 == value.get_ptr<const test_type*>());
57 CHECK(*p2 == value.get<test_type>());
59 const test_type* const p3 = value.get_ptr<const test_type* const>();
60 CHECK(p3 == value.get_ptr<const test_type* const>());
61 CHECK(*p3 == value.get<test_type>());
64 CHECK(value.get_ptr<const json::object_t*>() != nullptr);
65 CHECK(value.get_ptr<const json::array_t*>() == nullptr);
66 CHECK(value.get_ptr<const json::string_t*>() == nullptr);
67 CHECK(value.get_ptr<const json::boolean_t*>() == nullptr);
68 CHECK(value.get_ptr<const json::number_integer_t*>() == nullptr);
69 CHECK(value.get_ptr<const json::number_unsigned_t*>() == nullptr);
70 CHECK(value.get_ptr<const json::number_float_t*>() == nullptr);
71 CHECK(value.get_ptr<const json::binary_t*>() == nullptr);
77 json value = {1, 2, 3, 4};
80 test_type* p1 = value.get_ptr<test_type*>();
81 CHECK(p1 == value.get_ptr<test_type*>());
82 CHECK(*p1 == value.get<test_type>());
84 const test_type* p2 = value.get_ptr<const test_type*>();
85 CHECK(p2 == value.get_ptr<const test_type*>());
86 CHECK(*p2 == value.get<test_type>());
88 const test_type* const p3 = value.get_ptr<const test_type* const>();
89 CHECK(p3 == value.get_ptr<const test_type* const>());
90 CHECK(*p3 == value.get<test_type>());
93 CHECK(value.get_ptr<json::object_t*>() == nullptr);
94 CHECK(value.get_ptr<json::array_t*>() != nullptr);
95 CHECK(value.get_ptr<json::string_t*>() == nullptr);
96 CHECK(value.get_ptr<json::boolean_t*>() == nullptr);
97 CHECK(value.get_ptr<json::number_integer_t*>() == nullptr);
98 CHECK(value.get_ptr<json::number_unsigned_t*>() == nullptr);
99 CHECK(value.get_ptr<json::number_float_t*>() == nullptr);
100 CHECK(value.get_ptr<json::binary_t*>() == nullptr);
106 const json value = {1, 2, 3, 4};
109 test_type* p1 = value.get_ptr<test_type*>();
110 CHECK(p1 == value.get_ptr<test_type*>());
111 CHECK(*p1 == value.get<test_type>());
113 const test_type* p2 = value.get_ptr<const test_type*>();
114 CHECK(p2 == value.get_ptr<const test_type*>());
115 CHECK(*p2 == value.get<test_type>());
117 const test_type* const p3 = value.get_ptr<const test_type* const>();
118 CHECK(p3 == value.get_ptr<const test_type* const>());
119 CHECK(*p3 == value.get<test_type>());
122 CHECK(value.get_ptr<const json::object_t*>() == nullptr);
123 CHECK(value.get_ptr<const json::array_t*>() != nullptr);
124 CHECK(value.get_ptr<const json::string_t*>() == nullptr);
125 CHECK(value.get_ptr<const json::boolean_t*>() == nullptr);
126 CHECK(value.get_ptr<const json::number_integer_t*>() == nullptr);
127 CHECK(value.get_ptr<const json::number_unsigned_t*>() == nullptr);
128 CHECK(value.get_ptr<const json::number_float_t*>() == nullptr);
129 CHECK(value.get_ptr<const json::binary_t*>() == nullptr);
135 json value = "hello";
138 test_type* p1 = value.get_ptr<test_type*>();
139 CHECK(p1 == value.get_ptr<test_type*>());
140 CHECK(*p1 == value.get<test_type>());
142 const test_type* p2 = value.get_ptr<const test_type*>();
143 CHECK(p2 == value.get_ptr<const test_type*>());
144 CHECK(*p2 == value.get<test_type>());
146 const test_type* const p3 = value.get_ptr<const test_type* const>();
147 CHECK(p3 == value.get_ptr<const test_type* const>());
148 CHECK(*p3 == value.get<test_type>());
151 CHECK(value.get_ptr<json::object_t*>() == nullptr);
152 CHECK(value.get_ptr<json::array_t*>() == nullptr);
153 CHECK(value.get_ptr<json::string_t*>() != nullptr);
154 CHECK(value.get_ptr<json::boolean_t*>() == nullptr);
155 CHECK(value.get_ptr<json::number_integer_t*>() == nullptr);
156 CHECK(value.get_ptr<json::number_unsigned_t*>() == nullptr);
157 CHECK(value.get_ptr<json::number_float_t*>() == nullptr);
158 CHECK(value.get_ptr<json::binary_t*>() == nullptr);
164 const json value = "hello";
167 test_type* p1 = value.get_ptr<test_type*>();
168 CHECK(p1 == value.get_ptr<test_type*>());
169 CHECK(*p1 == value.get<test_type>());
171 const test_type* p2 = value.get_ptr<const test_type*>();
172 CHECK(p2 == value.get_ptr<const test_type*>());
173 CHECK(*p2 == value.get<test_type>());
175 const test_type* const p3 = value.get_ptr<const test_type* const>();
176 CHECK(p3 == value.get_ptr<const test_type* const>());
177 CHECK(*p3 == value.get<test_type>());
180 CHECK(value.get_ptr<const json::object_t*>() == nullptr);
181 CHECK(value.get_ptr<const json::array_t*>() == nullptr);
182 CHECK(value.get_ptr<const json::string_t*>() != nullptr);
183 CHECK(value.get_ptr<const json::boolean_t*>() == nullptr);
184 CHECK(value.get_ptr<const json::number_integer_t*>() == nullptr);
185 CHECK(value.get_ptr<const json::number_unsigned_t*>() == nullptr);
186 CHECK(value.get_ptr<const json::number_float_t*>() == nullptr);
187 CHECK(value.get_ptr<const json::binary_t*>() == nullptr);
193 json value = false;
196 test_type* p1 = value.get_ptr<test_type*>();
197 CHECK(p1 == value.get_ptr<test_type*>());
198 CHECK(*p1 == value.get<test_type>());
200 const test_type* p2 = value.get_ptr<const test_type*>();
201 CHECK(p2 == value.get_ptr<const test_type*>());
202 CHECK(*p2 == value.get<test_type>());
204 const test_type* const p3 = value.get_ptr<const test_type* const>();
205 CHECK(p3 == value.get_ptr<const test_type* const>());
206 CHECK(*p3 == value.get<test_type>());
209 CHECK(value.get_ptr<json::object_t*>() == nullptr);
210 CHECK(value.get_ptr<json::array_t*>() == nullptr);
211 CHECK(value.get_ptr<json::string_t*>() == nullptr);
212 CHECK(value.get_ptr<json::boolean_t*>() != nullptr);
213 CHECK(value.get_ptr<json::number_integer_t*>() == nullptr);
214 CHECK(value.get_ptr<json::number_unsigned_t*>() == nullptr);
215 CHECK(value.get_ptr<json::number_float_t*>() == nullptr);
216 CHECK(value.get_ptr<json::binary_t*>() == nullptr);
222 const json value = false;
225 test_type* p1 = value.get_ptr<test_type*>();
226 CHECK(p1 == value.get_ptr<test_type*>());
227 //CHECK(*p1 == value.get<test_type>());
229 const test_type* p2 = value.get_ptr<const test_type*>();
230 CHECK(p2 == value.get_ptr<const test_type*>());
231 CHECK(*p2 == value.get<test_type>());
233 const test_type* const p3 = value.get_ptr<const test_type* const>();
234 CHECK(p3 == value.get_ptr<const test_type* const>());
235 CHECK(*p3 == value.get<test_type>());
238 CHECK(value.get_ptr<const json::object_t*>() == nullptr);
239 CHECK(value.get_ptr<const json::array_t*>() == nullptr);
240 CHECK(value.get_ptr<const json::string_t*>() == nullptr);
241 CHECK(value.get_ptr<const json::boolean_t*>() != nullptr);
242 CHECK(value.get_ptr<const json::number_integer_t*>() == nullptr);
243 CHECK(value.get_ptr<const json::number_unsigned_t*>() == nullptr);
244 CHECK(value.get_ptr<const json::number_float_t*>() == nullptr);
245 CHECK(value.get_ptr<const json::binary_t*>() == nullptr);
251 json value = 23;
254 test_type* p1 = value.get_ptr<test_type*>();
255 CHECK(p1 == value.get_ptr<test_type*>());
256 CHECK(*p1 == value.get<test_type>());
258 const test_type* p2 = value.get_ptr<const test_type*>();
259 CHECK(p2 == value.get_ptr<const test_type*>());
260 CHECK(*p2 == value.get<test_type>());
262 const test_type* const p3 = value.get_ptr<const test_type* const>();
263 CHECK(p3 == value.get_ptr<const test_type* const>());
264 CHECK(*p3 == value.get<test_type>());
267 CHECK(value.get_ptr<json::object_t*>() == nullptr);
268 CHECK(value.get_ptr<json::array_t*>() == nullptr);
269 CHECK(value.get_ptr<json::string_t*>() == nullptr);
270 CHECK(value.get_ptr<json::boolean_t*>() == nullptr);
271 CHECK(value.get_ptr<json::number_integer_t*>() != nullptr);
272 CHECK(value.get_ptr<json::number_unsigned_t*>() == nullptr);
273 CHECK(value.get_ptr<json::number_float_t*>() == nullptr);
274 CHECK(value.get_ptr<json::binary_t*>() == nullptr);
280 const json value = 23;
283 test_type* p1 = value.get_ptr<test_type*>();
284 CHECK(p1 == value.get_ptr<test_type*>());
285 CHECK(*p1 == value.get<test_type>());
287 const test_type* p2 = value.get_ptr<const test_type*>();
288 CHECK(p2 == value.get_ptr<const test_type*>());
289 CHECK(*p2 == value.get<test_type>());
291 const test_type* const p3 = value.get_ptr<const test_type* const>();
292 CHECK(p3 == value.get_ptr<const test_type* const>());
293 CHECK(*p3 == value.get<test_type>());
296 CHECK(value.get_ptr<const json::object_t*>() == nullptr);
297 CHECK(value.get_ptr<const json::array_t*>() == nullptr);
298 CHECK(value.get_ptr<const json::string_t*>() == nullptr);
299 CHECK(value.get_ptr<const json::boolean_t*>() == nullptr);
300 CHECK(value.get_ptr<const json::number_integer_t*>() != nullptr);
301 CHECK(value.get_ptr<const json::number_unsigned_t*>() == nullptr);
302 CHECK(value.get_ptr<const json::number_float_t*>() == nullptr);
303 CHECK(value.get_ptr<const json::binary_t*>() == nullptr);
309 json value = 23u;
312 test_type* p1 = value.get_ptr<test_type*>();
313 CHECK(p1 == value.get_ptr<test_type*>());
314 CHECK(*p1 == value.get<test_type>());
316 const test_type* p2 = value.get_ptr<const test_type*>();
317 CHECK(p2 == value.get_ptr<const test_type*>());
318 CHECK(*p2 == value.get<test_type>());
320 const test_type* const p3 = value.get_ptr<const test_type* const>();
321 CHECK(p3 == value.get_ptr<const test_type* const>());
322 CHECK(*p3 == value.get<test_type>());
325 CHECK(value.get_ptr<json::object_t*>() == nullptr);
326 CHECK(value.get_ptr<json::array_t*>() == nullptr);
327 CHECK(value.get_ptr<json::string_t*>() == nullptr);
328 CHECK(value.get_ptr<json::boolean_t*>() == nullptr);
329 CHECK(value.get_ptr<json::number_integer_t*>() != nullptr);
330 CHECK(value.get_ptr<json::number_unsigned_t*>() != nullptr);
331 CHECK(value.get_ptr<json::number_float_t*>() == nullptr);
332 CHECK(value.get_ptr<json::binary_t*>() == nullptr);
338 const json value = 23u;
341 test_type* p1 = value.get_ptr<test_type*>();
342 CHECK(p1 == value.get_ptr<test_type*>());
343 CHECK(*p1 == value.get<test_type>());
345 const test_type* p2 = value.get_ptr<const test_type*>();
346 CHECK(p2 == value.get_ptr<const test_type*>());
347 CHECK(*p2 == value.get<test_type>());
349 const test_type* const p3 = value.get_ptr<const test_type* const>();
350 CHECK(p3 == value.get_ptr<const test_type* const>());
351 CHECK(*p3 == value.get<test_type>());
354 CHECK(value.get_ptr<const json::object_t*>() == nullptr);
355 CHECK(value.get_ptr<const json::array_t*>() == nullptr);
356 CHECK(value.get_ptr<const json::string_t*>() == nullptr);
357 CHECK(value.get_ptr<const json::boolean_t*>() == nullptr);
358 CHECK(value.get_ptr<const json::number_integer_t*>() != nullptr);
359 CHECK(value.get_ptr<const json::number_unsigned_t*>() != nullptr);
360 CHECK(value.get_ptr<const json::number_float_t*>() == nullptr);
361 CHECK(value.get_ptr<const json::binary_t*>() == nullptr);
367 json value = 42.23;
370 test_type* p1 = value.get_ptr<test_type*>();
371 CHECK(p1 == value.get_ptr<test_type*>());
372 CHECK(*p1 == Approx(value.get<test_type>()));
374 const test_type* p2 = value.get_ptr<const test_type*>();
375 CHECK(p2 == value.get_ptr<const test_type*>());
376 CHECK(*p2 == Approx(value.get<test_type>()));
378 const test_type* const p3 = value.get_ptr<const test_type* const>();
379 CHECK(p3 == value.get_ptr<const test_type* const>());
380 CHECK(*p3 == Approx(value.get<test_type>()));
383 CHECK(value.get_ptr<json::object_t*>() == nullptr);
384 CHECK(value.get_ptr<json::array_t*>() == nullptr);
385 CHECK(value.get_ptr<json::string_t*>() == nullptr);
386 CHECK(value.get_ptr<json::boolean_t*>() == nullptr);
387 CHECK(value.get_ptr<json::number_integer_t*>() == nullptr);
388 CHECK(value.get_ptr<json::number_unsigned_t*>() == nullptr);
389 CHECK(value.get_ptr<json::number_float_t*>() != nullptr);
390 CHECK(value.get_ptr<json::binary_t*>() == nullptr);
396 const json value = 42.23;
399 test_type* p1 = value.get_ptr<test_type*>();
400 CHECK(p1 == value.get_ptr<test_type*>());
401 CHECK(*p1 == Approx(value.get<test_type>()));
403 const test_type* p2 = value.get_ptr<const test_type*>();
404 CHECK(p2 == value.get_ptr<const test_type*>());
405 CHECK(*p2 == Approx(value.get<test_type>()));
407 const test_type* const p3 = value.get_ptr<const test_type* const>();
408 CHECK(p3 == value.get_ptr<const test_type* const>());
409 CHECK(*p3 == Approx(value.get<test_type>()));
412 CHECK(value.get_ptr<const json::object_t*>() == nullptr);
413 CHECK(value.get_ptr<const json::array_t*>() == nullptr);
414 CHECK(value.get_ptr<const json::string_t*>() == nullptr);
415 CHECK(value.get_ptr<const json::boolean_t*>() == nullptr);
416 CHECK(value.get_ptr<const json::number_integer_t*>() == nullptr);
417 CHECK(value.get_ptr<const json::number_unsigned_t*>() == nullptr);
418 CHECK(value.get_ptr<const json::number_float_t*>() != nullptr);
419 CHECK(value.get_ptr<const json::binary_t*>() == nullptr);
425 const json value = json::binary({1, 2, 3});
428 test_type* p1 = value.get_ptr<test_type*>();
429 CHECK(p1 == value.get_ptr<test_type*>());
430 CHECK(*p1 == value.get<test_type>());
432 const test_type* p2 = value.get_ptr<const test_type*>();
433 CHECK(p2 == value.get_ptr<const test_type*>());
434 CHECK(*p2 == value.get<test_type>());
436 const test_type* const p3 = value.get_ptr<const test_type* const>();
437 CHECK(p3 == value.get_ptr<const test_type* const>());
438 CHECK(*p3 == value.get<test_type>());
441 CHECK(value.get_ptr<const json::object_t*>() == nullptr);
442 CHECK(value.get_ptr<const json::array_t*>() == nullptr);
443 CHECK(value.get_ptr<const json::string_t*>() == nullptr);
444 CHECK(value.get_ptr<const json::boolean_t*>() == nullptr);
445 CHECK(value.get_ptr<const json::number_integer_t*>() == nullptr);
446 CHECK(value.get_ptr<const json::number_unsigned_t*>() == nullptr);
447 CHECK(value.get_ptr<const json::number_float_t*>() == nullptr);
448 CHECK(value.get_ptr<const json::binary_t*>() != nullptr);
454 const json value = json::binary({});
457 test_type* p1 = value.get_ptr<test_type*>();
458 CHECK(p1 == value.get_ptr<test_type*>());
459 CHECK(*p1 == value.get<test_type>());
461 const test_type* p2 = value.get_ptr<const test_type*>();
462 CHECK(p2 == value.get_ptr<const test_type*>());
463 CHECK(*p2 == value.get<test_type>());
465 const test_type* const p3 = value.get_ptr<const test_type* const>();
466 CHECK(p3 == value.get_ptr<const test_type* const>());
467 CHECK(*p3 == value.get<test_type>());
470 CHECK(value.get_ptr<const json::object_t*>() == nullptr);
471 CHECK(value.get_ptr<const json::array_t*>() == nullptr);
472 CHECK(value.get_ptr<const json::string_t*>() == nullptr);
473 CHECK(value.get_ptr<const json::boolean_t*>() == nullptr);
474 CHECK(value.get_ptr<const json::number_integer_t*>() == nullptr);
475 CHECK(value.get_ptr<const json::number_unsigned_t*>() == nullptr);
476 CHECK(value.get_ptr<const json::number_float_t*>() == nullptr);
477 CHECK(value.get_ptr<const json::binary_t*>() != nullptr);