From: Marko Luukkainen Date: Fri, 20 Nov 2020 10:25:48 +0000 (+0200) Subject: Previous change broke comparison of asserted enumerations X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=752a36aca7c905ac07f65799509925e4cb252ab1;p=simantics%2Finterop.git Previous change broke comparison of asserted enumerations gitlab #25 Change-Id: I3ddbf9ea2ece5830fbe1400196ec9d96bfd01e23 --- diff --git a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java index d245093..8232075 100644 --- a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java +++ b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java @@ -1265,7 +1265,10 @@ public class GraphComparator { } } else { // Non literal properties. - if (comparator.compare(g, s1.getObject(), s2.getObject()) != ResourceComparator.NO_MATCH) { + int comp = comparator.compare(g, s1.getObject(), s2.getObject()); + if (comp == ResourceComparator.NO_MATCH) { + addModification(r1,s1,r2,s2); + } else if (comp != ResourceComparator.EXACT_MATCH) { if (!s1.getObject().equals(s1.getSubject()) && !s2.getObject().equals(s2.getSubject())) { if (!a1 && !a2) { // compare props matches objects, so we can call that only for non asserted statements @@ -1279,7 +1282,7 @@ public class GraphComparator { addModification(r1,s1,r2,s2); } } else { - addModification(r1,s1,r2,s2); + // Exact match, nothing to do. } } } else {