From 91de6945160c883e6c88924d7d98047a17042f87 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Fri, 25 Dec 2020 00:35:04 +0700 Subject: [PATCH] Make tests internal --- src/commonTest/kotlin/OrTest.kt | 2 +- src/commonTest/kotlin/RepeatTest.kt | 2 +- src/commonTest/kotlin/TestLiftToAst.kt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commonTest/kotlin/OrTest.kt b/src/commonTest/kotlin/OrTest.kt index 4114061..2ac4ed2 100644 --- a/src/commonTest/kotlin/OrTest.kt +++ b/src/commonTest/kotlin/OrTest.kt @@ -26,4 +26,4 @@ class OrTest : Grammar() { assertTrue(result.errors[0] is MismatchedToken) assertTrue(result.errors[1] is UnexpectedEof) } -} \ No newline at end of file +} diff --git a/src/commonTest/kotlin/RepeatTest.kt b/src/commonTest/kotlin/RepeatTest.kt index e51f173..57d8bac 100644 --- a/src/commonTest/kotlin/RepeatTest.kt +++ b/src/commonTest/kotlin/RepeatTest.kt @@ -5,7 +5,7 @@ import com.github.h0tk3y.betterParse.lexer.* import com.github.h0tk3y.betterParse.parser.* import kotlin.test.* -class RepeatTest : Grammar() { +internal class RepeatTest : Grammar() { override val rootParser: Parser get() = throw NoSuchElementException() val a by regexToken("a") diff --git a/src/commonTest/kotlin/TestLiftToAst.kt b/src/commonTest/kotlin/TestLiftToAst.kt index f3df01c..91b1237 100644 --- a/src/commonTest/kotlin/TestLiftToAst.kt +++ b/src/commonTest/kotlin/TestLiftToAst.kt @@ -78,7 +78,7 @@ private fun SyntaxTree<*>.toTopDownStrings() = topDownNodesSequence() it.item?.typeName() }.toList() -class TestLiftToAst { +internal class TestLiftToAst { @Test fun continuousRange() { val astParser = booleanGrammar.liftToSyntaxTreeGrammar(LiftToSyntaxTreeOptions(retainSkipped = true), structureParsers = null) @@ -218,4 +218,4 @@ class TestLiftToAst { assertTrue(value.children.size == 2 && value.children.all { it.parser === booleanGrammar.or }) } -} \ No newline at end of file +}