Skip to content

Commit 892355e

Browse files
committed
tests REFACTOR proper types
1 parent 2d3232b commit 892355e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/utests/schema/test_schema.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@ test_revisions(void **state)
284284
strcpy(rev->date, "2018-12-31");
285285

286286
assert_int_equal(2, LY_ARRAY_COUNT(revs));
287-
assert_string_equal("2018-01-01", &revs[0]);
288-
assert_string_equal("2018-12-31", &revs[1]);
287+
assert_string_equal("2018-01-01", revs[0].date);
288+
assert_string_equal("2018-12-31", revs[1].date);
289289
/* the order should be fixed, so the newest revision will be the first in the array */
290290
lysp_sort_revisions(revs);
291-
assert_string_equal("2018-12-31", &revs[0]);
292-
assert_string_equal("2018-01-01", &revs[1]);
291+
assert_string_equal("2018-12-31", revs[0].date);
292+
assert_string_equal("2018-01-01", revs[1].date);
293293

294294
LY_ARRAY_FREE(revs);
295295
}

tests/utests/schema/test_yin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,7 +3099,7 @@ test_module_elem(void **state)
30993099

31003100
assert_int_equal(yin_parse_mod(YCTX, lysp_mod), LY_SUCCESS);
31013101
assert_string_equal(lysp_mod->mod->name, "mod");
3102-
assert_string_equal(lysp_mod->revs, "2019-02-02");
3102+
assert_string_equal(lysp_mod->revs[0].date, "2019-02-02");
31033103
assert_string_equal(lysp_mod->mod->ns, "ns");
31043104
assert_string_equal(lysp_mod->mod->prefix, "pref");
31053105
assert_null(lysp_mod->mod->filepath);
@@ -3235,7 +3235,7 @@ test_submodule_elem(void **state)
32353235
CHECK_LOG_CTX("YANG version 1.1 expects all includes in main module, includes in submodules (mod) are not necessary.",
32363236
NULL);
32373237
assert_string_equal(lysp_submod->name, "mod");
3238-
assert_string_equal(lysp_submod->revs, "2019-02-02");
3238+
assert_string_equal(lysp_submod->revs[0].date, "2019-02-02");
32393239
assert_string_equal(lysp_submod->prefix, "pref");
32403240
assert_null(lysp_submod->filepath);
32413241
assert_string_equal(lysp_submod->org, "org");

0 commit comments

Comments
 (0)