Commit e57ac68e authored by NingX Zhao's avatar NingX Zhao Committed by Carles Cufi
Browse files

tests: unit: rbtree: move testcases to new ZTEST API



Move testcases to the new ZTEST API.

Signed-off-by: default avatarNingX Zhao <ningx.zhao@intel.com>
parent 194cb8ab
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ void test_tree(int size)
	}
}

void test_rbtree_spam(void)
ZTEST(rbtree_api, test_rbtree_spam)
{
	int size = 1;

@@ -255,7 +255,7 @@ void test_rbtree_spam(void)
 *
 * @see rb_get_min(), rb_get_max()
 */
void test_rb_get_minmax(void)
ZTEST(rbtree_api, test_rb_get_minmax)
{
	struct rbnode temp = {0};

@@ -277,11 +277,4 @@ void test_rb_get_minmax(void)
	zassert_true(rb_get_max(&tree) == &nodes[7], "the tree is invalid");
}

void test_main(void)
{
	ztest_test_suite(test_rbtree,
			 ztest_unit_test(test_rbtree_spam),
			 ztest_unit_test(test_rb_get_minmax)
			 );
	ztest_run_test_suite(test_rbtree);
}
ZTEST_SUITE(rbtree_api, NULL, NULL, NULL, NULL, NULL);
+2 −0
Original line number Diff line number Diff line
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y