mirror of
https://github.com/nlohmann/json.git
synced 2026-10-11 17:07:15 +00:00
✅ re-added test
I have no idea why this test has been removed in the first place.
This commit is contained in:
1 file changed
+2
-2
@@ -257,11 +257,11 @@ TEST_CASE("pointer access")
|
|||||||
|
|
||||||
const test_type* p2 = value.get_ptr<const test_type*>();
|
const test_type* p2 = value.get_ptr<const test_type*>();
|
||||||
CHECK(p1 == value.get_ptr<const test_type*>());
|
CHECK(p1 == value.get_ptr<const test_type*>());
|
||||||
//CHECK(*p2 == value.get<test_type>());
|
CHECK(*p2 == value.get<test_type>());
|
||||||
|
|
||||||
const test_type* const p3 = value.get_ptr<const test_type* const>();
|
const test_type* const p3 = value.get_ptr<const test_type* const>();
|
||||||
CHECK(p1 == value.get_ptr<const test_type* const>());
|
CHECK(p1 == value.get_ptr<const test_type* const>());
|
||||||
//CHECK(*p3 == value.get<test_type>());
|
CHECK(*p3 == value.get<test_type>());
|
||||||
|
|
||||||
// check if null pointers are returned correctly
|
// check if null pointers are returned correctly
|
||||||
CHECK(value.get_ptr<const json::object_t*>() == nullptr);
|
CHECK(value.get_ptr<const json::object_t*>() == nullptr);
|
||||||
|
|||||||
Reference in new issue
Block a user