Skip to content

Commit b05580c

Browse files
committed
test
1 parent 669d825 commit b05580c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/utests/data/test_parser_json.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,16 @@ test_leaf(void **state)
8181
/* validate integer in quotes errors out by default */
8282
data = "{\"a:foo3\":\"1234\"}";
8383
PARSER_CHECK_ERROR(data, LYD_PARSE_STRICT, LYD_VALIDATE_PRESENT, tree, LY_EVALID,
84-
"Invalid non-number-encoded uint32 value \"1234\".", "/@a:foo3", 1);
84+
"Invalid non-number-encoded uint32 value \"1234\".", "/a:foo3", 1);
8585

86-
#if 0
8786
/* validate integers are parsed correctly */
8887
data = "{\"a:foo3\":1234}";
8988
CHECK_PARSE_LYD(data, 0, LYD_VALIDATE_PRESENT, tree);
90-
leaf = (struct lyd_node_term *)tree;
91-
CHECK_LYD_VALUE(leaf->value, UINT32, "1234", 1234);
9289

9390
/* validate LYD_PARSE_JSON_LOOSE_DATATYPES parser flag allows integers in quotes */
9491
data = "{\"a:foo3\":\"1234\"}";
9592
CHECK_PARSE_LYD(data, LYD_PARSE_JSON_LOOSE_DATATYPES, LYD_VALIDATE_PRESENT, tree);
96-
leaf = (struct lyd_node_term *)tree;
97-
CHECK_LYD_VALUE(leaf->value, UINT32, "1234", 1234);
98-
#endif
93+
9994
data = "{\"a:foo\":\"foo value\"}";
10095
CHECK_PARSE_LYD(data, 0, LYD_VALIDATE_PRESENT, tree);
10196
CHECK_LYSC_NODE(tree->schema, NULL, 0, LYS_CONFIG_W | LYS_STATUS_CURR, 1, "foo", 1, LYS_LEAF, 0, 0, NULL, 0);

0 commit comments

Comments
 (0)