tests: unit: move the base64 test to new ztest API
Migrate the testsuite tests/unit/base64 to the new ztest API. Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
parent
2dcaf08c8b
commit
811e691cf6
2 changed files with 3 additions and 8 deletions
|
@ -60,7 +60,7 @@ static const unsigned char base64_test_enc5[] =
|
||||||
"JEhuVodiWr2/F9mixBcaAZTtjx4Rs9cJDLbpEG8i\n\r\ni"
|
"JEhuVodiWr2/F9mixBcaAZTtjx4Rs9cJDLbpEG8i\n\r\ni"
|
||||||
"swcFdsn6MWwINP+Nwmw4AEPpVJevUEvRQbqVMVoLlw= ";
|
"swcFdsn6MWwINP+Nwmw4AEPpVJevUEvRQbqVMVoLlw= ";
|
||||||
|
|
||||||
static void test_base64_codec(void)
|
ZTEST(lib_base64, test_base64_codec)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -129,10 +129,4 @@ static void test_base64_codec(void)
|
||||||
zassert_equal(rc, -ENOMEM, "Error: dst NULL: decode test return value");
|
zassert_equal(rc, -ENOMEM, "Error: dst NULL: decode test return value");
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_main(void)
|
ZTEST_SUITE(lib_base64, NULL, NULL, NULL, NULL, NULL);
|
||||||
{
|
|
||||||
ztest_test_suite(lib_base64_test,
|
|
||||||
ztest_unit_test(test_base64_codec));
|
|
||||||
|
|
||||||
ztest_run_test_suite(lib_base64_test);
|
|
||||||
}
|
|
||||||
|
|
1
tests/unit/base64/prj.conf
Normal file
1
tests/unit/base64/prj.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
CONFIG_ZTEST_NEW_API=y
|
Loading…
Add table
Add a link
Reference in a new issue