tests: application_development: move the gen inc file test to new ztest
Migrate the testsuite tests/application_development/gen_inc_file to the new ztest API. Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
parent
b6c50f5347
commit
44a1212bff
2 changed files with 5 additions and 12 deletions
|
@ -1,2 +1,3 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_ZTEST_NEW_API=y
|
||||
CONFIG_ZTEST_STACK_SIZE=2048
|
||||
|
|
|
@ -74,7 +74,7 @@ static const unsigned char compressed_inc_file[] = {
|
|||
0x8c, 0x05, 0x29, 0x00, 0x01, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static void test_gen_inc_file(void)
|
||||
ZTEST(gen_inc_file, test_gen_inc_file)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -109,7 +109,7 @@ static void do_test_gen_gz_inc_file(const unsigned char gz_inc_file[],
|
|||
}
|
||||
}
|
||||
|
||||
static void test_gen_gz_inc_file_no_mtime(void)
|
||||
ZTEST(gen_inc_file, test_gen_gz_inc_file_no_mtime)
|
||||
{
|
||||
zassert_equal(sizeof(no_mtime_gz_inc_file), sizeof(compressed_inc_file),
|
||||
"Invalid compressed file size");
|
||||
|
@ -117,7 +117,7 @@ static void test_gen_gz_inc_file_no_mtime(void)
|
|||
do_test_gen_gz_inc_file(no_mtime_gz_inc_file, mtime_zero);
|
||||
}
|
||||
|
||||
static void test_gen_gz_inc_file_mtime_arg(void)
|
||||
ZTEST(gen_inc_file, test_gen_gz_inc_file_mtime_arg)
|
||||
{
|
||||
zassert_equal(sizeof(mtime_gz_inc_file), sizeof(compressed_inc_file),
|
||||
"Invalid compressed file size");
|
||||
|
@ -125,13 +125,5 @@ static void test_gen_gz_inc_file_mtime_arg(void)
|
|||
do_test_gen_gz_inc_file(mtime_gz_inc_file, mtime_test_val);
|
||||
}
|
||||
|
||||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(gen_inc_file_test,
|
||||
ztest_unit_test(test_gen_inc_file),
|
||||
ztest_unit_test(test_gen_gz_inc_file_no_mtime),
|
||||
ztest_unit_test(test_gen_gz_inc_file_mtime_arg)
|
||||
);
|
||||
|
||||
ztest_run_test_suite(gen_inc_file_test);
|
||||
}
|
||||
ZTEST_SUITE(gen_inc_file, NULL, NULL, NULL, NULL, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue