summaryrefslogtreecommitdiffstats
path: root/src/usr/example/test/exampletest.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/example/test/exampletest.H')
-rw-r--r--src/usr/example/test/exampletest.H33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/usr/example/test/exampletest.H b/src/usr/example/test/exampletest.H
index f6cad9863..1df27a52e 100644
--- a/src/usr/example/test/exampletest.H
+++ b/src/usr/example/test/exampletest.H
@@ -6,7 +6,7 @@
*
* @brief Example for people to use when writing test cases for their module.
* @todo add more doxygen blocks
-*/
+ */
#include <cxxtest/TestSuite.H>
#include <example/example.H>
@@ -18,34 +18,35 @@ public:
/**
- * @test TS_WARN will run if the example1_function FAILS
- * */
+ * @test TS_WARN will run if the testExampleWarn_function FAILS
+ */
void testExampleWarn(void)
{
uint64_t l_rc = 0;
l_rc = example1_function();
if(l_rc)
{
- TS_WARN("Warning, Call to example1_function1 returned bad value.\n");
+ TS_WARN("Warning, Call to testExampleWarn returned bad value.\n");
}
}
/**
- * @test TS_TRACE will run if the example1_function FAILS
- * */
+ * @test TS_TRACE will run if the testExampleTrace function FAILS
+ *
+ */
void testExampleTrace(void)
{
uint64_t l_rc = 0;
l_rc = example1_function();
if(l_rc)
{
- TS_TRACE("Tracing something in example1_function1\n");
+ TS_TRACE("Tracing a failure in testExampleTrace function1\n");
}
}
/**
- * @test TS_FAIL will run if the example1_function FAILS
+ * @test TS_FAIL will run if the testExampleFail function FAILS
*/
void testExampleFail(void)
{
@@ -53,11 +54,11 @@ public:
l_rc = example1_function();
if(l_rc)
{
- TS_FAIL("Call to example1_function1 failed!\n");
+ TS_FAIL("Call to testExampleFail failed!\n");
}
}
/**
- * @test this will always run TS_FAIL
+ * @test this will always run TS_FAIL
*/
void testExampleForceFail(void)
{
@@ -66,7 +67,7 @@ public:
}
/**
- * @test this will always run TS_WARN
+ * @test this will always run TS_WARN
*/
void testExampleForceWarn(void)
{
@@ -74,12 +75,20 @@ public:
TS_WARN("Run TS_WARN() as part of the example test\n" );
}
/**
- * @test this will always run TS_WARN
+ * @test this will always run TS_TRACE
*/
void testExampleForceTrace(void)
{
+ uint32_t i_32test = 0xdeadbeef;
+ uint64_t i_64test = 0xbadc0ffee0ddf00d;
TS_TRACE("Run TS_TRACE() as part of the example test\n" );
+
+ TS_TRACE("Run TS_TRACE() with one print parameter: %d\n", 5 );
+
+ TS_TRACE("Run TS_TRACE() with 2 parameters: 0x%x 0x%x \n", i_32test, 0x78 );
+
+ TS_TRACE("Run TS_TRACE() with 3 parameters: %d, 0x%llx, %p", 328, i_64test, &i_64test );
}
OpenPOWER on IntegriCloud