Skip to content

Commit

Permalink
update tests running
Browse files Browse the repository at this point in the history
  • Loading branch information
bachish committed Jan 5, 2025
1 parent f1cb7d3 commit 1e521c6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 363 deletions.
6 changes: 0 additions & 6 deletions benchmarks/src/test/kotlin/AntlrBenchmark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import org.antlr.Java8Lexer
import org.antlr.Java8Parser
import org.antlr.v4.runtime.CharStreams
import org.antlr.v4.runtime.CommonTokenStream
import org.junit.jupiter.api.Disabled
import java.io.File

fun main(args: Array<String>) {
Expand Down Expand Up @@ -36,10 +35,5 @@ class AntlrBenchmark : ParsingBenchmarks() {
}
}
}

@Disabled
fun testOne() {
parse("")
}
}

2 changes: 2 additions & 0 deletions benchmarks/src/test/kotlin/AntlrFastBenchmark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import org.antlr.fast.JavaLexer
import org.antlr.fast.JavaParser
import org.antlr.v4.runtime.CharStreams
import org.antlr.v4.runtime.CommonTokenStream
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.DynamicTest
import org.junit.jupiter.api.DynamicTest.dynamicTest
import org.junit.jupiter.api.TestFactory
Expand Down Expand Up @@ -58,6 +59,7 @@ class AntlrFastBenchmark : ParsingBenchmarks() {
var sum_count: Int = 0
val fileName = "tokens_count.csv"

@Disabled
@TestFactory
@Timeout(100)
fun getTokensCount(): Collection<DynamicTest> {
Expand Down
1 change: 1 addition & 0 deletions benchmarks/src/test/kotlin/OfflineUcfsBenchmark.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.junit.jupiter.api.Disabled
import org.ucfs.input.LinearInputLabel
import java.io.File

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/src/test/kotlin/OnlineUcfsBenchmark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class OnlineUcfsBenchmark : ParsingBenchmarks() {
}


fun parseOne() {
fun parseOne(sourceCode: String) {
val startState = Java8().rsm
val tokens = getTokenStream(sourceCode)
val gll = Gll.gll(startState, tokens)
Expand All @@ -23,6 +23,6 @@ class OnlineUcfsBenchmark : ParsingBenchmarks() {
writeSppfToDot(sppf!!, "sppf.dot")
}

val sourceCode: String =
File("/home/olga/UCFS/benchmarks/src/main/java/org/antlr/beb.jaba").readText()
fun getSourceCode(path : String): String =
File(path).readText()
}
3 changes: 1 addition & 2 deletions benchmarks/src/test/kotlin/ParsingBenchmarks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ abstract class ParsingBenchmarks {
return Path.of(res.toURI())
}

// Disable for running on CI
@Disabled
@Disabled("Disable for running on CI")
@TestFactory
@Timeout(100)
fun timeTest(): Collection<DynamicTest> {
Expand Down
Loading

0 comments on commit 1e521c6

Please # to comment.