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:
Enjia Mai 2022-08-22 08:31:24 +08:00 committed by Fabio Baltieri
parent d62223e930
commit ba0e277da2
2 changed files with 3 additions and 7 deletions

View file

@ -1,3 +1,4 @@
CONFIG_I2C=y
CONFIG_I2C_INIT_PRIORITY=60
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y

View file

@ -121,14 +121,9 @@ static int test_i2c_adv7513(void)
return TC_PASS;
}
void test_i2c_master(void)
ZTEST(nios2_i2c_master, test_i2c_master)
{
zassert_true(test_i2c_adv7513() == TC_PASS, NULL);
}
void test_main(void)
{
ztest_test_suite(nios2_i2c_master_test,
ztest_unit_test(test_i2c_master));
ztest_run_test_suite(nios2_i2c_master_test);
}
ZTEST_SUITE(nios2_i2c_master, NULL, NULL, NULL, NULL, NULL);