From 72960bc7d4c8f7eb7687827d1c1545b1eb5fdb71 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 13 Aug 2020 11:33:47 +0200 Subject: 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. --- testsuites/libtests/ttest01/test-destructor.c | 2 +- testsuites/libtests/ttest01/test-plan.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'testsuites/libtests') 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" -- cgit v1.2.3