summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-08-13 11:33:47 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-08-18 07:08:51 +0200
commit72960bc7d4c8f7eb7687827d1c1545b1eb5fdb71 (patch)
tree1bf7537d745a7a46dc42aaebe26077296ad667ea /testsuites/libtests
parentlibtest: Add fixture steps (diff)
downloadrtems-72960bc7d4c8f7eb7687827d1c1545b1eb5fdb71.tar.bz2
libtest: Change T_step() and T_assert_step()
Normally, the expected test step must be a compile time constant. Allow variable expected test steps for the T_step() and T_assert_step(). This can be used for parameterized test loops with individual fixtures. Remove the ability to use custom failure messages due to some implementation constraints. Update #3199.
Diffstat (limited to 'testsuites/libtests')
-rw-r--r--testsuites/libtests/ttest01/test-destructor.c2
-rw-r--r--testsuites/libtests/ttest01/test-plan.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/testsuites/libtests/ttest01/test-destructor.c b/testsuites/libtests/ttest01/test-destructor.c
index 71b14c08f6..0a2f650ed2 100644
--- a/testsuites/libtests/ttest01/test-destructor.c
+++ b/testsuites/libtests/ttest01/test-destructor.c
@@ -4,7 +4,7 @@ static void
destroy(T_destructor *dtor)
{
(void)dtor;
- T_step(0, "destroy");
+ T_step(0);
}
T_TEST_CASE(destructor)
diff --git a/testsuites/libtests/ttest01/test-plan.c b/testsuites/libtests/ttest01/test-plan.c
index 155704c478..4a550f34fa 100644
--- a/testsuites/libtests/ttest01/test-plan.c
+++ b/testsuites/libtests/ttest01/test-plan.c
@@ -28,10 +28,10 @@ T_TEST_CASE(double_plan)
T_TEST_CASE(steps)
{
- T_step(0, "a");
+ T_step(0);
T_plan(3);
- T_step(1, "b");
- T_step(2, "c");
+ T_step(1);
+ T_step(2);
}
#include "t-self-test.h"