Update test_json_simple.c Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ad08d3ec Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ad08d3ec Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ad08d3ec
Branch: refs/heads/develop Commit: ad08d3ec0a52f3ef58eedaab9d867d2105926b0d Parents: 6116058 Author: NgesBrian <[email protected]> Authored: Wed Jun 1 23:48:45 2016 +0100 Committer: NgesBrian <[email protected]> Committed: Wed Jun 1 23:48:45 2016 +0100 ---------------------------------------------------------------------- libs/json/src/test/test_json_simple.c | 32 ------------------------------ 1 file changed, 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ad08d3ec/libs/json/src/test/test_json_simple.c ---------------------------------------------------------------------- diff --git a/libs/json/src/test/test_json_simple.c b/libs/json/src/test/test_json_simple.c index c82374c..55d50f4 100644 --- a/libs/json/src/test/test_json_simple.c +++ b/libs/json/src/test/test_json_simple.c @@ -28,7 +28,6 @@ static char *output = "{\"KeyBool\": true,\"KeyInt\": -1234,\"KeyUint\": 1353214 static char *output1 ="{\"KeyBoolArr\": [true, false], \"KeyUintArr\": [0, 65535, 4294967295, 8589934590, 3451257]}"; static char *outputboolspace = "{\"KeyBoolArr\": [ true , false,true ]}"; static char *outputboolempty = "{\"KeyBoolArr\": , \"KeyBoolArr\": [ ]}"; -/*static char *outputbooldiff = "{\"KeyBoolArr\": [false, 1, 20]}";*/ static char bigbuf[512]; static int buf_index; @@ -181,7 +180,6 @@ TEST_CASE(test_json_simple_decode){ struct test_jbuf tjb1; struct test_jbuf tjbboolspacearr; struct test_jbuf tjbboolemptyarr; - /*struct test_jbuf tjbbooldiffarr;*/ long long unsigned int uint_val; long long int int_val; bool bool_val; @@ -193,14 +191,12 @@ TEST_CASE(test_json_simple_decode){ int rcbsa; int array_count; int array_countemp; - bool boolarr[2]; unsigned long long uintarr[5]; int array_count1; int array_count1u; bool boolspacearr[3]; bool boolemptyarr[2]; - /*bool booldiffarr[3];*/ struct json_attr_t test_attr[7] = { [0] = { @@ -252,8 +248,6 @@ TEST_CASE(test_json_simple_decode){ } }; - - test_buf_init(&tjb, output); rc = json_read_object(&tjb.json_buf, test_attr); @@ -341,33 +335,7 @@ TEST_CASE(test_json_simple_decode){ TEST_ASSERT(boolspacearr[0] == true); TEST_ASSERT(boolspacearr[1] == false); TEST_ASSERT(boolspacearr[2] == true); - - /*Testing arrays of bool with different value type - struct json_attr_t test_booldiffarr[2] = { - [0] = { - .attribute = "KeyBoolArr", - .type = t_array, - .addr.array = { - .element_type = t_boolean, - .arr.booleans.store = booldiffarr, - .maxlen = sizeof booldiffarr / sizeof booldiffarr[0], - .count =&array_count1, - }, - .nodefault = true, - .len = sizeof( booldiffarr), - } - - }; - - test_buf_init(&tjbbooldiffarr, outputbooldiff); - rc1 = json_read_object(&tjbbooldiffarr.json_buf, test_booldiffarr); - TEST_ASSERT(rcbsa == 0); - - TEST_ASSERT(booldiffarr[0] == false); - TEST_ASSERT(booldiffarr[1] == 1); - TEST_ASSERT(booldiffarr[2] == 20); - */ /*testing array with empty value*/ struct json_attr_t test_boolemptyarr[2] = { [0] = {
