From: Hannu Niemistö Date: Sun, 16 Jul 2017 10:32:05 +0000 (+0300) Subject: (refs #7365) Fixed the bug in the test CHR11.scl X-Git-Tag: v1.31.0~264^2~52 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F716%2F1;p=simantics%2Fplatform.git (refs #7365) Fixed the bug in the test CHR11.scl Change-Id: I961c3ae92013ec4085fe61eee9021a3cc0aff6e4 --- diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/CHRQuery.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/CHRQuery.java index 9e2bf6f34..5cb0f2aee 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/CHRQuery.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/CHRQuery.java @@ -3,6 +3,7 @@ package org.simantics.scl.compiler.elaboration.chr; import org.simantics.scl.compiler.elaboration.chr.plan.PostCommitOp; import org.simantics.scl.compiler.elaboration.chr.plan.PreCommitOp; import org.simantics.scl.compiler.elaboration.chr.planning.QueryPlanningContext; +import org.simantics.scl.compiler.elaboration.chr.relations.CHRConstraint; import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext; import org.simantics.scl.compiler.elaboration.contexts.TranslationContext; import org.simantics.scl.compiler.elaboration.contexts.TypingContext; @@ -62,7 +63,7 @@ public class CHRQuery extends Symbol { } } - public boolean createQueryPlan(QueryPlanningContext context, Expression inputFact, int activeLiteralId) { + public boolean createQueryPlan(QueryPlanningContext context, Expression inputFact, int activeLiteralId, CHRConstraint initConstraint) { for(int i=0;i currentId) + currentId = context.currentId; + } } diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ActiveTests.java b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ActiveTests.java index 4b9a3ffd2..c4d1c6f23 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ActiveTests.java +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ActiveTests.java @@ -19,6 +19,4 @@ public class ActiveTests extends TestBase { */ //@Test public void Bug6989() { test(); } - - @Test public void CHR11() { test(); } } diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java index a5975932b..d8f703afc 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java @@ -32,6 +32,7 @@ public class ModuleRegressionTests extends TestBase { @Test public void CHR8() { test(); } @Test public void CHR9() { test(); } @Test public void CHR10() { test(); } + @Test public void CHR11() { test(); } @Test public void ClosureRecursion() { test(); } @Test public void Collaz() { test(); } @Test public void Compose() { test(); }