Skip to content

Commit

Permalink
added another test case
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Aug 31, 2016
1 parent ae7aaed commit 58cbf4b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/src/unit-deserialization.cpp
Expand Up @@ -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'};
Expand Down

0 comments on commit 58cbf4b

Please sign in to comment.