]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Asserted property statement processing was flawed. 22/4622/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Wed, 2 Dec 2020 14:40:52 +0000 (16:40 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Wed, 2 Dec 2020 14:40:52 +0000 (16:40 +0200)
Non asserted statements were added twice!
First processed statement was not checked for duplication.

gitlab #25

Change-Id: Ie42e967888fde878a1f03b8e04f084f878f1c74c

org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java

index 3b7bb31d8e4a7fb41ef41950dbdc320ffa88bb7f..8ce5a9d66c0b4248a8c3b496bc8ce88e8a16cff3 100644 (file)
@@ -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;
        }