tests: boards: altera_max10: move the i2c test to new ztest API
Migrate the testsuite tests/boards/altera_max10/i2c_master to the new ztest API. Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
parent
d62223e930
commit
ba0e277da2
|
@ -1,3 +1,4 @@
|
||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
CONFIG_I2C_INIT_PRIORITY=60
|
CONFIG_I2C_INIT_PRIORITY=60
|
||||||
CONFIG_ZTEST=y
|
CONFIG_ZTEST=y
|
||||||
|
CONFIG_ZTEST_NEW_API=y
|
||||||
|
|
|
@ -121,14 +121,9 @@ static int test_i2c_adv7513(void)
|
||||||
return TC_PASS;
|
return TC_PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_i2c_master(void)
|
ZTEST(nios2_i2c_master, test_i2c_master)
|
||||||
{
|
{
|
||||||
zassert_true(test_i2c_adv7513() == TC_PASS, NULL);
|
zassert_true(test_i2c_adv7513() == TC_PASS, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_main(void)
|
ZTEST_SUITE(nios2_i2c_master, NULL, NULL, NULL, NULL, NULL);
|
||||||
{
|
|
||||||
ztest_test_suite(nios2_i2c_master_test,
|
|
||||||
ztest_unit_test(test_i2c_master));
|
|
||||||
ztest_run_test_suite(nios2_i2c_master_test);
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue