diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7c29ee6..f72155b8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,4 +18,4 @@ jobs: with: java-version: 17 - name: Build with Gradle - run: ./gradlew -Dorg.gradle.jvmargs=-XX:+UseContainerSupport -PleaseExcludeBenchmarks allTests --stacktrace --no-daemon \ No newline at end of file + run: ./gradlew -Dorg.gradle.jvmargs=-XX:+UseContainerSupport -PleaseExcludeBenchmarks allTests --stacktrace \ No newline at end of file diff --git a/src/jvmTest/kotlin/ai/hypergraph/kaliningraph/automata/WFSATest.kt b/src/jvmTest/kotlin/ai/hypergraph/kaliningraph/automata/WFSATest.kt index 0e95ee34..d2761a38 100644 --- a/src/jvmTest/kotlin/ai/hypergraph/kaliningraph/automata/WFSATest.kt +++ b/src/jvmTest/kotlin/ai/hypergraph/kaliningraph/automata/WFSATest.kt @@ -37,7 +37,8 @@ class WFSATest { @Test fun testLBHRepair() { val toRepair = "NAME : NEWLINE NAME = STRING NEWLINE NAME = NAME . NAME ( STRING ) NEWLINE" - val pt = Grammars.seq2parsePythonCFG.makeLevPTree(toRepair, 1) + val radius = 1 + val pt = Grammars.seq2parsePythonCFG.makeLevPTree(toRepair, radius) measureTimedValue { pt.propagator>( both = { a, b -> if (a == null) b else if (b == null) a else Concatenation(a, b) }, @@ -55,6 +56,7 @@ class WFSATest { }.also { it.value.forEach { println(levenshteinAlign(toRepair, it).paintANSIColors()) + assertTrue(levenshtein(toRepair, it) <= radius) assertTrue(it in Grammars.seq2parsePythonCFG.language) } }.also { println("Decoding ${it.value.size} repairs took ${it.duration}") }