Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-01-16 03:54:12 -0500
committerThomas Schuetz2012-01-16 03:54:12 -0500
commit4602c8edc1bcf24873d6dda813dee5874cb9b70c (patch)
tree3a3a533ec00934e5fddf9be75201250cbf50edbd /examples/org.eclipse.etrice.generator.c.reference
parentd0af1f77c1bda1530b1fba283c420e6267035ca4 (diff)
downloadorg.eclipse.etrice-4602c8edc1bcf24873d6dda813dee5874cb9b70c.tar.gz
org.eclipse.etrice-4602c8edc1bcf24873d6dda813dee5874cb9b70c.tar.xz
org.eclipse.etrice-4602c8edc1bcf24873d6dda813dee5874cb9b70c.zip
[runtime.c] added macro ADD_TESTCASE for more convenience
Diffstat (limited to 'examples/org.eclipse.etrice.generator.c.reference')
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c10
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.c5
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml8
3 files changed, 7 insertions, 16 deletions
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c
index 75e435a4d..8a9aab638 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/generator/TestDataClass.c
@@ -13,7 +13,6 @@
#include "../../../src-gen/cGenRef/DataClass1.h"
void TestDataClass_Operations(void){
- RUnit_openTestCase("Operations");
DataClass1 d;
d.Attr1 = 123;
@@ -25,13 +24,10 @@ void TestDataClass_Operations(void){
EXPECT_EQUAL_INT32("Operation DataClass1_MultiplyWithAttr1", 246, DataClass1_MultiplyWithAttr1(&d, 2));
EXPECT_EQUAL_FLOAT32("Operation DataClass1_MultiplyWithAttr3", (float32)642.246, DataClass1_MultiplyWithAttr3(&d, 2), (float32)0.0001);
- RUnit_closeTestCase();
}
void TestDataClass_testDataClassDeepCopy(void){
- RUnit_openTestCase("testDataClassDeepCopy");
-
DataClass1 d, e;
d.Attr1 = 123;
@@ -48,13 +44,11 @@ void TestDataClass_testDataClassDeepCopy(void){
EXPECT_EQUAL_INT32("ComplexAttr.Attr3", 789, e.ComplexAttr.Attr3);
EXPECT_EQUAL_FLOAT32("Attr3", (float32)321.123, e.Attr3, (float32)0.0001);
-
- RUnit_closeTestCase();
}
void TestDataClass_runSuite(void){
RUnit_openTestSuite("TestDataClass");
- TestDataClass_Operations();
- TestDataClass_testDataClassDeepCopy();
+ ADD_TESTCASE(TestDataClass_Operations);
+ ADD_TESTCASE(TestDataClass_testDataClassDeepCopy);
RUnit_closeTestSuite();
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.c b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.c
index a9d7b6aee..087c99ff3 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.c
+++ b/examples/org.eclipse.etrice.generator.c.reference/src/test/runtime/TestEtMessage.c
@@ -19,7 +19,6 @@
void TestEtMessage_testBasicMessage(void){
- RUnit_openTestCase("TestMessage_testBasicMessage");
RMessage msg1 = {(RMessage*)1234567, 123,456,};
RMessage msg2 = {NULL, 222,333};
@@ -36,13 +35,11 @@ void TestEtMessage_testBasicMessage(void){
EXPECT_EQUAL_INT16("msg1.NextMsg", msg2.evtID, msg1.next->evtID);
EXPECT_EQUAL_INT16("msg2.NextMsg", msg1.evtID, msg2.next->evtID);
- RUnit_closeTestCase();
}
-
void TestEtMessage_runSuite(void){
RUnit_openTestSuite("TestMessage");
- TestEtMessage_testBasicMessage();
+ ADD_TESTCASE(TestEtMessage_testBasicMessage);
RUnit_closeTestSuite();
}
diff --git a/examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml b/examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml
index 0d4b81369..904c4ba9f 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml
+++ b/examples/org.eclipse.etrice.generator.c.reference/tmp/testlog/TestMessageService.xml
@@ -1,14 +1,14 @@
<testsuites name="TestMessageService" tests="0" failures="0" errors="0" time="0">
<testsuite name="TestDataClass" tests="0" failures="0" errors="0" time="0">
- <testcase name="Operations" time="0"/>
- <testcase name="testDataClassDeepCopy" time="0"/>
+ <testcase name="TestDataClass_Operations" time="0"/>
+ <testcase name="TestDataClass_testDataClassDeepCopy" time="0"/>
</testsuite>
<testsuite name="TestMessage" tests="0" failures="0" errors="0" time="0">
- <testcase name="TestMessage_testBasicMessage" time="0"/>
+ <testcase name="TestEtMessage_testBasicMessage" time="0"/>
</testsuite>
<testsuite name="TestRMessageQueue" tests="0" failures="0" errors="0" time="0">
<testcase name="testPushPop" time="0"/>
- <testcase name="MassiveMessaging" time="1"/>
+ <testcase name="MassiveMessaging" time="0"/>
</testsuite>
<testsuite name="TestRMessageService" tests="0" failures="0" errors="0" time="0">
<testcase name="testRMessageService_init" time="0"/>

Back to the top