From 58cbf4b3ef23d913528140fc0b1b861464f0dfb5 Mon Sep 17 00:00:00 2001 From: Niels Date: Wed, 31 Aug 2016 18:23:46 +0200 Subject: [PATCH] added another test case --- test/src/unit-deserialization.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/src/unit-deserialization.cpp b/test/src/unit-deserialization.cpp index 49ae7b4b..d9463213 100644 --- a/test/src/unit-deserialization.cpp +++ b/test/src/unit-deserialization.cpp @@ -148,6 +148,18 @@ TEST_CASE("deserialization") CHECK(json::parse(v) == json(true)); } + SECTION("from chars") + { + uint8_t *v = new uint8_t[5]; + v[0] = 't'; + v[1] = 'r'; + v[2] = 'u'; + v[3] = 'e'; + v[4] = '\0'; + CHECK(json::parse(v) == json(true)); + delete[] v; + } + SECTION("from std::string") { std::string v = {'t', 'r', 'u', 'e'};