From: Marko Luukkainen Date: Wed, 2 Dec 2020 14:40:52 +0000 (+0200) Subject: Asserted property statement processing was flawed. X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=eb02811bb777a87c279370f42e9a1b68d2de7314;p=simantics%2Finterop.git Asserted property statement processing was flawed. Non asserted statements were added twice! First processed statement was not checked for duplication. gitlab #25 Change-Id: Ie42e967888fde878a1f03b8e04f084f878f1c74c --- 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 3b7bb31..8ce5a9d 100644 --- a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java +++ b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java @@ -834,7 +834,7 @@ public class GraphComparator { out.add(s); else { boolean has = false; - if (i > 1 && in.get(i-1).getPredicate().equals(s.getPredicate())) + if (i > 0 && in.get(i-1).getPredicate().equals(s.getPredicate())) has = true; else if (i < in.size()-1 && in.get(i+1).getPredicate().equals(s.getPredicate())) has = true; @@ -842,11 +842,6 @@ public class GraphComparator { out.add(s); } - } - for (Statement s : in) { - if (!s.isAsserted(r)) - out.add(s); - } return out; }