minor: Remove ignored test for not implemented and not needed feature of MatchJournal

This commit is contained in:
Grigorii Kirgizov 2020-12-15 16:07:36 +03:00
parent bd25263eac
commit e73394863e
1 changed files with 0 additions and 97 deletions

View File

@ -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()