From e73394863ef5fbeabc849172476f48aad8e00250 Mon Sep 17 00:00:00 2001 From: Grigorii Kirgizov Date: Tue, 15 Dec 2020 16:07:36 +0300 Subject: [PATCH] minor: Remove ignored test for not implemented and not needed feature of MatchJournal --- reactor/Test/test/TestStoreAwareJournal.kt | 97 ---------------------- 1 file changed, 97 deletions(-) diff --git a/reactor/Test/test/TestStoreAwareJournal.kt b/reactor/Test/test/TestStoreAwareJournal.kt index e0b5c440..efbe247b 100644 --- a/reactor/Test/test/TestStoreAwareJournal.kt +++ b/reactor/Test/test/TestStoreAwareJournal.kt @@ -276,103 +276,6 @@ class TestStoreAwareJournal { } } - @Test - @Ignore("Journal in current state doesn't track precise position inside Chunk") - fun testReplayInsideChunk() { - val mockController = MockController() - with(programWithRules( - rule("rule1", - headKept( - pconstraint("foo") - ), - body( - pconstraint("bar") - )), - rule("rule2", - headReplaced( - pconstraint("bar"), - pconstraint("foo") - ), - body( - constraint("lax"), - constraint("qux"), - constraint("shwux"), - constraint("kex"), - pconstraint("buzz") - - )), - rule("rule3", - headKept( - constraint("qux") - ), - headReplaced( - constraint("lax"), - constraint("shwux") - ), - body( - )) - )) - { - with(JournalDispatcherHelper(Dispatcher(RuleIndex(rules)))) { - - val initPos = hist.currentPos() - - logExpand(principalOccurrenceInit("foo")) - val fooPos = hist.currentPos() - - logFirstMatch() - logExpandJustified("bar") - - logFirstMatch() - logExpand("lax") - logExpand("qux") - val quxPos = hist.currentPos() - logExpand("shwux") - val shwuxPos = hist.currentPos() - - logFirstMatch() - logExpand("kex") - val kexPos = hist.currentPos() - logExpandJustified("buzz") - - val lastPos = hist.currentPos() - - // 'replay' to the saved pos after full 'resetStore' must restore the store - with(hist) { - - storeView().constraintSymbols() shouldBe setOf(sym0("qux"), sym0("kex"), sym0("buzz")) - - resetStore() - - - replay(quxPos) - - storeView().constraintSymbols() shouldBe setOf(sym0("qux"), sym0("lax")) - - // second replay to the same position inside chunk, nothing should change - replay(quxPos) - - storeView().constraintSymbols() shouldBe setOf(sym0("qux"), sym0("lax")) - - - replay(shwuxPos) - - storeView().constraintSymbols() shouldBe setOf(sym0("qux"), sym0("lax"), sym0("shwux")) - - // replay inside chunk when non principal-match happenned - replay(kexPos) - - storeView().constraintSymbols() shouldBe setOf(sym0("qux"), sym0("kex")) - - - replay(lastPos) - - storeView().constraintSymbols() shouldBe setOf(sym0("qux"), sym0("kex"), sym0("buzz")) - } - } - } - } - @Test fun testResetStoreThenReplay() { val mockController = MockController()