1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/unittests/tests-saul_reg: remove saul_reg_rm test function

This commit is contained in:
Alexandre Abadie 2022-01-08 11:49:06 +01:00
parent 08f93d7904
commit a7fab3fe53
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -166,52 +166,6 @@ static void test_reg_find_type_and_name(void)
TEST_ASSERT_NULL(dev);
}
static void test_reg_rm(void)
{
int res;
TEST_ASSERT_EQUAL_INT(5, count());
TEST_ASSERT_EQUAL_STRING("S0", saul_reg->name);
TEST_ASSERT_EQUAL_STRING("S3", last()->name);
res = saul_reg_rm(&s3b);
TEST_ASSERT_EQUAL_INT(0, res);
TEST_ASSERT_EQUAL_INT(4, count());
TEST_ASSERT_EQUAL_STRING("S0", saul_reg->name);
TEST_ASSERT_EQUAL_STRING("S3", last()->name);
res = saul_reg_rm(&s3a);
TEST_ASSERT_EQUAL_INT(0, res);
TEST_ASSERT_EQUAL_INT(3, count());
TEST_ASSERT_EQUAL_STRING("S0", saul_reg->name);
TEST_ASSERT_EQUAL_STRING("S2", last()->name);
res = saul_reg_rm(&s1);
TEST_ASSERT_EQUAL_INT(0, res);
TEST_ASSERT_EQUAL_INT(2, count());
TEST_ASSERT_EQUAL_STRING("S0", saul_reg->name);
TEST_ASSERT_EQUAL_STRING("S2", last()->name);
res = saul_reg_rm(&s1);
TEST_ASSERT_EQUAL_INT(-ENODEV, res);
res = saul_reg_rm(NULL);
TEST_ASSERT_EQUAL_INT(-ENODEV, res);
TEST_ASSERT_EQUAL_INT(2, count());
res = saul_reg_rm(&s0);
TEST_ASSERT_EQUAL_INT(0, res);
TEST_ASSERT_EQUAL_INT(1, count());
TEST_ASSERT_EQUAL_STRING("S2", saul_reg->name);
TEST_ASSERT_EQUAL_STRING("S2", last()->name);
res = saul_reg_rm(&s2);
TEST_ASSERT_EQUAL_INT(0, res);
TEST_ASSERT_EQUAL_INT(0, count());
TEST_ASSERT_NULL(saul_reg);
}
Test *tests_saul_reg_tests(void)
{
EMB_UNIT_TESTFIXTURES(fixtures) {
@ -221,7 +175,6 @@ Test *tests_saul_reg_tests(void)
new_TestFixture(test_reg_find_type),
new_TestFixture(test_reg_find_name),
new_TestFixture(test_reg_find_type_and_name),
new_TestFixture(test_reg_rm)
};
EMB_UNIT_TESTCALLER(pkt_tests, NULL, NULL, fixtures);