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/TestEtUnit.c
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/TestEtUnit.c')
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c67
1 files changed, 0 insertions, 67 deletions
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();
-}
-
-

Back to the top