From a58af2c9215755c2104e7cf9d324121b1ea3aa3e Mon Sep 17 00:00:00 2001 From: Fedor Isakov Date: Wed, 23 Dec 2015 16:43:37 +0100 Subject: [PATCH] Upgraded to the latest Kotlin beta --- ...otlin_kotlin_compiler_1_0_0_beta_4583.xml} | 8 +++---- ...n_kotlin_maven_plugin_1_0_0_beta_4583.xml} | 8 +++---- ...kotlin_kotlin_runtime_1_0_0_beta_4583.xml} | 8 +++---- ..._kotlin_kotlin_stdlib_1_0_0_beta_4583.xml} | 8 +++---- ..._kotlin_kotlin_runtime_1_0_0_beta_3595.xml | 12 ----------- ...s_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml | 13 ------------ reactor/API/API.iml | 8 +++---- reactor/Core/Core.iml | 10 ++++----- reactor/Reactor.iml | 8 +++---- reactor/Test/Test.iml | 10 ++++----- reactor/Test/test/TestBasicProgram.kt | 7 ++----- reactor/Test/test/TestHandler.kt | 4 +--- reactor/Test/test/TestMatcher.kt | 21 ++++++++----------- reactor/Test/test/TestPlanningSession.kt | 3 +-- reactor/pom.xml | 2 +- 15 files changed, 46 insertions(+), 84 deletions(-) rename reactor/.idea/libraries/{Maven__org_jetbrains_kotlin_kotlin_compiler_1_0_0_beta_3595.xml => Maven__org_jetbrains_kotlin_kotlin_compiler_1_0_0_beta_4583.xml} (66%) rename reactor/.idea/libraries/{Maven__org_jetbrains_kotlin_kotlin_maven_plugin_1_0_0_beta_3595.xml => Maven__org_jetbrains_kotlin_kotlin_maven_plugin_1_0_0_beta_4583.xml} (57%) rename reactor/.idea/libraries/{Maven__org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_3595.xml => Maven__org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_4583.xml} (66%) rename reactor/.idea/libraries/{Maven__org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml => Maven__org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_4583.xml} (65%) delete mode 100644 reactor/.idea/libraries/org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_3595.xml delete mode 100644 reactor/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml diff --git a/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_compiler_1_0_0_beta_3595.xml b/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_compiler_1_0_0_beta_4583.xml similarity index 66% rename from reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_compiler_1_0_0_beta_3595.xml rename to reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_compiler_1_0_0_beta_4583.xml index 951186e9..9ce025fa 100644 --- a/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_compiler_1_0_0_beta_3595.xml +++ b/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_compiler_1_0_0_beta_4583.xml @@ -1,13 +1,13 @@ - + - + - + - + \ No newline at end of file diff --git a/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_maven_plugin_1_0_0_beta_3595.xml b/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_maven_plugin_1_0_0_beta_4583.xml similarity index 57% rename from reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_maven_plugin_1_0_0_beta_3595.xml rename to reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_maven_plugin_1_0_0_beta_4583.xml index 0f0e311d..d3b6d009 100644 --- a/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_maven_plugin_1_0_0_beta_3595.xml +++ b/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_maven_plugin_1_0_0_beta_4583.xml @@ -1,13 +1,13 @@ - + - + - + - + \ No newline at end of file diff --git a/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_3595.xml b/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_4583.xml similarity index 66% rename from reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_3595.xml rename to reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_4583.xml index f61f9d61..4cc50375 100644 --- a/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_3595.xml +++ b/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_4583.xml @@ -1,13 +1,13 @@ - + - + - + - + \ No newline at end of file diff --git a/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml b/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_4583.xml similarity index 65% rename from reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml rename to reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_4583.xml index 64658963..f2eb0554 100644 --- a/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml +++ b/reactor/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_4583.xml @@ -1,13 +1,13 @@ - + - + - + - + \ No newline at end of file diff --git a/reactor/.idea/libraries/org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_3595.xml b/reactor/.idea/libraries/org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_3595.xml deleted file mode 100644 index 7465f93b..00000000 --- a/reactor/.idea/libraries/org_jetbrains_kotlin_kotlin_runtime_1_0_0_beta_3595.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/reactor/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml b/reactor/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml deleted file mode 100644 index 013b12c8..00000000 --- a/reactor/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_1_0_0_beta_3595.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/reactor/API/API.iml b/reactor/API/API.iml index 69b46b8d..1e0e6cb5 100644 --- a/reactor/API/API.iml +++ b/reactor/API/API.iml @@ -11,9 +11,9 @@ - - - + + + @@ -38,7 +38,7 @@ - + diff --git a/reactor/Core/Core.iml b/reactor/Core/Core.iml index dcf36cff..0ac417c2 100644 --- a/reactor/Core/Core.iml +++ b/reactor/Core/Core.iml @@ -13,13 +13,11 @@ - - - - - + + + @@ -44,7 +42,7 @@ - + diff --git a/reactor/Reactor.iml b/reactor/Reactor.iml index 69d97917..766e85a6 100644 --- a/reactor/Reactor.iml +++ b/reactor/Reactor.iml @@ -9,9 +9,9 @@ - - - + + + @@ -36,7 +36,7 @@ - + diff --git a/reactor/Test/Test.iml b/reactor/Test/Test.iml index 5df3989e..45ef6c11 100644 --- a/reactor/Test/Test.iml +++ b/reactor/Test/Test.iml @@ -13,16 +13,14 @@ - - - - - + + + @@ -47,7 +45,7 @@ - + diff --git a/reactor/Test/test/TestBasicProgram.kt b/reactor/Test/test/TestBasicProgram.kt index 81784bd5..9322f57c 100644 --- a/reactor/Test/test/TestBasicProgram.kt +++ b/reactor/Test/test/TestBasicProgram.kt @@ -6,11 +6,8 @@ import jetbrains.mps.logic.reactor.core.ReactorPlanningSession import jetbrains.mps.logic.reactor.predicate.ReactorSessionSolver import jetbrains.mps.logic.reactor.program.EvaluationSession import jetbrains.mps.logic.reactor.program.PlanningSession -import org.junit.AfterClass -import org.junit.Before -import org.junit.BeforeClass -import org.junit.Test -import kotlin.test.assertEquals +import org.junit.* +import org.junit.Assert.* /** * @author Fedor Isakov diff --git a/reactor/Test/test/TestHandler.kt b/reactor/Test/test/TestHandler.kt index 1775ac63..d721e298 100644 --- a/reactor/Test/test/TestHandler.kt +++ b/reactor/Test/test/TestHandler.kt @@ -3,12 +3,10 @@ import jetbrains.mps.logic.reactor.core.Handler import jetbrains.mps.logic.reactor.logical.Logical import jetbrains.mps.logic.reactor.logical.LogicalPattern import jetbrains.mps.logic.reactor.predicate.ReactorSessionSolver +import org.junit.Assert.* import org.junit.Before import org.junit.BeforeClass import org.junit.Test -import kotlin.test.assertEquals -import kotlin.test.assertFalse -import kotlin.test.assertTrue /** * @author Fedor Isakov diff --git a/reactor/Test/test/TestMatcher.kt b/reactor/Test/test/TestMatcher.kt index f2478e35..74edfe84 100644 --- a/reactor/Test/test/TestMatcher.kt +++ b/reactor/Test/test/TestMatcher.kt @@ -2,11 +2,8 @@ import jetbrains.mps.logic.reactor.constraint.Constraint import jetbrains.mps.logic.reactor.constraint.ConstraintOccurrence import jetbrains.mps.logic.reactor.core.Matcher import jetbrains.mps.logic.reactor.core.matches -import org.junit.Assert +import org.junit.Assert.* import org.junit.Test -import kotlin.test.assertEquals -import kotlin.test.assertFalse -import kotlin.test.assertTrue /** * @author Fedor Isakov @@ -64,9 +61,9 @@ class TestMatcher { )) ).matcher().run{ lookupMatches(occurrence("main")).let { matches -> - assertFalse { matches.any { m -> m.isPartial() } } + assertFalse(matches.any { m -> m.isPartial() }) assertEquals(rules, matches.map { m -> m.rule }) - matches.forEach { m -> assertTrue { m.kept.size() + m.discarded.size() == 1 } } + matches.forEach { m -> assertTrue(m.kept.size() + m.discarded.size() == 1) } matches.flatMap { m -> m.kept + m.discarded }.forEach { pair -> val (cst, occ) = pair assert(cst.symbol().id() == "main") @@ -97,7 +94,7 @@ class TestMatcher { )) ).matcher().run{ lookupMatches(occurrence("main")).let { matches -> - assertFalse { matches.any { m -> m.isPartial() } } + assertFalse(matches.any { m -> m.isPartial() }) assertEquals(rules.drop(1), matches.map { m -> m.rule }) } } @@ -125,7 +122,7 @@ class TestMatcher { )) ).matcher(occurrence("aux")).run { lookupMatches(occurrence("main")).let { matches -> - assertFalse { matches.any { m -> m.isPartial() } } + assertFalse(matches.any { m -> m.isPartial() }) assertEquals(rules, matches.map { m -> m.rule }) } } @@ -150,7 +147,7 @@ class TestMatcher { )) ).matcher().run{ lookupMatches(occurrence("main", "bar")).let { matches -> - assertFalse { matches.any { m -> m.isPartial() } } + assertFalse(matches.any { m -> m.isPartial() }) assertEquals(rules.drop(1), matches.map { m -> m.rule }) } } @@ -196,8 +193,8 @@ class TestMatcher { ) ).matcher().lookupMatches(occurrence("foo", "blah", b)).first().run { assertEquals("blah", logicalContext().valueFor(A)) - Assert.assertSame(b, logicalContext().valueFor(B)) - assertEquals(C.instance(), logicalContext().valueFor(C)) + assertSame(b, logicalContext().valueFor(B)) + assertEquals(C.instance(), logicalContext().valueFor(C)) } } @@ -242,7 +239,7 @@ class TestMatcher { assertEquals(2, matches.count()) assertEquals(listOf("main1", "main1"), matches.map { m -> m.rule.tag() }) matches.map { m -> setOf(M, N).map { lp -> m.logicalContext().valueFor(lp) } }.forEach { vals -> - assertEquals(setOf(42, 16), vals.toSet()) + assertEquals(setOf(42, 16), vals.toSet()) } assertTrue(matches.all{ m -> m.occurrences().toSet().size == 2 }) } diff --git a/reactor/Test/test/TestPlanningSession.kt b/reactor/Test/test/TestPlanningSession.kt index 70212a43..034193b4 100644 --- a/reactor/Test/test/TestPlanningSession.kt +++ b/reactor/Test/test/TestPlanningSession.kt @@ -6,13 +6,12 @@ import jetbrains.mps.logic.reactor.rule.InvalidConstraintException import jetbrains.mps.logic.reactor.rule.InvalidRuleException import jetbrains.mps.logic.reactor.core.ReactorPlanningSession import jetbrains.mps.logic.reactor.predicate.ReactorSessionSolver +import org.junit.Assert.* import org.junit.Before import org.junit.BeforeClass import org.junit.Test import java.util.* import kotlin.reflect.KClass -import kotlin.test.assertEquals -import kotlin.test.expect /** * @author Fedor Isakov diff --git a/reactor/pom.xml b/reactor/pom.xml index 155182b4..0a3572c3 100644 --- a/reactor/pom.xml +++ b/reactor/pom.xml @@ -8,7 +8,7 @@ UTF-8 - 1.0.0-beta-3595 + 1.0.0-beta-4583 jetbrains.mps.logic.reactor