From 752a36aca7c905ac07f65799509925e4cb252ab1 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Fri, 20 Nov 2020 12:25:48 +0200 Subject: [PATCH] Previous change broke comparison of asserted enumerations gitlab #25 Change-Id: I3ddbf9ea2ece5830fbe1400196ec9d96bfd01e23 --- .../src/org/simantics/interop/test/GraphComparator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 { -- 2.45.1