Skip to content

Commit

Permalink
tests REFACTOR proper types
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Mar 14, 2023
1 parent 2d3232b commit 892355e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tests/utests/schema/test_schema.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ test_revisions(void **state)
strcpy(rev->date, "2018-12-31");

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

LY_ARRAY_FREE(revs);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/utests/schema/test_yin.c
Original file line number Diff line number Diff line change
Expand Up @@ -3099,7 +3099,7 @@ test_module_elem(void **state)

assert_int_equal(yin_parse_mod(YCTX, lysp_mod), LY_SUCCESS);
assert_string_equal(lysp_mod->mod->name, "mod");
assert_string_equal(lysp_mod->revs, "2019-02-02");
assert_string_equal(lysp_mod->revs[0].date, "2019-02-02");
assert_string_equal(lysp_mod->mod->ns, "ns");
assert_string_equal(lysp_mod->mod->prefix, "pref");
assert_null(lysp_mod->mod->filepath);
Expand Down Expand Up @@ -3235,7 +3235,7 @@ test_submodule_elem(void **state)
CHECK_LOG_CTX("YANG version 1.1 expects all includes in main module, includes in submodules (mod) are not necessary.",
NULL);
assert_string_equal(lysp_submod->name, "mod");
assert_string_equal(lysp_submod->revs, "2019-02-02");
assert_string_equal(lysp_submod->revs[0].date, "2019-02-02");
assert_string_equal(lysp_submod->prefix, "pref");
assert_null(lysp_submod->filepath);
assert_string_equal(lysp_submod->org, "org");
Expand Down

0 comments on commit 892355e

Please sign in to comment.