[rtems commit] sptests/spcontext01: Improve output
Sebastian Huber
sebh at rtems.org
Wed Jun 3 08:08:18 UTC 2015
Module: rtems
Branch: master
Commit: b276507552744bba55017ef82a43afc3a6f63b6d
Changeset: http://git.rtems.org/rtems/commit/?id=b276507552744bba55017ef82a43afc3a6f63b6d
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jun 3 10:07:23 2015 +0200
sptests/spcontext01: Improve output
---
testsuites/sptests/spcontext01/init.c | 14 ++++++++++++--
testsuites/sptests/spcontext01/spcontext01.scn | 16 ++++++++--------
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/testsuites/sptests/spcontext01/init.c b/testsuites/sptests/spcontext01/init.c
index b0691ec..67910c4 100644
--- a/testsuites/sptests/spcontext01/init.c
+++ b/testsuites/sptests/spcontext01/init.c
@@ -238,6 +238,16 @@ static void test_context_is_executing(void)
#endif
}
+static bool is_fp(int i)
+{
+ return i != 0;
+}
+
+static const char *desc(int i)
+{
+ return is_fp(i) ? "F" : "N";
+}
+
static void Init(rtems_task_argument arg)
{
test_context *self = &test_instance;
@@ -252,8 +262,8 @@ static void Init(rtems_task_argument arg)
for (i = 0; i < 2; ++i) {
for (j = 0; j < 2; ++j) {
for (k = 0; k < 2; ++k) {
- printf("Test configuration %d %d %d... ", i, j, k);
- test(self, i == 0, j == 0, k == 0);
+ printf("Test configuration %s %s %s... ", desc(i), desc(j), desc(k));
+ test(self, is_fp(i), is_fp(j), is_fp(k));
printf("done\n");
}
}
diff --git a/testsuites/sptests/spcontext01/spcontext01.scn b/testsuites/sptests/spcontext01/spcontext01.scn
index ceb2774..2d03908 100644
--- a/testsuites/sptests/spcontext01/spcontext01.scn
+++ b/testsuites/sptests/spcontext01/spcontext01.scn
@@ -1,10 +1,10 @@
*** BEGIN OF TEST SPCONTEXT 1 ***
-Test configuration 0 0 0... done
-Test configuration 0 0 1... done
-Test configuration 0 1 0... done
-Test configuration 0 1 1... done
-Test configuration 1 0 0... done
-Test configuration 1 0 1... done
-Test configuration 1 1 0... done
-Test configuration 1 1 1... done
+Test configuration N N N... done
+Test configuration N N F... done
+Test configuration N F N... done
+Test configuration N F F... done
+Test configuration F N N... done
+Test configuration F N F... done
+Test configuration F F N... done
+Test configuration F F F... done
*** END OF TEST SPCONTEXT 1 ***
More information about the vc
mailing list