Added JsonError

This commit is contained in:
Benoit Blanchon
2018-03-09 16:58:01 +01:00
parent 83d73c93f7
commit b2a8085651
24 changed files with 641 additions and 515 deletions

View File

@ -10,8 +10,8 @@ TEST_CASE("JsonArray::copyTo()") {
SECTION("BiggerOneDimensionIntegerArray") {
char json[] = "[1,2,3]";
bool success = deserializeJson(array, json);
REQUIRE(success == true);
JsonError err = deserializeJson(array, json);
REQUIRE(err == JsonError::Ok);
int destination[4] = {0};
size_t result = array.copyTo(destination);
@ -25,8 +25,8 @@ TEST_CASE("JsonArray::copyTo()") {
SECTION("SmallerOneDimensionIntegerArray") {
char json[] = "[1,2,3]";
bool success = deserializeJson(array, json);
REQUIRE(success == true);
JsonError err = deserializeJson(array, json);
REQUIRE(err == JsonError::Ok);
int destination[2] = {0};
size_t result = array.copyTo(destination);
@ -39,8 +39,8 @@ TEST_CASE("JsonArray::copyTo()") {
SECTION("TwoOneDimensionIntegerArray") {
char json[] = "[[1,2],[3],[4]]";
bool success = deserializeJson(array, json);
REQUIRE(success == true);
JsonError err = deserializeJson(array, json);
REQUIRE(err == JsonError::Ok);
int destination[3][2] = {{0}};
array.copyTo(destination);