Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-03-19 21:25:00 +0000
committerThomas Schuetz2012-03-19 21:25:00 +0000
commit85f79660844dd637190e775adb9bc6a3ddf32316 (patch)
treea1209b475be1448dff08c361b5c086d668393d7c /tests/org.eclipse.etrice.generator.c.tests/src/test/runtime
parentcb8d6b0d1a90812d697737663f41e873331c6c50 (diff)
downloadorg.eclipse.etrice-85f79660844dd637190e775adb9bc6a3ddf32316.tar.gz
org.eclipse.etrice-85f79660844dd637190e775adb9bc6a3ddf32316.tar.xz
org.eclipse.etrice-85f79660844dd637190e775adb9bc6a3ddf32316.zip
[generator.c.tests] added first testmodel with EXPECT_ORDER
Diffstat (limited to 'tests/org.eclipse.etrice.generator.c.tests/src/test/runtime')
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c49
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.h26
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c45
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.h20
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c99
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.h18
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c241
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h21
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c67
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.h26
10 files changed, 0 insertions, 612 deletions
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c
deleted file mode 100644
index bc60644c3..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * RunRuntimeTestcases.c
- *
- * Created on: 12.01.2012
- * Author: tschuetz
- */
-
-
-
-#include "RunCRuntimeTestcases.h"
-
-#include "TestEtMessage.h"
-#include "TestEtMessageQueue.h"
-#include "TestEtMessageService.h"
-#include "TestEtUnit.h"
-
-#include "etUnit/etUnit.h"
-
-
-void RunCRuntimeTestcases(void){
- etUnit_open("tmp/testlog","TestCRuntime");
-
- TestEtMessage_runSuite();
- TestEtMessageQueue_runSuite();
- TestEtMessageService_runSuite();
- TestEtUnit_runSuite();
-
- etUnit_close();
-
- /* special situation for testing openAll and closeAll of etUnit
- * this has to be done outside of etUnit_open and etUnit_close */
- etUnit_openAll("tmp/testlog","TestEtUnitSpecial", "etUnit", "openAll and closeAll");
- EXPECT_TRUE("Open and Close", TRUE);
- etUnit_closeAll();
-}
-
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.h b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.h
deleted file mode 100644
index 5d17f7ddb..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * RunRuntimeTestcases.h
- *
- * Created on: 12.01.2012
- * Author: tschuetz
- */
-
-#ifndef _RUNCRUNTIMETESTCASES_H_
-#define _RUNCRUNTIMETESTCASES_H_
-
-void RunCRuntimeTestcases(void);
-
-#endif /* _RUNCRUNTIMETESTCASES_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c
deleted file mode 100644
index ed317284f..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "TestEtMessage.h"
-
-#include <stddef.h>
-#include "etUnit/etUnit.h"
-#include "messaging/etMessage.h"
-
-
-
-void TestEtMessage_testBasicMessage(void){
-
- etMessage msg1 = {(etMessage*)1234567, 123,456,};
- etMessage msg2 = {NULL, 222,333};
-
- // basic checks -> detects structure changes that would cause problems for generated code
- EXPECT_EQUAL_PTR("Message.next", 1234567, msg1.next);
- EXPECT_EQUAL_INT16("Message.address", 123, msg1.address);
- EXPECT_EQUAL_INT16("Message.evtID", 456, msg1.evtID);
-
- // build pointer ring
- msg1.next = &msg2;
- msg2.next = &msg1;
-
- EXPECT_EQUAL_INT16("msg1.NextMsg", msg2.evtID, msg1.next->evtID);
- EXPECT_EQUAL_INT16("msg2.NextMsg", msg1.evtID, msg2.next->evtID);
-
-}
-
-void TestEtMessage_runSuite(void){
- etUnit_openTestSuite("TestMessage");
- ADD_TESTCASE(TestEtMessage_testBasicMessage);
- etUnit_closeTestSuite();
-}
-
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.h b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.h
deleted file mode 100644
index 67b45e4e1..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef _TESTMESSAGE_H_
-#define _TESTMESSAGE_H_
-
-
-void TestEtMessage_runSuite(void);
-
-
-#endif /* _TESTMESSAGE_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c
deleted file mode 100644
index 1febd72ce..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "TestEtMessageQueue.h"
-#include "etUnit/etUnit.h"
-#include "messaging/etMessageQueue.h"
-
-void TestEtMessageQueue_testPushPop(void){
-
- etMessage msg1 = {NULL, 123, 456};
- etMessage msg2 = {NULL, 222, 333};
-
- etMessageQueue queue1;
- etMessageQueue_init(&queue1);
-
- etMessageQueue_push(&queue1, &msg1);
- etMessageQueue_push(&queue1, &msg2);
-
- EXPECT_EQUAL_INT16("etMessageQueue.size before", 2, queue1.size);
- EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark before", 2, queue1.highWaterMark);
-
- etMessage* rcvMsg1 = etMessageQueue_pop(&queue1);
- etMessage* rcvMsg2 = etMessageQueue_pop(&queue1);
-
- EXPECT_EQUAL_INT16("etMessageQueue.size after", 0, queue1.size);
- EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark after", 2, queue1.highWaterMark);
-
- EXPECT_EQUAL_INT16("rcvMsg1->address", 123, rcvMsg1->address);
- EXPECT_EQUAL_INT16("rcvMsg1->evtID", 456, rcvMsg1->evtID);
- EXPECT_EQUAL_PTR("rcvMsg1->next", NULL, rcvMsg1->next);
-
- EXPECT_EQUAL_INT16("rcvMsg2->address", 222, rcvMsg2->address);
- EXPECT_EQUAL_INT16("rcvMsg2->evtID", 333, rcvMsg2->evtID);
- EXPECT_EQUAL_PTR("rcvMsg2->next", NULL, rcvMsg2->next);
-
- EXPECT_EQUAL_PTR("etMessageQueue->first", NULL, queue1.first);
- EXPECT_EQUAL_PTR("etMessageQueue->last", NULL, queue1.last);
-
- etMessage* rcvMsg3 = etMessageQueue_pop(&queue1);
- EXPECT_EQUAL_PTR("etMessageQueue_pop if empty", NULL, rcvMsg3);
-
-}
-
-#define MAX 1000
-
-void TestEtMessageQueue_testMassiveMessaging(void){
-
- etMessage msgArray[MAX];
-
- etMessageQueue queue1;
- etMessageQueue_init(&queue1);
-
- int16 i;
- for(i=0; i<MAX; i++){
- //etMessage_init(&msgArray[i]);
- msgArray[i].address = i;
- msgArray[i].evtID = i;
- }
-
- int j;
- for(j=0; j<3; j++){
- for (i=0; i<MAX; i++){
- etMessageQueue_push(&queue1, &(msgArray[i]));
- }
- for (i=0; i<MAX; i++){
- etMessage* msg = etMessageQueue_pop(&queue1);
- // EXPECTS are hidden to avoid too many testcases in log
- if (msg == NULL){
- EXPECT_FALSE("msg == NULL", TRUE);
- break;
- }
- if (msg->address != msg->evtID){
- EXPECT_FALSE("msg->address != msg->evtID", TRUE);
- break;
- }
- if (msg->address != i){
- EXPECT_FALSE("msg->address != i", TRUE);
- break;
- }
- }
- EXPECT_EQUAL_INT32("i==MAX", MAX, i);
- }
-}
-
-void TestEtMessageQueue_runSuite(void){
- etUnit_openTestSuite("TestEtMessageQueue");
- ADD_TESTCASE(TestEtMessageQueue_testPushPop);
- ADD_TESTCASE(TestEtMessageQueue_testMassiveMessaging);
- etUnit_closeTestSuite();
-}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.h b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.h
deleted file mode 100644
index afceea8f8..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef _TESTRMESSAGEQUEUE_H_
-#define _TESTRMESSAGEQUEUE_H_
-
-void TestEtMessageQueue_runSuite(void);
-
-#endif /* _TESTRMESSAGEQUEUE_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c
deleted file mode 100644
index 9c1499ea8..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "TestEtMessageService.h"
-#include "etUnit/etUnit.h"
-#include "messaging/etMessageService.h"
-
-
-/* mocking for MessageDispatcher */
-
-static etInt16 receivedEventIDs[2] = {0,0};
-static etInt16 receivedEventIDCounter = 0;
-
-void MessageReceiver1(const etMessage* msg){
- receivedEventIDs[receivedEventIDCounter] = msg->evtID;
- receivedEventIDCounter++;
-}
-
-void MessageReceiver2(const etMessage* msg){
- receivedEventIDs[receivedEventIDCounter] = msg->evtID;
- receivedEventIDCounter++;
-}
-
-/* dummy message dispatcher */
-void DummyMessageDispatcher(const etMessage* msg){
- switch(msg->address){
- case 11:
- MessageReceiver1(msg);
- break;
- case 22:
- MessageReceiver2(msg);
- break;
- default:
- break;
- }
-}
-
-void TestEtMessageService_init(void){
-
- etMessageService msgService;
- uint16 max = 6;
- uint16 blockSize = 32;
-
- uint8 msgBuffer[max*blockSize];
-
- etMessageService_init(&msgService, msgBuffer, max, blockSize, DummyMessageDispatcher);
-
- EXPECT_EQUAL_PTR("msgService.messagePool.first", msgBuffer, msgService.messagePool.first);
- EXPECT_EQUAL_PTR("msgService.messagePool in between", &msgBuffer[3*blockSize], msgService.messagePool.first->next->next->next);
- EXPECT_EQUAL_PTR("msgService.messagePool.last(1)", &msgBuffer[5*blockSize], msgService.messagePool.first->next->next->next->next->next);
- EXPECT_EQUAL_PTR("msgService.messagePool.last(2)", &msgBuffer[5*blockSize], msgService.messagePool.last);
- EXPECT_EQUAL_PTR("msgService.messagePool.last.next", 0, msgService.messagePool.last->next);
-
-}
-
-void TestEtMessageService_GetPushPopReturn(void){
-
- etMessageService msgService;
- uint16 max = 6;
- uint16 blockSize = 32;
- uint8 msgBuffer[max*blockSize];
-
- etMessageService_init(&msgService, msgBuffer, max, blockSize, DummyMessageDispatcher);
-
- // get messages from pool
- etMessage* msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessage* msg2 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
-
- EXPECT_EQUAL_INT16("msgService.messagePool.size", 4, msgService.messagePool.size);
-
- // define content
- msg1->address = 11;
- msg1->evtID = 111;
- msg2->address = 22;
- msg2->evtID = 222;
-
- // push messages to queue
- etMessageService_pushMessage(&msgService, msg2);
- etMessageService_pushMessage(&msgService, msg1);
-
- EXPECT_EQUAL_INT16("msgService.messageQueue.size", 2, msgService.messageQueue.size);
-
- // pop messages from queue
- etMessage* rcvMsg1 = etMessageService_popMessage(&msgService);
- etMessage* rcvMsg2 = etMessageService_popMessage(&msgService);
-
- EXPECT_EQUAL_INT16("msgService.messageQueue.size",0, msgService.messageQueue.size);
-
-
- EXPECT_EQUAL_INT16("msgService.popMessage", 22, rcvMsg1->address);
- EXPECT_EQUAL_INT16("msgService.popMessage", 222, rcvMsg1->evtID);
- EXPECT_EQUAL_INT16("msgService.popMessage", 11, rcvMsg2->address);
- EXPECT_EQUAL_INT16("msgService.popMessage", 111, rcvMsg2->evtID);
-
- etMessageService_returnMessageBuffer(&msgService, rcvMsg1);
- etMessageService_returnMessageBuffer(&msgService, rcvMsg2);
-
- EXPECT_EQUAL_INT16("msgService.messagePool.size", 6, msgService.messagePool.size);
-
-}
-
-void TestEtMessageService_GetReturn(void){
-
- etMessageService msgService;
- uint16 max = 2;
- uint16 blockSize = 32;
- uint8 msgBuffer[max*blockSize];
-
- etMessageService_init(&msgService, msgBuffer, max, blockSize, DummyMessageDispatcher);
-
- // get one message too much from pool
- etMessage* msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessage* msg2 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessage* msg3 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- EXPECT_TRUE("msgService getMessageBuffer", msg1!=NULL);
- EXPECT_TRUE("msgService getMessageBuffer", msg2!=NULL);
- EXPECT_EQUAL_PTR("msgService getMessageBuffer", msg3, NULL);
-
- // return messages
- etMessageService_returnMessageBuffer(&msgService, msg1);
- etMessageService_returnMessageBuffer(&msgService, msg2);
- EXPECT_EQUAL_INT16("msgService.messagePool.size", 2, msgService.messagePool.size);
-
- // get message bigger than blocksize
- etMessage* msg4 = etMessageService_getMessageBuffer(&msgService, 33);
- EXPECT_EQUAL_PTR("msgService getMessageBuffer", msg4, NULL);
-
-}
-
-void TestEtMessageService_execute(void){
- etMessageService msgService;
- uint16 max = 6;
- uint16 blockSize = 32;
- uint8 msgBuffer[max*blockSize];
-
- etMessageService_init(&msgService, msgBuffer, max, blockSize, DummyMessageDispatcher);
-
- // get messages from pool
- etMessage* msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessage* msg2 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
-
- // define content
- msg1->address = 11;
- msg1->evtID = 111;
- msg2->address = 22;
- msg2->evtID = 222;
-
- // push messages to queue
- etMessageService_pushMessage(&msgService, msg1);
- etMessageService_pushMessage(&msgService, msg2);
-
- /* make sure that receivedEventIDCounter==0 and receivedEventIDs[n]==0*/
- etMessageService_execute(&msgService);
- EXPECT_EQUAL_INT16("deliverAllMessages msg1", msg1->evtID, receivedEventIDs[0]);
- EXPECT_EQUAL_INT16("deliverAllMessages msg2", msg2->evtID, receivedEventIDs[1]);
- EXPECT_EQUAL_INT16("deliverAllMessages receivedEventIDCounter", 2, receivedEventIDCounter);
-}
-
-void TestEtMessageService_getMessagePoolLowWaterMark(void){
- etMessageService msgService;
- uint16 max = 6;
- uint16 blockSize = 32;
- uint8 msgBuffer[max*blockSize];
-
- etMessageService_init(&msgService, msgBuffer, max, blockSize, DummyMessageDispatcher);
-
- EXPECT_EQUAL_INT16("inital low water mark", max, etMessageService_getMessagePoolLowWaterMark(&msgService));
-
- // get messages from pool
- etMessage* msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessage* msg2 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
-
- // define content
- msg1->address = 11;
- msg1->evtID = 111;
- msg2->address = 22;
- msg2->evtID = 222;
-
- // push messages to queue
- etMessageService_pushMessage(&msgService, msg2);
- etMessageService_pushMessage(&msgService, msg1);
-
- EXPECT_EQUAL_INT16("low water mark 1", max-2, etMessageService_getMessagePoolLowWaterMark(&msgService));
-
- // pop messages from queue
- etMessage* rcvMsg1 = etMessageService_popMessage(&msgService);
- etMessage* rcvMsg2 = etMessageService_popMessage(&msgService);
-
- etMessageService_returnMessageBuffer(&msgService, rcvMsg1);
- etMessageService_returnMessageBuffer(&msgService, rcvMsg2);
-
- EXPECT_EQUAL_INT16("low water mark 2", max-2, etMessageService_getMessagePoolLowWaterMark(&msgService));
-
- msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- msg2 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessageService_pushMessage(&msgService, msg2);
- etMessageService_pushMessage(&msgService, msg1);
-
- /*still the same*/
- EXPECT_EQUAL_INT16("low water mark 3", max-2, etMessageService_getMessagePoolLowWaterMark(&msgService));
-
- msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessageService_pushMessage(&msgService, msg2);
- msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessageService_pushMessage(&msgService, msg2);
- msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessageService_pushMessage(&msgService, msg2);
- msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- etMessageService_pushMessage(&msgService, msg2);
-
- /* no message left */
- EXPECT_EQUAL_INT16("low water mark 4", 0, etMessageService_getMessagePoolLowWaterMark(&msgService));
-
- msg1 = etMessageService_getMessageBuffer(&msgService, sizeof(etMessage));
- EXPECT_EQUAL_PTR("check message for NULL", NULL, msg1);
-
- /* still no message left */
- EXPECT_EQUAL_INT16("low water mark 6", 0, etMessageService_getMessagePoolLowWaterMark(&msgService));
-
-
-}
-
-
-void TestEtMessageService_runSuite(void){
- etUnit_openTestSuite("TestEtMessageService");
- ADD_TESTCASE(TestEtMessageService_init);
- ADD_TESTCASE(TestEtMessageService_GetPushPopReturn);
- ADD_TESTCASE(TestEtMessageService_GetReturn);
- ADD_TESTCASE(TestEtMessageService_execute);
- ADD_TESTCASE(TestEtMessageService_getMessagePoolLowWaterMark)
- etUnit_closeTestSuite();
-}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h
deleted file mode 100644
index 22bd62dc5..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef _TESTRMESSAGESERVICE_H_
-#define _TESTRMESSAGESERVICE_H_
-
-#include "messaging/etMessageService.h"
-
-void TestEtMessageService_runSuite(void);
-
-
-#endif /* _TESTRMESSAGESERVICE_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c
deleted file mode 100644
index f69abb441..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * TestEtUnit.c
- *
- * Created on: 16.01.2012
- * Author: tschuetz
- */
-
-#include "TestEtUnit.h"
-#include "etUnit/etUnit.h"
-
-void TestEtUnit_Expect(void){
- EXPECT_TRUE("EXPECT_TRUE", TRUE);
- EXPECT_FALSE("EXPECT_FALSE", FALSE);
-
- /* signed integer values */
- EXPECT_EQUAL_INT8("EXPECT_EQUAL_INT8", -123, -123);
- EXPECT_EQUAL_INT16("EXPECT_EQUAL_INT16", -12345, -12345);
- EXPECT_EQUAL_INT32("EXPECT_EQUAL_INT32", -1234567, -1234567);
-
- /* unsigned integer values */
- EXPECT_EQUAL_UINT8("EXPECT_EQUAL_INT8", 123, 123);
- EXPECT_EQUAL_UINT16("EXPECT_EQUAL_INT16", 12345, 12345);
- EXPECT_EQUAL_UINT32("EXPECT_EQUAL_INT32", 1234567, 1234567);
-
- /* float values */
- EXPECT_EQUAL_FLOAT32("EXPECT_EQUAL_FLOAT32", (etFloat32) 123.456, (etFloat32) 123.456, (etFloat32) 0.0001);
- EXPECT_EQUAL_FLOAT32("EXPECT_EQUAL_FLOAT32", (etFloat32) 123.456, (etFloat32) 123.456, (etFloat32) 0.0001);
-
- /* Pointers */
- etUInt16 value;
- etUInt16* valuePtr = &value;
-
- EXPECT_EQUAL_PTR("EXPECT_EQUAL_PTR", &value, valuePtr) \
-
-}
-
-
-void TestEtUnit_Expect_Order(void){
- etInt16 list[] = {1,2,3,4};
- EXPECT_ORDER_START(list, 4);
- EXPECT_ORDER("id=1", 1);
- EXPECT_ORDER("id=2", 2);
- EXPECT_ORDER("id=3", 3);
- EXPECT_ORDER_END("id=4", 4);
-}
-
-void TestEtUnit_runSuite(void){
- etUnit_openTestSuite("TestEtUnit");
- ADD_TESTCASE(TestEtUnit_Expect_Order);
- ADD_TESTCASE(TestEtUnit_Expect);
- etUnit_closeTestSuite();
-}
-
-
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.h b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.h
deleted file mode 100644
index e591d27ef..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * TestEtUnit.h
- *
- * Created on: 16.01.2012
- * Author: tschuetz
- */
-
-#ifndef _TESTETUNIT_H_
-#define _TESTETUNIT_H_
-
-void TestEtUnit_runSuite(void);
-
-#endif /* _TESTETUNIT_H_ */

Back to the top