diff options
author | 2021-07-26 18:44:34 +0200 | |
---|---|---|
committer | 2021-07-26 18:44:34 +0200 | |
commit | d784819b4515bf4b16b598b619d72c349d16d481 (patch) | |
tree | 33bada111863826b8b1be9d135755369252d000b /Solvers/VIATRA-Solver/org.eclipse.viatra.solver.data/tests/org/eclipse/viatra/solver/data/map/test/support/MapTestEnvironment.java | |
parent | Smoketest refactor splitting fast and slow smoke tests (diff) | |
download | VIATRA-Generator-d784819b4515bf4b16b598b619d72c349d16d481.tar.gz VIATRA-Generator-d784819b4515bf4b16b598b619d72c349d16d481.tar.zst VIATRA-Generator-d784819b4515bf4b16b598b619d72c349d16d481.zip |
Small renaming and refactoring
Diffstat (limited to 'Solvers/VIATRA-Solver/org.eclipse.viatra.solver.data/tests/org/eclipse/viatra/solver/data/map/test/support/MapTestEnvironment.java')
-rw-r--r-- | Solvers/VIATRA-Solver/org.eclipse.viatra.solver.data/tests/org/eclipse/viatra/solver/data/map/test/support/MapTestEnvironment.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Solvers/VIATRA-Solver/org.eclipse.viatra.solver.data/tests/org/eclipse/viatra/solver/data/map/test/support/MapTestEnvironment.java b/Solvers/VIATRA-Solver/org.eclipse.viatra.solver.data/tests/org/eclipse/viatra/solver/data/map/test/support/MapTestEnvironment.java index ba1d0cff..1ff29d68 100644 --- a/Solvers/VIATRA-Solver/org.eclipse.viatra.solver.data/tests/org/eclipse/viatra/solver/data/map/test/support/MapTestEnvironment.java +++ b/Solvers/VIATRA-Solver/org.eclipse.viatra.solver.data/tests/org/eclipse/viatra/solver/data/map/test/support/MapTestEnvironment.java | |||
@@ -30,7 +30,7 @@ public class MapTestEnvironment<KEY,VALUE> { | |||
30 | 30 | ||
31 | @Override | 31 | @Override |
32 | public int getHash(Integer key, int index) { | 32 | public int getHash(Integer key, int index) { |
33 | if(evil && index < 100 && index < key/3) { | 33 | if(evil && index < 15 && index < key/3) { |
34 | return 7; | 34 | return 7; |
35 | } | 35 | } |
36 | int result = 1; | 36 | int result = 1; |
@@ -45,6 +45,14 @@ public class MapTestEnvironment<KEY,VALUE> { | |||
45 | return chp; | 45 | return chp; |
46 | } | 46 | } |
47 | 47 | ||
48 | public static void printStatus(String scenario, int actual, int max, String stepName) { | ||
49 | if(actual%10000==0) { | ||
50 | String printStepName = stepName==null?"":stepName; | ||
51 | System.out.format(scenario+":%d/%d (%d%%) "+printStepName+ "%n",actual,max,actual*100/max); | ||
52 | } | ||
53 | |||
54 | } | ||
55 | |||
48 | public static <KEY, VALUE> void compareTwoMaps(String title, VersionedMapImpl<KEY, VALUE> map1, VersionedMapImpl<KEY, VALUE> map2) { | 56 | public static <KEY, VALUE> void compareTwoMaps(String title, VersionedMapImpl<KEY, VALUE> map1, VersionedMapImpl<KEY, VALUE> map2) { |
49 | //1. Comparing cursors. | 57 | //1. Comparing cursors. |
50 | Cursor<KEY, VALUE> cursor1 = map1.getCursor(); | 58 | Cursor<KEY, VALUE> cursor1 = map1.getCursor(); |