Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-01-12 14:11:37 +0000
committerHenrik Rentz-Reichert2012-01-12 14:11:37 +0000
commitcaa7cd1c95a48b30b65f6b3fa6486b498dac56a3 (patch)
tree4fcdf883d1823f989ab83d7edd747546b7bc91c4 /runtime/org.eclipse.etrice.runtime.c/src/RUnit.h
parent19701c3a39434f3272ffe590f9284f3e0542e43b (diff)
parent1d5477d83b321341015ae4aaebe834e71445b4bf (diff)
downloadorg.eclipse.etrice-caa7cd1c95a48b30b65f6b3fa6486b498dac56a3.tar.gz
org.eclipse.etrice-caa7cd1c95a48b30b65f6b3fa6486b498dac56a3.tar.xz
org.eclipse.etrice-caa7cd1c95a48b30b65f6b3fa6486b498dac56a3.zip
Merge branch 'master' of ssh://hrentzreich@git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/RUnit.h')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/RUnit.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/RUnit.h b/runtime/org.eclipse.etrice.runtime.c/src/RUnit.h
new file mode 100644
index 000000000..a3badcc7e
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.c/src/RUnit.h
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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 _RUNIT_H_
+#define _RUNIT_H_
+
+#include "datatypes.h"
+#include <stdio.h>
+#include <time.h>
+
+
+// open / close
+void RUnit_open(char* testResultPath, char* testFileName);
+void RUnit_close(void);
+void RUnit_openTestSuite(char* testSuiteName);
+void RUnit_closeTestSuite(void);
+void RUnit_openTestCase(char* testCaseName);
+void RUnit_closeTestCase(void);
+
+/* boolean values */
+void EXPECT_TRUE(const char* testcase, etBool condition);
+void EXPECT_FALSE(const char* testcase, etBool condition);
+
+/* signed integer values */
+void EXPECT_EQUAL_INT8(const char* testcase, etInt8 expected, etInt8 actual);
+void EXPECT_EQUAL_INT16(const char* testcase, etInt16 expected, etInt16 actual);
+void EXPECT_EQUAL_INT32(const char* testcase, etInt32 expected, etInt32 actual);
+
+/* unsigned integer values */
+void EXPECT_EQUAL_UINT8(const char* testcase, etUInt8 expected, etUInt8 actual);
+void EXPECT_EQUAL_UINT16(const char* testcase, etUInt16 expected, etUInt16 actual);
+void EXPECT_EQUAL_UINT32(const char* testcase, etUInt32 expected, etUInt32 actual);
+
+/* float values */
+void EXPECT_EQUAL_FLOAT32(const char* testcase, etFloat32 expected, etFloat32 actual, etFloat32 precision);
+void EXPECT_EQUAL_FLOAT64(const char* testcase, etFloat64 expected, etFloat64 actual, etFloat64 precision);
+
+/* Pointers */
+#define EXPECT_EQUAL_PTR(testcase, expected, actual) \
+ expect_equal_void_ptr(testcase, (const void*) expected, (const void*) actual);
+
+void expect_equal_void_ptr(const char* testcase, const void* expected, const void* actual);
+
+#endif /* _RUNIT_H_ */

Back to the top