aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/store/src/test
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-10-30 19:27:34 -0400
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-11-05 19:41:17 +0100
commit960af83c7c1cb871da03b9ac4ec6f44c94e78a1d (patch)
tree7d37ee007ee2d3b031d62ca892920d326758f438 /subprojects/store/src/test
parentrefactor: DNF query builder (diff)
downloadrefinery-960af83c7c1cb871da03b9ac4ec6f44c94e78a1d.tar.gz
refinery-960af83c7c1cb871da03b9ac4ec6f44c94e78a1d.tar.zst
refinery-960af83c7c1cb871da03b9ac4ec6f44c94e78a1d.zip
refactor: DNF atoms
Restore count != capability. Still needs semantics and tests for count atoms over partial models.
Diffstat (limited to 'subprojects/store/src/test')
-rw-r--r--subprojects/store/src/test/java/tools/refinery/store/map/tests/utils/MapTestEnvironment.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/subprojects/store/src/test/java/tools/refinery/store/map/tests/utils/MapTestEnvironment.java b/subprojects/store/src/test/java/tools/refinery/store/map/tests/utils/MapTestEnvironment.java
index 991b4f51..a4ba7441 100644
--- a/subprojects/store/src/test/java/tools/refinery/store/map/tests/utils/MapTestEnvironment.java
+++ b/subprojects/store/src/test/java/tools/refinery/store/map/tests/utils/MapTestEnvironment.java
@@ -56,7 +56,7 @@ public class MapTestEnvironment<K, V> {
56 } 56 }
57 57
58 } 58 }
59 59
60 public static <K, V> void compareTwoMaps(String title, VersionedMapImpl<K, V> map1, 60 public static <K, V> void compareTwoMaps(String title, VersionedMapImpl<K, V> map1,
61 VersionedMapImpl<K, V> map2) { 61 VersionedMapImpl<K, V> map2) {
62 compareTwoMaps(title, map1, map2, null); 62 compareTwoMaps(title, map1, map2, null);
@@ -112,7 +112,7 @@ public class MapTestEnvironment<K, V> {
112 oldOracleValue = oracle.remove(key); 112 oldOracleValue = oracle.remove(key);
113 } 113 }
114 if(oldSutValue == sut.getDefaultValue() && oldOracleValue != null) { 114 if(oldSutValue == sut.getDefaultValue() && oldOracleValue != null) {
115 fail("After put, SUT old value was default, but oracle old walue was " + oldOracleValue); 115 fail("After put, SUT old nodeId was default, but oracle old walue was " + oldOracleValue);
116 } 116 }
117 if(oldSutValue != sut.getDefaultValue()) { 117 if(oldSutValue != sut.getDefaultValue()) {
118 assertEquals(oldOracleValue, oldSutValue); 118 assertEquals(oldOracleValue, oldSutValue);
@@ -127,8 +127,8 @@ public class MapTestEnvironment<K, V> {
127 fail(title + ": " + e.getMessage()); 127 fail(title + ": " + e.getMessage());
128 } 128 }
129 129
130 // 1. Checking: if Reference contains <key,value> pair, then SUT contains 130 // 1. Checking: if Reference contains <key,nodeId> pair, then SUT contains
131 // <key,value> pair. 131 // <key,nodeId> pair.
132 // Tests get functions 132 // Tests get functions
133 for (Entry<K, V> entry : oracle.entrySet()) { 133 for (Entry<K, V> entry : oracle.entrySet()) {
134 V sutValue = sut.get(entry.getKey()); 134 V sutValue = sut.get(entry.getKey());
@@ -140,8 +140,8 @@ public class MapTestEnvironment<K, V> {
140 } 140 }
141 } 141 }
142 142
143 // 2. Checking: if SUT contains <key,value> pair, then Reference contains 143 // 2. Checking: if SUT contains <key,nodeId> pair, then Reference contains
144 // <key,value> pair. 144 // <key,nodeId> pair.
145 // Tests iterators 145 // Tests iterators
146 int elementsInSutEntrySet = 0; 146 int elementsInSutEntrySet = 0;
147 Cursor<K, V> cursor = sut.getAll(); 147 Cursor<K, V> cursor = sut.getAll();
@@ -160,7 +160,7 @@ public class MapTestEnvironment<K, V> {
160 } 160 }
161 161
162 // 3. Checking sizes 162 // 3. Checking sizes
163 // Counting of non-default value pairs. 163 // Counting of non-default nodeId pairs.
164 int oracleSize = oracle.entrySet().size(); 164 int oracleSize = oracle.entrySet().size();
165 long sutSize = sut.getSize(); 165 long sutSize = sut.getSize();
166 if (oracleSize != sutSize || oracleSize != elementsInSutEntrySet) { 166 if (oracleSize != sutSize || oracleSize != elementsInSutEntrySet) {