diff --git a/build.gradle.kts b/build.gradle.kts index bd3ec41b..377bf967 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,6 +3,7 @@ import com.akuleshov7.buildutils.* plugins { kotlin("multiplatform") apply false kotlin("plugin.serialization") version Versions.KOTLIN apply false + id("io.kotest.multiplatform") version Versions.KOTEST apply false id("com.akuleshov7.buildutils.publishing-configuration") } diff --git a/buildSrc/src/main/kotlin/com/akuleshov7/Versions.kt b/buildSrc/src/main/kotlin/com/akuleshov7/Versions.kt index 4ccaba84..0731e408 100644 --- a/buildSrc/src/main/kotlin/com/akuleshov7/Versions.kt +++ b/buildSrc/src/main/kotlin/com/akuleshov7/Versions.kt @@ -8,4 +8,5 @@ object Versions { const val JUNIT = "5.7.1" const val OKIO = "3.1.0" const val SERIALIZATION = "1.5.0" + const val KOTEST = "5.7.2" } diff --git a/ktoml-core/build.gradle.kts b/ktoml-core/build.gradle.kts index ee42e357..581e2327 100644 --- a/ktoml-core/build.gradle.kts +++ b/ktoml-core/build.gradle.kts @@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest plugins { kotlin("multiplatform") kotlin("plugin.serialization") + id("io.kotest.multiplatform") id("com.akuleshov7.buildutils.publishing-configuration") } @@ -50,6 +51,8 @@ kotlin { dependencies { implementation(kotlin("test-common")) implementation(kotlin("test-annotations-common")) + implementation("io.kotest:kotest-framework-engine:${Versions.KOTEST}") + implementation("io.kotest:kotest-assertions-core:${Versions.KOTEST}") } } diff --git a/ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/NullableTablesTest.kt b/ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/NullableTablesTest.kt index 7b820f26..13a779fc 100644 --- a/ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/NullableTablesTest.kt +++ b/ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/NullableTablesTest.kt @@ -1,13 +1,12 @@ package com.akuleshov7.ktoml.decoders import com.akuleshov7.ktoml.Toml -import com.akuleshov7.ktoml.TomlConfig import com.akuleshov7.ktoml.TomlInputConfig +import io.kotest.matchers.nulls.shouldNotBeNull +import io.kotest.matchers.shouldBe import kotlinx.serialization.Serializable import kotlinx.serialization.decodeFromString import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.assertNotNull @Serializable data class Key(val value: Long) @@ -43,8 +42,8 @@ class NullableTablesTest { """.trimIndent() ) - assertNotNull(toml1) - assertEquals(1L, toml1.key?.value) + toml1.shouldNotBeNull() + toml1.key?.value shouldBe 1L val toml2 = mapper.decodeFromString( """ @@ -53,8 +52,8 @@ class NullableTablesTest { """.trimIndent() ) - assertNotNull(toml2) - assertEquals(1L, toml2.key?.value) + toml2.shouldNotBeNull() + toml2.key?.value shouldBe 1L val toml3 = mapper.decodeFromString( """ @@ -63,8 +62,8 @@ class NullableTablesTest { """.trimIndent() ) - assertNotNull(toml3) - assertEquals(1L, toml3.key.value) + toml3.shouldNotBeNull() + toml3.key.value shouldBe 1L val toml4 = mapper.decodeFromString( """ @@ -73,8 +72,8 @@ class NullableTablesTest { """.trimIndent() ) - assertNotNull(toml4) - assertEquals(1L, toml4.key.value) + toml4.shouldNotBeNull() + toml4.key.value shouldBe 1L } } @@ -88,12 +87,12 @@ class EmptyTomlTest { """.trimIndent() ) - assertEquals(Config(), res) + res shouldBe Config() res = Toml.decodeFromString( "".trimIndent() ) - assertEquals(Config(), res) + res shouldBe Config() } } diff --git a/ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/PartialDecoderTest.kt b/ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/PartialDecoderTest.kt index 9be2b51d..93091f78 100644 --- a/ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/PartialDecoderTest.kt +++ b/ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/PartialDecoderTest.kt @@ -1,33 +1,26 @@ package com.akuleshov7.ktoml.decoders import com.akuleshov7.ktoml.Toml +import io.kotest.matchers.shouldBe import kotlinx.serialization.ExperimentalSerializationApi import kotlin.test.Test import kotlinx.serialization.Serializable import kotlinx.serialization.serializer -import kotlin.test.assertEquals @ExperimentalSerializationApi class PartialDecoderTest { - @Serializable - data class TwoTomlTables(val table1: Table1, val table2: Table2) @Serializable data class Table1(val a: Long, val b: Long) - @Serializable - data class Table2(val c: Long, val e: Long, val d: Long) - @Test fun testPartialDecoding() { - val test = TwoTomlTables(Table1(1, 2), Table2(1, 2, 3)) - assertEquals( - test.table1, - Toml.partiallyDecodeFromString( - serializer(), - "[table1] \n a = 1 \n b = 2 \n [table2] \n c = 1 \n e = 2 \n d = 3", - "table1" - ) + val parsedResult = Toml.partiallyDecodeFromString( + serializer(), + "[table1] \n a = 1 \n b = 2 \n [table2] \n c = 1 \n e = 2 \n d = 3", + "table1" ) + + parsedResult shouldBe Table1(1, 2) } } diff --git a/ktoml-file/build.gradle.kts b/ktoml-file/build.gradle.kts index bd2dacde..1fe6373f 100644 --- a/ktoml-file/build.gradle.kts +++ b/ktoml-file/build.gradle.kts @@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest plugins { kotlin("multiplatform") kotlin("plugin.serialization") + id("io.kotest.multiplatform") id("com.akuleshov7.buildutils.publishing-configuration") } @@ -46,6 +47,7 @@ kotlin { dependencies { implementation(kotlin("test-common")) implementation(kotlin("test-annotations-common")) + implementation("io.kotest:kotest-framework-engine:${Versions.KOTEST}") } } diff --git a/ktoml-file/src/commonTest/kotlin/com/akuleshov7/ktoml/file/Regression189.kt b/ktoml-file/src/commonTest/kotlin/com/akuleshov7/ktoml/file/Regression189.kt index 9c3a874b..4d362f4a 100644 --- a/ktoml-file/src/commonTest/kotlin/com/akuleshov7/ktoml/file/Regression189.kt +++ b/ktoml-file/src/commonTest/kotlin/com/akuleshov7/ktoml/file/Regression189.kt @@ -1,10 +1,10 @@ package com.akuleshov7.ktoml.file +import io.kotest.matchers.shouldBe import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.serializer import kotlin.test.Test -import kotlin.test.assertEquals class Regression189 { @Serializable @@ -21,13 +21,12 @@ class Regression189 { fun regressionCastTest() { val file = "src/commonTest/resources/regression_189.toml" val parsedResult = TomlFileReader.decodeFromFile(serializer(), file) - assertEquals(ServerSettings( + parsedResult shouldBe ServerSettings( "test5", "http://localhost:8080", "50694ed7-a93f-4713-9e55-4d512ce2e4db", "a8DkRGThvz13cmVubFdgX0CsoLfAtXcBvyxiKCPY34FEt3UDmPBkMKFRk4iKRuRp", - "20NSBgKB2B9C2u2toAuiPqlaZgfEWJ4m50562YK9w575SNt31CWrjcpwqeiDCYhZ"), - parsedResult + "20NSBgKB2B9C2u2toAuiPqlaZgfEWJ4m50562YK9w575SNt31CWrjcpwqeiDCYhZ" ) } } \ No newline at end of file diff --git a/ktoml-file/src/commonTest/kotlin/com/akuleshov7/ktoml/file/TomlFileParserTest.kt b/ktoml-file/src/commonTest/kotlin/com/akuleshov7/ktoml/file/TomlFileParserTest.kt index 79b48087..b30c69d9 100644 --- a/ktoml-file/src/commonTest/kotlin/com/akuleshov7/ktoml/file/TomlFileParserTest.kt +++ b/ktoml-file/src/commonTest/kotlin/com/akuleshov7/ktoml/file/TomlFileParserTest.kt @@ -5,12 +5,12 @@ import com.akuleshov7.ktoml.parsers.TomlParser import com.akuleshov7.ktoml.source.useLines import com.akuleshov7.ktoml.tree.nodes.TableType import com.akuleshov7.ktoml.tree.nodes.TomlTable +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.matchers.shouldBe import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.serializer import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.assertFailsWith class TomlFileParserTest { @Serializable @@ -40,7 +40,10 @@ class TomlFileParserTest { @Test fun readParseAndDecodeFile() { - val expected = TestClass( + val parsedResult = + TomlFileReader().decodeFromFile(serializer(), "src/commonTest/resources/simple_example.toml") + + parsedResult shouldBe TestClass( "TOML \"Example\"", Owner( "Tom Preston-Werner", @@ -51,13 +54,6 @@ class TomlFileParserTest { "192.168.1.1" ) ) - assertEquals( - expected, - TomlFileReader().decodeFromFile( - serializer(), - "src/commonTest/resources/simple_example.toml" - ) - ) } // ================ @@ -84,17 +80,18 @@ class TomlFileParserTest { fun testTableDiscovery() { val file = "src/commonTest/resources/complex_toml_tables.toml" // ==== reading from file - val test = MyTableTest(A(Ab(InnerTest("Undefined")), InnerTest("Undefined")), D(InnerTest("Undefined"))) - assertEquals(test, TomlFileReader.decodeFromFile(serializer(), file)) + val parsedMyTableTest = TomlFileReader.decodeFromFile(serializer(), file) + parsedMyTableTest shouldBe MyTableTest( + A(Ab(InnerTest("Undefined")), InnerTest("Undefined")), + D(InnerTest("Undefined")) + ) // ==== checking how table discovery works val parsedResult = getFileSource(file).useLines { TomlParser(TomlInputConfig()).parseStringsToTomlTree(it, TomlInputConfig()) } - - assertEquals( - listOf("a", "a.b.c", "a.d", "d", "d.a"), - parsedResult.getRealTomlTables().map { it.fullTableKey.toString() }) + val tableNames = parsedResult.getRealTomlTables().map { it.fullTableKey.toString() } + tableNames shouldBe listOf("a", "a.b.c", "a.d", "d", "d.a") } @Serializable @@ -105,7 +102,7 @@ class TomlFileParserTest { fun regressionCastTest() { val file = "src/commonTest/resources/class_cast_regression.toml" val parsedResult = TomlFileReader.decodeFromFile(serializer(), file) - assertEquals(RegressionTest(null, 1, 2, null), parsedResult) + parsedResult shouldBe RegressionTest(null, 1, 2, null) } @ExperimentalSerializationApi @@ -113,7 +110,7 @@ class TomlFileParserTest { fun regressionPartialTest() { val file = "src/commonTest/resources/class_cast_regression.toml" val parsedResult = TomlFileReader.decodeFromFile(serializer(), file) - assertEquals(RegressionTest(null, 1, 2, null), parsedResult) + parsedResult shouldBe RegressionTest(null, 1, 2, null) } @@ -146,8 +143,21 @@ class TomlFileParserTest { @Test fun regressionInvalidIndex() { val file = "src/commonTest/resources/partial_parser_regression.toml" - assertEquals( - GeneralConfig( + val parsedGeneralConfig = TomlFileReader.partiallyDecodeFromFile(serializer(), file, "general") + parsedGeneralConfig shouldBe GeneralConfig( + execCmd = "echo hello world", + tags = listOf("Tag", "Other tag"), + description = "My description", + suiteName = "// DocsCheck", + excludedTests = null, + includedTests = null, + ignoreSaveComments = null + ) + + val parsedTestRegression = TomlFileReader.decodeFromFile(serializer(), file) + parsedTestRegression shouldBe TestRegression( + list1 = listOf(1.0, 2.0), + general = GeneralConfig( execCmd = "echo hello world", tags = listOf("Tag", "Other tag"), description = "My description", @@ -156,69 +166,41 @@ class TomlFileParserTest { includedTests = null, ignoreSaveComments = null ), - TomlFileReader.partiallyDecodeFromFile(serializer(), file, "general") - ) - assertEquals( - TestRegression( - list1 = listOf(1.0, 2.0), - general = GeneralConfig( - execCmd = "echo hello world", - tags = listOf("Tag", "Other tag"), - description = "My description", - suiteName = "// DocsCheck", - excludedTests = null, - includedTests = null, - ignoreSaveComments = null - ), - list2 = listOf(1, 3, 5), - warn = WarnConfig(list = listOf("12a", "12f")), - list3 = listOf("mystr", "2", "3") - ), - TomlFileReader.decodeFromFile(serializer(), file) + list2 = listOf(1, 3, 5), + warn = WarnConfig(list = listOf("12a", "12f")), + list3 = listOf("mystr", "2", "3") ) } @Serializable data class Table1(val a: Long, val b: Long) - @Serializable - data class Table2(val c: Long, val e: Long, val d: Long) - - @Serializable - data class TwoTomlTables(val table1: Table1, val table2: Table2) - @Test fun testPartialFileDecoding() { val file = "src/commonTest/resources/partial_decoder.toml" - val test = TwoTomlTables(Table1(1, 2), Table2(1, 2, 3)) - assertEquals( - test.table1, - TomlFileReader.partiallyDecodeFromFile( - serializer(), file, "table1" - ) - ) + val parsedResult = TomlFileReader.partiallyDecodeFromFile(serializer(), file, "table1") + parsedResult shouldBe Table1(1, 2) } @Test fun readTopLevelTables() { val file = "src/commonTest/resources/simple_example.toml" - assertEquals( - listOf("owner", "database"), - getFileSource(file).useLines { lines -> - TomlParser(TomlInputConfig()) - .parseStringsToTomlTree(lines, TomlInputConfig()) - .children - .filterIsInstance() - .filter { it.type == TableType.PRIMITIVE && !it.isSynthetic } - .map { it.fullTableKey.toString() } - } - ) + val tableNames = getFileSource(file).useLines { lines -> + TomlParser(TomlInputConfig()) + .parseStringsToTomlTree(lines, TomlInputConfig()) + .children + .filterIsInstance() + .filter { it.type == TableType.PRIMITIVE && !it.isSynthetic } + .map { it.fullTableKey.toString() } + } + + tableNames shouldBe listOf("owner", "database") } @Test fun invalidFile() { val file = "src/commonTest/resources/simple_example.wrongext" - assertFailsWith { + shouldThrow { getFileSource(file) } } diff --git a/ktoml-source/build.gradle.kts b/ktoml-source/build.gradle.kts index d01eb898..1ab1f115 100644 --- a/ktoml-source/build.gradle.kts +++ b/ktoml-source/build.gradle.kts @@ -4,6 +4,7 @@ import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest plugins { kotlin("multiplatform") kotlin("plugin.serialization") + id("io.kotest.multiplatform") id("com.akuleshov7.buildutils.publishing-configuration") } @@ -46,6 +47,7 @@ kotlin { dependencies { implementation(kotlin("test-common")) implementation(kotlin("test-annotations-common")) + implementation("io.kotest:kotest-framework-engine:${Versions.KOTEST}") } } diff --git a/ktoml-source/src/commonTest/kotlin/com/akuleshov7/ktoml/file/TomlSourceParserTest.kt b/ktoml-source/src/commonTest/kotlin/com/akuleshov7/ktoml/file/TomlSourceParserTest.kt index 58ad5f42..c7fb9ee3 100644 --- a/ktoml-source/src/commonTest/kotlin/com/akuleshov7/ktoml/file/TomlSourceParserTest.kt +++ b/ktoml-source/src/commonTest/kotlin/com/akuleshov7/ktoml/file/TomlSourceParserTest.kt @@ -1,11 +1,11 @@ package com.akuleshov7.ktoml.file import com.akuleshov7.ktoml.source.TomlSourceReader +import io.kotest.matchers.shouldBe import kotlinx.serialization.Serializable import kotlinx.serialization.serializer import okio.Buffer import kotlin.test.Test -import kotlin.test.assertEquals class TomlSourceParserTest { @Serializable @@ -35,7 +35,11 @@ class TomlSourceParserTest { @Test fun readParseAndDecodeSource() { - val expected = TestClass( + val buffer = Buffer() + buffer.writeUtf8(SIMPLE_EXAMPLE) + val parsedResult = TomlSourceReader.decodeFromSource(serializer(), buffer) + + parsedResult shouldBe TestClass( "TOML \"Example\"", Owner( "Tom Preston-Werner", @@ -46,12 +50,6 @@ class TomlSourceParserTest { "192.168.1.1" ) ) - val buffer = Buffer() - buffer.writeUtf8(SIMPLE_EXAMPLE) - assertEquals( - expected, - TomlSourceReader.decodeFromSource(serializer(), buffer) - ) } companion object { diff --git a/ktoml-source/src/jvmTest/kotlin/com/akuleshov7/ktoml/source/StreamTests.kt b/ktoml-source/src/jvmTest/kotlin/com/akuleshov7/ktoml/source/StreamTests.kt index 2aa4abb2..6cf5f66e 100644 --- a/ktoml-source/src/jvmTest/kotlin/com/akuleshov7/ktoml/source/StreamTests.kt +++ b/ktoml-source/src/jvmTest/kotlin/com/akuleshov7/ktoml/source/StreamTests.kt @@ -5,20 +5,22 @@ import com.akuleshov7.ktoml.TomlInputConfig import com.akuleshov7.ktoml.parsers.TomlParser import com.akuleshov7.ktoml.tree.nodes.TableType import com.akuleshov7.ktoml.tree.nodes.TomlTable +import io.kotest.matchers.shouldBe import okio.source import org.junit.jupiter.api.Test import java.io.InputStream -import kotlin.test.assertEquals import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable class StreamTests { @Test fun readParseAndDecodeStream() { - val expected = TestClass( + val parsedResult = Toml.decodeFromStream(getTestDataStream("simple_example.toml")) + + parsedResult shouldBe TestClass( "TOML \"Example\"", Owner( "Tom Preston-Werner", @@ -29,52 +31,64 @@ class StreamTests { "192.168.1.1" ) ) - assertEquals( - expected, - Toml.decodeFromStream(getTestDataStream("simple_example.toml")) - ) } @Test @ExperimentalSerializationApi fun testTableDiscovery() { // ==== reading from stream - val test = MyTableTest( + val parsedMyTableTest = Toml.decodeFromStream(getTestDataStream("complex_toml_tables.toml")) + parsedMyTableTest shouldBe MyTableTest( A(Ab(InnerTest("Undefined")), InnerTest("Undefined")), D(InnerTest("Undefined")) ) - assertEquals(test, Toml.decodeFromStream(getTestDataStream("complex_toml_tables.toml"))) // ==== checking how table discovery works val parsedResult = - getTestDataStream("complex_toml_tables.toml").source().useLines { lines -> - TomlParser(TomlInputConfig()).parseStringsToTomlTree(lines, TomlInputConfig()) - } - assertEquals( - listOf("a", "a.b.c", "a.d", "d", "d.a"), - parsedResult.getRealTomlTables().map { it.fullTableName }) + getTestDataStream("complex_toml_tables.toml").source().useLines { lines -> + TomlParser(TomlInputConfig()).parseStringsToTomlTree(lines, TomlInputConfig()) + } + val tableNames = parsedResult.getRealTomlTables().map { it.fullTableKey.toString() } + tableNames shouldBe listOf("a", "a.b.c", "a.d", "d", "d.a") } @ExperimentalSerializationApi @Test fun regressionCast2Test() { val parsedResult = - Toml.decodeFromStream(getTestDataStream("class_cast_regression2.toml")) - assertEquals(RegressionTest(null, 1, 2, null), parsedResult) + Toml.decodeFromStream(getTestDataStream("class_cast_regression2.toml")) + parsedResult shouldBe RegressionTest(null, 1, 2, null) } @ExperimentalSerializationApi @Test fun regressionPartialTest() { val parsedResult = - Toml.decodeFromStream(getTestDataStream("class_cast_regression2.toml")) - assertEquals(RegressionTest(null, 1, 2, null), parsedResult) + Toml.decodeFromStream(getTestDataStream("class_cast_regression2.toml")) + parsedResult shouldBe RegressionTest(null, 1, 2, null) } @ExperimentalSerializationApi @Test fun regressionInvalidIndex() { - assertEquals( - GeneralConfig( + val parsedGeneralConfig = Toml.partiallyDecodeFromStream( + getTestDataStream("partial_parser_regression.toml"), + "general" + ) + parsedGeneralConfig shouldBe GeneralConfig( + execCmd = "echo hello world", + tags = listOf("Tag", "Other tag"), + description = "My description", + suiteName = "// DocsCheck", + excludedTests = null, + includedTests = null, + ignoreSaveComments = null + ) + + val parsedTestRegression = + Toml.decodeFromStream(getTestDataStream("partial_parser_regression.toml")) + parsedTestRegression shouldBe TestRegression( + list1 = listOf(1.0, 2.0), + general = GeneralConfig( execCmd = "echo hello world", tags = listOf("Tag", "Other tag"), description = "My description", @@ -83,59 +97,38 @@ class StreamTests { includedTests = null, ignoreSaveComments = null ), - Toml.partiallyDecodeFromStream( - getTestDataStream("partial_parser_regression.toml"), - "general" - ) - ) - assertEquals( - TestRegression( - list1 = listOf(1.0, 2.0), - general = GeneralConfig( - execCmd = "echo hello world", - tags = listOf("Tag", "Other tag"), - description = "My description", - suiteName = "// DocsCheck", - excludedTests = null, - includedTests = null, - ignoreSaveComments = null - ), - list2 = listOf(1, 3, 5), - warn = WarnConfig(list = listOf("12a", "12f")), - list3 = listOf("mystr", "2", "3") - ), - Toml.decodeFromStream(getTestDataStream("partial_parser_regression.toml")) + list2 = listOf(1, 3, 5), + warn = WarnConfig(list = listOf("12a", "12f")), + list3 = listOf("mystr", "2", "3") ) } @Test fun testPartialFileDecoding() { - val test = TwoTomlTables(Table1(1, 2), Table2(1, 2, 3)) - assertEquals( - test.table1, - Toml.partiallyDecodeFromStream( - getTestDataStream("partial_decoder.toml"), - "table1" - ) + val parsedResult = Toml.partiallyDecodeFromStream( + getTestDataStream("partial_decoder.toml"), + "table1" ) + + parsedResult shouldBe Table1(1, 2) } @Test fun readTopLevelTables() { - assertEquals( - listOf("owner", "database"), - getTestDataStream("simple_example.toml").source().useLines { lines -> - TomlParser(TomlInputConfig()) - .parseStringsToTomlTree(lines, TomlInputConfig()) - .children - .filterIsInstance() - .filter { it.type == TableType.PRIMITIVE && !it.isSynthetic } - .map { it.fullTableName } - } - ) + val tableNames = getTestDataStream("simple_example.toml").source().useLines { lines -> + TomlParser(TomlInputConfig()) + .parseStringsToTomlTree(lines, TomlInputConfig()) + .children + .filterIsInstance() + .filter { it.type == TableType.PRIMITIVE && !it.isSynthetic } + .map { it.fullTableKey.toString() } + } + + tableNames shouldBe listOf("owner", "database") } - private fun getTestDataStream(name: String): InputStream = requireNotNull(StreamTests::class.java.getResourceAsStream(name)) + private fun getTestDataStream(name: String): InputStream = + requireNotNull(StreamTests::class.java.getResourceAsStream(name)) /** * @property title @@ -279,23 +272,4 @@ class StreamTests { */ @Serializable data class Table1(val a: Long, val b: Long) - - /** - * @property c - * @property e - * @property d - */ - @Serializable - data class Table2( - val c: Long, - val e: Long, - val d: Long - ) - - /** - * @property table1 - * @property table2 - */ - @Serializable - data class TwoTomlTables(val table1: Table1, val table2: Table2) }