Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2015-07-07 06:22:28 -0400
committerJuergen Haug2015-07-07 09:43:51 -0400
commitf5d819988ab66b24df4f247a93e0b7fd43fbc198 (patch)
tree1f831ce304034a5755a8d8238b31cdbe585aa4cb /runtime/org.eclipse.etrice.runtime.java/src/org/eclipse
parentb43132eebb34507bf5436b5f19d8d0a645a33a21 (diff)
downloadorg.eclipse.etrice-f5d819988ab66b24df4f247a93e0b7fd43fbc198.tar.gz
org.eclipse.etrice-f5d819988ab66b24df4f247a93e0b7fd43fbc198.tar.xz
org.eclipse.etrice-f5d819988ab66b24df4f247a93e0b7fd43fbc198.zip
[etUnit] added etunit for modellib + fixes
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.java/src/org/eclipse')
-rw-r--r--runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java b/runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java
index 1854a101e..a35241119 100644
--- a/runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java
+++ b/runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java
@@ -37,7 +37,6 @@ public class EtUnit {
private static BufferedWriter out = null;
private static long etUnit_startTime;
- private static long etUnit_currentTime;
private static int etUnit_nextCaseId = 1;
private static HashSet<Integer> failed = new HashSet<Integer>();
private static HashMap<Integer, OrderInfo> orderInfo = new HashMap<Integer, OrderInfo>();
@@ -65,7 +64,6 @@ public class EtUnit {
}
etUnit_startTime = System.currentTimeMillis();
- etUnit_currentTime = etUnit_startTime;
System.out.println("Start time: "+etUnit_startTime);
}
@@ -113,9 +111,15 @@ public class EtUnit {
}
public static void etUnit_closeTestCase(int id) {
- long time = System.currentTimeMillis() - etUnit_currentTime;
- etUnit_currentTime = System.currentTimeMillis();
+ long time = System.currentTimeMillis() - etUnit_startTime;
+ OrderInfo info = orderInfo.get(id);
+ if (info!=null) {
+ if (info.current != info.list.length) {
+ etUnit_handleExpect(id, false, "EXPECT_ORDER was not completed", null, null);
+ }
+ }
+
if (out!=null) {
try {
out.write("tc end "+id+": "+time+"\n");

Back to the top