From 102cdda95a89ff051e456c11a3bc8325981d59d4 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Thu, 20 Jun 2024 22:49:24 +0200 Subject: [PATCH] introduce tuple factories; check in tests same instance ... instead of using toEqual. We want to be sure the functions don't modify the data --- .../code-generation.generate.gradle.kts | 144 +++++++---- .../kotlin/ch/tutteli/kbox/tupleFactory.kt | 131 ++++++++++ .../ch/tutteli/kbox/TupleFactoryTest.kt | 158 ++++++++++++ .../ch/tutteli/kbox/append/PairAppendTest.kt | 154 ++++++++--- .../tutteli/kbox/append/TripleAppendTest.kt | 138 +++++++--- .../tutteli/kbox/append/Tuple4AppendTest.kt | 120 +++++++-- .../tutteli/kbox/append/Tuple5AppendTest.kt | 100 +++++-- .../tutteli/kbox/append/Tuple6AppendTest.kt | 78 ++++-- .../tutteli/kbox/append/Tuple7AppendTest.kt | 54 +++- .../tutteli/kbox/append/Tuple8AppendTest.kt | 28 +- .../ch/tutteli/kbox/glue/PairGlueTest.kt | 138 +++++++--- .../ch/tutteli/kbox/glue/TripleGlueTest.kt | 120 +++++++-- .../ch/tutteli/kbox/glue/Tuple4GlueTest.kt | 100 +++++-- .../ch/tutteli/kbox/glue/Tuple5GlueTest.kt | 78 ++++-- .../ch/tutteli/kbox/glue/Tuple6GlueTest.kt | 54 +++- .../ch/tutteli/kbox/glue/Tuple7GlueTest.kt | 28 +- .../kotlin/ch/tutteli/kbox/map/PairMapTest.kt | 26 +- .../ch/tutteli/kbox/map/TripleMapTest.kt | 45 +++- .../ch/tutteli/kbox/map/Tuple4MapTest.kt | 68 +++-- .../ch/tutteli/kbox/map/Tuple5MapTest.kt | 95 +++++-- .../ch/tutteli/kbox/map/Tuple6MapTest.kt | 126 +++++++-- .../ch/tutteli/kbox/map/Tuple7MapTest.kt | 161 ++++++++++-- .../ch/tutteli/kbox/map/Tuple8MapTest.kt | 200 +++++++++++--- .../ch/tutteli/kbox/map/Tuple9MapTest.kt | 243 +++++++++++++++--- .../kbox/toTuple/Tuple2LikeToTupleTest.kt | 19 +- .../kbox/toTuple/Tuple3LikeToTupleTest.kt | 24 +- .../kbox/toTuple/Tuple4LikeToTupleTest.kt | 29 ++- .../kbox/toTuple/Tuple5LikeToTupleTest.kt | 34 ++- .../kbox/toTuple/Tuple6LikeToTupleTest.kt | 39 +-- .../kbox/toTuple/Tuple7LikeToTupleTest.kt | 44 ++-- .../kbox/toTuple/Tuple8LikeToTupleTest.kt | 49 ++-- .../kbox/toTuple/Tuple9LikeToTupleTest.kt | 54 ++-- 32 files changed, 2295 insertions(+), 584 deletions(-) create mode 100644 src/commonMain/generated/kotlin/ch/tutteli/kbox/tupleFactory.kt create mode 100644 src/commonTest/generated/kotlin/ch/tutteli/kbox/TupleFactoryTest.kt diff --git a/gradle/code-generation/src/main/kotlin/code-generation.generate.gradle.kts b/gradle/code-generation/src/main/kotlin/code-generation.generate.gradle.kts index 13d1a36..178d71e 100644 --- a/gradle/code-generation/src/main/kotlin/code-generation.generate.gradle.kts +++ b/gradle/code-generation/src/main/kotlin/code-generation.generate.gradle.kts @@ -48,13 +48,20 @@ val generate: TaskProvider = tasks.register("generate") { val map = createStringBuilder(packageName) + val tupleFactory = StringBuilder(dontModifyNotice) + .append("@file:Suppress(\"MethodOverloading\", \"FunctionName\")\n") + .append("package ").append(packageName).append("\n\n") + + (2..numOfArgs).forEach { upperNumber -> val numbers = (1..upperNumber).toList() val typeArgs = numbers.joinToString(", ") { "A$it" } val constructorProperties = numbers.joinToString(",\n ") { "val a$it: A$it" } + val parameters = numbers.joinToString(", ") { "a$it: A$it" } + val arguments = numbers.joinToString(", ") { "a$it" } val tupleName = getTupleName(upperNumber) - val tuple = createStringBuilder(packageName) val tupleLike = createStringBuilder(packageName) + val tuple = createStringBuilder(packageName) tupleLike.append( """ @@ -121,6 +128,24 @@ val generate: TaskProvider = tasks.register("generate") { tupleFile.writeText(tuple.toString()) } + tupleFactory.append( + """ + |/** + | * Factory method to create a [$tupleName]. + | * + | * Alternative to `$tupleName(...)` with the advantage that you can add remove + | * arguments without the need to change function name. + | * + | * @return the newly created [$tupleName] + | * + | * @since 2.1.0 + | */${if (upperNumber >= 6) "\n@Suppress(\"LongParameterList\")" else ""} + |fun <$typeArgs> Tuple( + | $parameters + |): $tupleName<$typeArgs> = + | $tupleName($arguments) + """.trimMargin() + ).appendLine().appendLine() (1..numOfArgs - upperNumber).forEach { upperNumber2 -> @@ -215,6 +240,9 @@ val generate: TaskProvider = tasks.register("generate") { val mapFile = packageDir.resolve("tupleMap.kt") mapFile.writeText(map.toString()) + + val tupleFactoryFile = packageDir.resolve("tupleFactory.kt") + tupleFactoryFile.writeText(tupleFactory.toString()) } } generationFolder.builtBy(generate) @@ -234,7 +262,7 @@ fun StringBuilder.appendTest(testName: String) = this.append( val generateTest: TaskProvider = tasks.register("generateTest") { doFirst { val packageDir = File(generationTestFolder.asPath + "/" + packageNameAsPath) - val argValues = sequenceOf( + val argValuesNotMapped = sequenceOf( "\"string\"", "1", "2L", @@ -245,15 +273,31 @@ val generateTest: TaskProvider = tasks.register("generateTest") { "2.toByte()", "listOf(1, 2)", ) + val argValues = argValuesNotMapped.map { "listOf($it)" } + val argsTypeParameters = sequenceOf( "String", "Int", "Long", "Float", "Double", "Char", "Short", "Byte", "List" - ) + ).map { "List<$it>" } + + val factoryTest = createStringBuilder("$packageName") + .appendTest("TupleFactoryTest") (2..numOfArgs).forEach { upperNumber -> val numbers = (1..upperNumber) - val typeArgs = argsTypeParameters.take(upperNumber).joinToString(", ") + fun typeArgs(num: Int) = argsTypeParameters.take(num).joinToString(", ") + val typeArgs = typeArgs(upperNumber) val tupleName = getTupleName(upperNumber) - val tupleCreation = """$tupleName(${argValues.take(upperNumber).joinToString(", ")})""" + + fun vals(num: Int) = argValues.take(num).withIndex().joinToString("\n ") { (index, value) -> + "val a${index + 1} = $value" + } + val vals = vals(upperNumber) + + val valsAsArgs = numbers.joinToString(", ") { "a$it" } + val tupleCreation = """$tupleName($valsAsArgs)""" + fun sameFeatureCheck(num: Int, indent: String) = (1..num).joinToString("\n$indent") { + "feature { f(it::${getArgName(num, it)}) }.toBeTheInstance(a${it})" + } val mapTest = createStringBuilder("$packageName.map") .appendTest("${tupleName}MapTest") @@ -267,6 +311,19 @@ val generateTest: TaskProvider = tasks.register("generateTest") { val glueTest = createStringBuilder("$packageName.glue") .appendTest("${tupleName}GlueTest") + factoryTest.append( + """ + | @Test + | fun factory_for_$tupleName() { + | ${vals(upperNumber)} + | expect(Tuple($valsAsArgs)) + | .toBeAnInstanceOf<$tupleName<${typeArgs}>> { + | ${sameFeatureCheck(upperNumber, " ")} + | } + | } + """.trimMargin() + ).appendLine().appendLine() + numbers.forEach { argNum -> val argNameToMap = getArgName(upperNumber, argNum) val argNameCapitalized = argNameToMap.replaceFirstChar { @@ -274,42 +331,40 @@ val generateTest: TaskProvider = tasks.register("generateTest") { } listOf(1, 2, 3).withIndex() - val vals = argValues.take(upperNumber).withIndex().joinToString("\n ") { (index, value) -> - "val a${index + 1} = listOf($value)" - } - val tupleListCreation = - """$tupleName(${numbers.joinToString(", ") { "a$it" }})""" - val tupleListResult = """$tupleName(${ - argValues.take(upperNumber).withIndex().joinToString(", ") { (index, value) -> + val tupleListResult = "$tupleName(${ + argValuesNotMapped.take(upperNumber).withIndex().joinToString(", ") { (index, value) -> if (index + 1 == argNum) value else "a${index + 1}" } - })""" - val checkInstances = numbers.filter { it != argNum }.joinToString("\n ") { - """ - |feature { f(it::${getArgName(upperNumber, it)}) }.toBeTheInstance(a${it}) - """.trimMargin() - } + })" + mapTest.append( """ | @Test | fun map${argNameCapitalized}__identity__returns_equal_$tupleName() { + | $vals + | | expect( | $tupleCreation | .map${argNameCapitalized}(::identity) - | ).toEqual( - | $tupleCreation - | ) + | ) { + | ${sameFeatureCheck(upperNumber, " ")} + | } | } | | @Test | fun map${argNameCapitalized}__transformation_does_not_touch_other_properties() { | $vals + | | expect( - | $tupleListCreation + | $tupleCreation | .map${argNameCapitalized} { it.first() } | ) { | toEqual($tupleListResult) - | $checkInstances + | ${ + numbers.filter { it != argNum }.joinToString("\n ") { + "feature { f(it::${getArgName(upperNumber, it)}) }.toBeTheInstance(a${it})" + } + } | } | } """.trimMargin() @@ -320,16 +375,12 @@ val generateTest: TaskProvider = tasks.register("generateTest") { """ | @Test | fun toTuple__returns_${tupleName}_in_correct_order() { - | val dataClass = Dummy$upperNumber(${argValues.take(upperNumber).joinToString(", ")}) - | expect(dataClass.toTuple()).toBeAnInstanceOf<$tupleName<$typeArgs>> { - | ${ - numbers.joinToString("\n ") { - "feature { f(it::component$it) }.toEqual(${ - argValues.drop(it - 1).first() - })" - } - } - | } + | $vals + | val dataClass = Dummy$upperNumber($valsAsArgs) + | + | expect(dataClass.toTuple()).toBeAnInstanceOf<$tupleName<$typeArgs>> { + | ${sameFeatureCheck(upperNumber, " ")} + | } | } | """.trimMargin() @@ -338,19 +389,20 @@ val generateTest: TaskProvider = tasks.register("generateTest") { (1..numOfArgs - upperNumber).forEach { upperNumber2 -> val upperNumber3 = upperNumber + upperNumber2 val toTupleName = getTupleName(upperNumber3) - - val toTupleNameCreation = """$toTupleName(${argValues.take(upperNumber3).joinToString(", ")})""" + val vals3AsArgs = (upperNumber + 1..upperNumber3).joinToString(", ") { "a$it" } appendTest.append( """ | @Test | fun append_${upperNumber2}_values__results_in_a_$toTupleName() { + | ${vals(upperNumber3)} + | | expect( | $tupleCreation - | .append(${argValues.drop(upperNumber).take(upperNumber2).joinToString(", ")}) - | ).toEqual( - | $toTupleNameCreation - | ) + | .append($vals3AsArgs) + | ).toBeAnInstanceOf<$toTupleName<${typeArgs(upperNumber3)}>> { + | ${sameFeatureCheck(upperNumber3, " ")} + | } | } """.trimMargin() ).appendLine().appendLine() @@ -358,18 +410,20 @@ val generateTest: TaskProvider = tasks.register("generateTest") { if (upperNumber2 > 1) { val tupleNameParam = getTupleName(upperNumber2) val tupleNameParamCreation = - """$tupleNameParam(${argValues.drop(upperNumber).take(upperNumber2).joinToString(", ")})""" + """$tupleNameParam($vals3AsArgs)""" glueTest.append( """ | @Test | fun glue_${tupleNameParam}__results_in_a_$toTupleName() { + | ${vals(upperNumber3)} + | | expect( | $tupleCreation | .glue($tupleNameParamCreation) - | ).toEqual( - | $toTupleNameCreation - | ) + | ).toBeAnInstanceOf<$toTupleName<${typeArgs(upperNumber3)}>> { + | ${sameFeatureCheck(upperNumber3, " ")} + | } | } """.trimMargin() ).appendLine().appendLine() @@ -413,6 +467,10 @@ val generateTest: TaskProvider = tasks.register("generateTest") { glueTestFile.writeText(glueTest.toString()) } } + + factoryTest.append("}") + val factoryTestFile = packageDir.resolve("TupleFactoryTest.kt") + factoryTestFile.writeText(factoryTest.toString()) } } generationTestFolder.builtBy(generateTest) diff --git a/src/commonMain/generated/kotlin/ch/tutteli/kbox/tupleFactory.kt b/src/commonMain/generated/kotlin/ch/tutteli/kbox/tupleFactory.kt new file mode 100644 index 0000000..1fab76c --- /dev/null +++ b/src/commonMain/generated/kotlin/ch/tutteli/kbox/tupleFactory.kt @@ -0,0 +1,131 @@ +// -------------------------------------------------------------------------------------------------------------------- +// automatically generated, don't modify here but in: +// gradle/code-generation/src/main/kotlin/code-generation.generate.gradle.kts +// -------------------------------------------------------------------------------------------------------------------- +@file:Suppress("MethodOverloading", "FunctionName") +package ch.tutteli.kbox + +/** + * Factory method to create a [Pair]. + * + * Alternative to `Pair(...)` with the advantage that you can add remove + * arguments without the need to change function name. + * + * @return the newly created [Pair] + * + * @since 2.1.0 + */ +fun Tuple( + a1: A1, a2: A2 +): Pair = + Pair(a1, a2) + +/** + * Factory method to create a [Triple]. + * + * Alternative to `Triple(...)` with the advantage that you can add remove + * arguments without the need to change function name. + * + * @return the newly created [Triple] + * + * @since 2.1.0 + */ +fun Tuple( + a1: A1, a2: A2, a3: A3 +): Triple = + Triple(a1, a2, a3) + +/** + * Factory method to create a [Tuple4]. + * + * Alternative to `Tuple4(...)` with the advantage that you can add remove + * arguments without the need to change function name. + * + * @return the newly created [Tuple4] + * + * @since 2.1.0 + */ +fun Tuple( + a1: A1, a2: A2, a3: A3, a4: A4 +): Tuple4 = + Tuple4(a1, a2, a3, a4) + +/** + * Factory method to create a [Tuple5]. + * + * Alternative to `Tuple5(...)` with the advantage that you can add remove + * arguments without the need to change function name. + * + * @return the newly created [Tuple5] + * + * @since 2.1.0 + */ +fun Tuple( + a1: A1, a2: A2, a3: A3, a4: A4, a5: A5 +): Tuple5 = + Tuple5(a1, a2, a3, a4, a5) + +/** + * Factory method to create a [Tuple6]. + * + * Alternative to `Tuple6(...)` with the advantage that you can add remove + * arguments without the need to change function name. + * + * @return the newly created [Tuple6] + * + * @since 2.1.0 + */ +@Suppress("LongParameterList") +fun Tuple( + a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6 +): Tuple6 = + Tuple6(a1, a2, a3, a4, a5, a6) + +/** + * Factory method to create a [Tuple7]. + * + * Alternative to `Tuple7(...)` with the advantage that you can add remove + * arguments without the need to change function name. + * + * @return the newly created [Tuple7] + * + * @since 2.1.0 + */ +@Suppress("LongParameterList") +fun Tuple( + a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7 +): Tuple7 = + Tuple7(a1, a2, a3, a4, a5, a6, a7) + +/** + * Factory method to create a [Tuple8]. + * + * Alternative to `Tuple8(...)` with the advantage that you can add remove + * arguments without the need to change function name. + * + * @return the newly created [Tuple8] + * + * @since 2.1.0 + */ +@Suppress("LongParameterList") +fun Tuple( + a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8 +): Tuple8 = + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) + +/** + * Factory method to create a [Tuple9]. + * + * Alternative to `Tuple9(...)` with the advantage that you can add remove + * arguments without the need to change function name. + * + * @return the newly created [Tuple9] + * + * @since 2.1.0 + */ +@Suppress("LongParameterList") +fun Tuple( + a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8, a9: A9 +): Tuple9 = + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) + diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/TupleFactoryTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/TupleFactoryTest.kt new file mode 100644 index 0000000..089a851 --- /dev/null +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/TupleFactoryTest.kt @@ -0,0 +1,158 @@ +// -------------------------------------------------------------------------------------------------------------------- +// automatically generated, don't modify here but in: +// gradle/code-generation/src/main/kotlin/code-generation.generate.gradle.kts +// -------------------------------------------------------------------------------------------------------------------- +package ch.tutteli.kbox + +import ch.tutteli.atrium.api.fluent.en_GB.* +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.kbox.* +import kotlin.test.Test + +class TupleFactoryTest { + + @Test + fun factory_for_Pair() { + val a1 = listOf("string") + val a2 = listOf(1) + expect(Tuple(a1, a2)) + .toBeAnInstanceOf, List>> { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + } + } + + @Test + fun factory_for_Triple() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + expect(Tuple(a1, a2, a3)) + .toBeAnInstanceOf, List, List>> { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + feature { f(it::third) }.toBeTheInstance(a3) + } + } + + @Test + fun factory_for_Tuple4() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + expect(Tuple(a1, a2, a3, a4)) + .toBeAnInstanceOf, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } + } + + @Test + fun factory_for_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect(Tuple(a1, a2, a3, a4, a5)) + .toBeAnInstanceOf, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } + } + + @Test + fun factory_for_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect(Tuple(a1, a2, a3, a4, a5, a6)) + .toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } + } + + @Test + fun factory_for_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect(Tuple(a1, a2, a3, a4, a5, a6, a7)) + .toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } + } + + @Test + fun factory_for_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect(Tuple(a1, a2, a3, a4, a5, a6, a7, a8)) + .toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } + } + + @Test + fun factory_for_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect(Tuple(a1, a2, a3, a4, a5, a6, a7, a8, a9)) + .toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } + } + +} \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/PairAppendTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/PairAppendTest.kt index d9cb067..6fa8489 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/PairAppendTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/PairAppendTest.kt @@ -13,72 +13,156 @@ class PairAppendTest { @Test fun append_1_values__results_in_a_Triple() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + expect( - Pair("string", 1) - .append(2L) - ).toEqual( - Triple("string", 1, 2L) - ) + Pair(a1, a2) + .append(a3) + ).toBeAnInstanceOf, List, List>> { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + feature { f(it::third) }.toBeTheInstance(a3) + } } @Test fun append_2_values__results_in_a_Tuple4() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + expect( - Pair("string", 1) - .append(2L, 3F) - ).toEqual( - Tuple4("string", 1, 2L, 3F) - ) + Pair(a1, a2) + .append(a3, a4) + ).toBeAnInstanceOf, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } } @Test fun append_3_values__results_in_a_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Pair("string", 1) - .append(2L, 3F, 4.0) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + Pair(a1, a2) + .append(a3, a4, a5) + ).toBeAnInstanceOf, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test fun append_4_values__results_in_a_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Pair("string", 1) - .append(2L, 3F, 4.0, 'c') - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + Pair(a1, a2) + .append(a3, a4, a5, a6) + ).toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test fun append_5_values__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Pair("string", 1) - .append(2L, 3F, 4.0, 'c', 1.toShort()) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Pair(a1, a2) + .append(a3, a4, a5, a6, a7) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun append_6_values__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Pair("string", 1) - .append(2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Pair(a1, a2) + .append(a3, a4, a5, a6, a7, a8) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun append_7_values__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Pair("string", 1) - .append(2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Pair(a1, a2) + .append(a3, a4, a5, a6, a7, a8, a9) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/TripleAppendTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/TripleAppendTest.kt index 093a426..0fa8170 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/TripleAppendTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/TripleAppendTest.kt @@ -13,62 +13,140 @@ class TripleAppendTest { @Test fun append_1_values__results_in_a_Tuple4() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + expect( - Triple("string", 1, 2L) - .append(3F) - ).toEqual( - Tuple4("string", 1, 2L, 3F) - ) + Triple(a1, a2, a3) + .append(a4) + ).toBeAnInstanceOf, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } } @Test fun append_2_values__results_in_a_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Triple("string", 1, 2L) - .append(3F, 4.0) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + Triple(a1, a2, a3) + .append(a4, a5) + ).toBeAnInstanceOf, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test fun append_3_values__results_in_a_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Triple("string", 1, 2L) - .append(3F, 4.0, 'c') - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + Triple(a1, a2, a3) + .append(a4, a5, a6) + ).toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test fun append_4_values__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Triple("string", 1, 2L) - .append(3F, 4.0, 'c', 1.toShort()) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Triple(a1, a2, a3) + .append(a4, a5, a6, a7) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun append_5_values__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Triple("string", 1, 2L) - .append(3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Triple(a1, a2, a3) + .append(a4, a5, a6, a7, a8) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun append_6_values__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Triple("string", 1, 2L) - .append(3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Triple(a1, a2, a3) + .append(a4, a5, a6, a7, a8, a9) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple4AppendTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple4AppendTest.kt index 31c862d..19e8028 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple4AppendTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple4AppendTest.kt @@ -13,52 +13,122 @@ class Tuple4AppendTest { @Test fun append_1_values__results_in_a_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Tuple4("string", 1, 2L, 3F) - .append(4.0) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + Tuple4(a1, a2, a3, a4) + .append(a5) + ).toBeAnInstanceOf, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test fun append_2_values__results_in_a_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple4("string", 1, 2L, 3F) - .append(4.0, 'c') - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + Tuple4(a1, a2, a3, a4) + .append(a5, a6) + ).toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test fun append_3_values__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple4("string", 1, 2L, 3F) - .append(4.0, 'c', 1.toShort()) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Tuple4(a1, a2, a3, a4) + .append(a5, a6, a7) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun append_4_values__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple4("string", 1, 2L, 3F) - .append(4.0, 'c', 1.toShort(), 2.toByte()) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Tuple4(a1, a2, a3, a4) + .append(a5, a6, a7, a8) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun append_5_values__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple4("string", 1, 2L, 3F) - .append(4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple4(a1, a2, a3, a4) + .append(a5, a6, a7, a8, a9) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple5AppendTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple5AppendTest.kt index 26cf803..6671fda 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple5AppendTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple5AppendTest.kt @@ -13,42 +13,102 @@ class Tuple5AppendTest { @Test fun append_1_values__results_in_a_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple5("string", 1, 2L, 3F, 4.0) - .append('c') - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + Tuple5(a1, a2, a3, a4, a5) + .append(a6) + ).toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test fun append_2_values__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) - .append('c', 1.toShort()) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Tuple5(a1, a2, a3, a4, a5) + .append(a6, a7) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun append_3_values__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) - .append('c', 1.toShort(), 2.toByte()) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Tuple5(a1, a2, a3, a4, a5) + .append(a6, a7, a8) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun append_4_values__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) - .append('c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple5(a1, a2, a3, a4, a5) + .append(a6, a7, a8, a9) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple6AppendTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple6AppendTest.kt index a146967..68e0d6e 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple6AppendTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple6AppendTest.kt @@ -13,32 +13,80 @@ class Tuple6AppendTest { @Test fun append_1_values__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - .append(1.toShort()) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Tuple6(a1, a2, a3, a4, a5, a6) + .append(a7) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun append_2_values__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - .append(1.toShort(), 2.toByte()) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Tuple6(a1, a2, a3, a4, a5, a6) + .append(a7, a8) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun append_3_values__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - .append(1.toShort(), 2.toByte(), listOf(1, 2)) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple6(a1, a2, a3, a4, a5, a6) + .append(a7, a8, a9) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple7AppendTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple7AppendTest.kt index 6046dc4..8a9ea33 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple7AppendTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple7AppendTest.kt @@ -13,22 +13,56 @@ class Tuple7AppendTest { @Test fun append_1_values__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - .append(2.toByte()) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Tuple7(a1, a2, a3, a4, a5, a6, a7) + .append(a8) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun append_2_values__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - .append(2.toByte(), listOf(1, 2)) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple7(a1, a2, a3, a4, a5, a6, a7) + .append(a8, a9) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple8AppendTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple8AppendTest.kt index 6c9695f..b592098 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple8AppendTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/append/Tuple8AppendTest.kt @@ -13,12 +13,30 @@ class Tuple8AppendTest { @Test fun append_1_values__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - .append(listOf(1, 2)) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) + .append(a9) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/PairGlueTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/PairGlueTest.kt index 4131616..12c18c1 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/PairGlueTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/PairGlueTest.kt @@ -13,62 +13,140 @@ class PairGlueTest { @Test fun glue_Pair__results_in_a_Tuple4() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + expect( - Pair("string", 1) - .glue(Pair(2L, 3F)) - ).toEqual( - Tuple4("string", 1, 2L, 3F) - ) + Pair(a1, a2) + .glue(Pair(a3, a4)) + ).toBeAnInstanceOf, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } } @Test fun glue_Triple__results_in_a_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Pair("string", 1) - .glue(Triple(2L, 3F, 4.0)) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + Pair(a1, a2) + .glue(Triple(a3, a4, a5)) + ).toBeAnInstanceOf, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test fun glue_Tuple4__results_in_a_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Pair("string", 1) - .glue(Tuple4(2L, 3F, 4.0, 'c')) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + Pair(a1, a2) + .glue(Tuple4(a3, a4, a5, a6)) + ).toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test fun glue_Tuple5__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Pair("string", 1) - .glue(Tuple5(2L, 3F, 4.0, 'c', 1.toShort())) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Pair(a1, a2) + .glue(Tuple5(a3, a4, a5, a6, a7)) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun glue_Tuple6__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Pair("string", 1) - .glue(Tuple6(2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte())) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Pair(a1, a2) + .glue(Tuple6(a3, a4, a5, a6, a7, a8)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun glue_Tuple7__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Pair("string", 1) - .glue(Tuple7(2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2))) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Pair(a1, a2) + .glue(Tuple7(a3, a4, a5, a6, a7, a8, a9)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/TripleGlueTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/TripleGlueTest.kt index fd73b47..8d21dcd 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/TripleGlueTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/TripleGlueTest.kt @@ -13,52 +13,122 @@ class TripleGlueTest { @Test fun glue_Pair__results_in_a_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Triple("string", 1, 2L) - .glue(Pair(3F, 4.0)) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + Triple(a1, a2, a3) + .glue(Pair(a4, a5)) + ).toBeAnInstanceOf, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test fun glue_Triple__results_in_a_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Triple("string", 1, 2L) - .glue(Triple(3F, 4.0, 'c')) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + Triple(a1, a2, a3) + .glue(Triple(a4, a5, a6)) + ).toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test fun glue_Tuple4__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Triple("string", 1, 2L) - .glue(Tuple4(3F, 4.0, 'c', 1.toShort())) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Triple(a1, a2, a3) + .glue(Tuple4(a4, a5, a6, a7)) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun glue_Tuple5__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Triple("string", 1, 2L) - .glue(Tuple5(3F, 4.0, 'c', 1.toShort(), 2.toByte())) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Triple(a1, a2, a3) + .glue(Tuple5(a4, a5, a6, a7, a8)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun glue_Tuple6__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Triple("string", 1, 2L) - .glue(Tuple6(3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2))) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Triple(a1, a2, a3) + .glue(Tuple6(a4, a5, a6, a7, a8, a9)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple4GlueTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple4GlueTest.kt index 36cb649..0f800ad 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple4GlueTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple4GlueTest.kt @@ -13,42 +13,102 @@ class Tuple4GlueTest { @Test fun glue_Pair__results_in_a_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple4("string", 1, 2L, 3F) - .glue(Pair(4.0, 'c')) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + Tuple4(a1, a2, a3, a4) + .glue(Pair(a5, a6)) + ).toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test fun glue_Triple__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple4("string", 1, 2L, 3F) - .glue(Triple(4.0, 'c', 1.toShort())) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Tuple4(a1, a2, a3, a4) + .glue(Triple(a5, a6, a7)) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun glue_Tuple4__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple4("string", 1, 2L, 3F) - .glue(Tuple4(4.0, 'c', 1.toShort(), 2.toByte())) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Tuple4(a1, a2, a3, a4) + .glue(Tuple4(a5, a6, a7, a8)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun glue_Tuple5__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple4("string", 1, 2L, 3F) - .glue(Tuple5(4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2))) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple4(a1, a2, a3, a4) + .glue(Tuple5(a5, a6, a7, a8, a9)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple5GlueTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple5GlueTest.kt index 7f4b6ba..4b55b59 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple5GlueTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple5GlueTest.kt @@ -13,32 +13,80 @@ class Tuple5GlueTest { @Test fun glue_Pair__results_in_a_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) - .glue(Pair('c', 1.toShort())) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + Tuple5(a1, a2, a3, a4, a5) + .glue(Pair(a6, a7)) + ).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test fun glue_Triple__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) - .glue(Triple('c', 1.toShort(), 2.toByte())) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Tuple5(a1, a2, a3, a4, a5) + .glue(Triple(a6, a7, a8)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun glue_Tuple4__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) - .glue(Tuple4('c', 1.toShort(), 2.toByte(), listOf(1, 2))) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple5(a1, a2, a3, a4, a5) + .glue(Tuple4(a6, a7, a8, a9)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple6GlueTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple6GlueTest.kt index 6a7dc26..4156bb5 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple6GlueTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple6GlueTest.kt @@ -13,22 +13,56 @@ class Tuple6GlueTest { @Test fun glue_Pair__results_in_a_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - .glue(Pair(1.toShort(), 2.toByte())) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + Tuple6(a1, a2, a3, a4, a5, a6) + .glue(Pair(a7, a8)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test fun glue_Triple__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - .glue(Triple(1.toShort(), 2.toByte(), listOf(1, 2))) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple6(a1, a2, a3, a4, a5, a6) + .glue(Triple(a7, a8, a9)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple7GlueTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple7GlueTest.kt index 5fc09d2..53d09e6 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple7GlueTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/glue/Tuple7GlueTest.kt @@ -13,12 +13,30 @@ class Tuple7GlueTest { @Test fun glue_Pair__results_in_a_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - .glue(Pair(2.toByte(), listOf(1, 2))) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + Tuple7(a1, a2, a3, a4, a5, a6, a7) + .glue(Pair(a8, a9)) + ).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/PairMapTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/PairMapTest.kt index c10abd1..5738f11 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/PairMapTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/PairMapTest.kt @@ -13,18 +13,23 @@ class PairMapTest { @Test fun mapFirst__identity__returns_equal_Pair() { + val a1 = listOf("string") + val a2 = listOf(1) + expect( - Pair("string", 1) + Pair(a1, a2) .mapFirst(::identity) - ).toEqual( - Pair("string", 1) - ) + ) { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + } } @Test fun mapFirst__transformation_does_not_touch_other_properties() { val a1 = listOf("string") val a2 = listOf(1) + expect( Pair(a1, a2) .mapFirst { it.first() } @@ -36,18 +41,23 @@ class PairMapTest { @Test fun mapSecond__identity__returns_equal_Pair() { + val a1 = listOf("string") + val a2 = listOf(1) + expect( - Pair("string", 1) + Pair(a1, a2) .mapSecond(::identity) - ).toEqual( - Pair("string", 1) - ) + ) { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + } } @Test fun mapSecond__transformation_does_not_touch_other_properties() { val a1 = listOf("string") val a2 = listOf(1) + expect( Pair(a1, a2) .mapSecond { it.first() } diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/TripleMapTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/TripleMapTest.kt index 92d55ce..21ccc62 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/TripleMapTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/TripleMapTest.kt @@ -13,12 +13,18 @@ class TripleMapTest { @Test fun mapFirst__identity__returns_equal_Triple() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + expect( - Triple("string", 1, 2L) + Triple(a1, a2, a3) .mapFirst(::identity) - ).toEqual( - Triple("string", 1, 2L) - ) + ) { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + feature { f(it::third) }.toBeTheInstance(a3) + } } @Test @@ -26,6 +32,7 @@ class TripleMapTest { val a1 = listOf("string") val a2 = listOf(1) val a3 = listOf(2L) + expect( Triple(a1, a2, a3) .mapFirst { it.first() } @@ -38,12 +45,18 @@ class TripleMapTest { @Test fun mapSecond__identity__returns_equal_Triple() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + expect( - Triple("string", 1, 2L) + Triple(a1, a2, a3) .mapSecond(::identity) - ).toEqual( - Triple("string", 1, 2L) - ) + ) { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + feature { f(it::third) }.toBeTheInstance(a3) + } } @Test @@ -51,6 +64,7 @@ class TripleMapTest { val a1 = listOf("string") val a2 = listOf(1) val a3 = listOf(2L) + expect( Triple(a1, a2, a3) .mapSecond { it.first() } @@ -63,12 +77,18 @@ class TripleMapTest { @Test fun mapThird__identity__returns_equal_Triple() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + expect( - Triple("string", 1, 2L) + Triple(a1, a2, a3) .mapThird(::identity) - ).toEqual( - Triple("string", 1, 2L) - ) + ) { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + feature { f(it::third) }.toBeTheInstance(a3) + } } @Test @@ -76,6 +96,7 @@ class TripleMapTest { val a1 = listOf("string") val a2 = listOf(1) val a3 = listOf(2L) + expect( Triple(a1, a2, a3) .mapThird { it.first() } diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple4MapTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple4MapTest.kt index b2222f9..4fd2303 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple4MapTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple4MapTest.kt @@ -13,12 +13,20 @@ class Tuple4MapTest { @Test fun mapA1__identity__returns_equal_Tuple4() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + expect( - Tuple4("string", 1, 2L, 3F) + Tuple4(a1, a2, a3, a4) .mapA1(::identity) - ).toEqual( - Tuple4("string", 1, 2L, 3F) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } } @Test @@ -27,6 +35,7 @@ class Tuple4MapTest { val a2 = listOf(1) val a3 = listOf(2L) val a4 = listOf(3F) + expect( Tuple4(a1, a2, a3, a4) .mapA1 { it.first() } @@ -40,12 +49,20 @@ class Tuple4MapTest { @Test fun mapA2__identity__returns_equal_Tuple4() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + expect( - Tuple4("string", 1, 2L, 3F) + Tuple4(a1, a2, a3, a4) .mapA2(::identity) - ).toEqual( - Tuple4("string", 1, 2L, 3F) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } } @Test @@ -54,6 +71,7 @@ class Tuple4MapTest { val a2 = listOf(1) val a3 = listOf(2L) val a4 = listOf(3F) + expect( Tuple4(a1, a2, a3, a4) .mapA2 { it.first() } @@ -67,12 +85,20 @@ class Tuple4MapTest { @Test fun mapA3__identity__returns_equal_Tuple4() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + expect( - Tuple4("string", 1, 2L, 3F) + Tuple4(a1, a2, a3, a4) .mapA3(::identity) - ).toEqual( - Tuple4("string", 1, 2L, 3F) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } } @Test @@ -81,6 +107,7 @@ class Tuple4MapTest { val a2 = listOf(1) val a3 = listOf(2L) val a4 = listOf(3F) + expect( Tuple4(a1, a2, a3, a4) .mapA3 { it.first() } @@ -94,12 +121,20 @@ class Tuple4MapTest { @Test fun mapA4__identity__returns_equal_Tuple4() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + expect( - Tuple4("string", 1, 2L, 3F) + Tuple4(a1, a2, a3, a4) .mapA4(::identity) - ).toEqual( - Tuple4("string", 1, 2L, 3F) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } } @Test @@ -108,6 +143,7 @@ class Tuple4MapTest { val a2 = listOf(1) val a3 = listOf(2L) val a4 = listOf(3F) + expect( Tuple4(a1, a2, a3, a4) .mapA4 { it.first() } diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple5MapTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple5MapTest.kt index a66e78f..6886e11 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple5MapTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple5MapTest.kt @@ -13,12 +13,22 @@ class Tuple5MapTest { @Test fun mapA1__identity__returns_equal_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) + Tuple5(a1, a2, a3, a4, a5) .mapA1(::identity) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test @@ -28,6 +38,7 @@ class Tuple5MapTest { val a3 = listOf(2L) val a4 = listOf(3F) val a5 = listOf(4.0) + expect( Tuple5(a1, a2, a3, a4, a5) .mapA1 { it.first() } @@ -42,12 +53,22 @@ class Tuple5MapTest { @Test fun mapA2__identity__returns_equal_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) + Tuple5(a1, a2, a3, a4, a5) .mapA2(::identity) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test @@ -57,6 +78,7 @@ class Tuple5MapTest { val a3 = listOf(2L) val a4 = listOf(3F) val a5 = listOf(4.0) + expect( Tuple5(a1, a2, a3, a4, a5) .mapA2 { it.first() } @@ -71,12 +93,22 @@ class Tuple5MapTest { @Test fun mapA3__identity__returns_equal_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) + Tuple5(a1, a2, a3, a4, a5) .mapA3(::identity) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test @@ -86,6 +118,7 @@ class Tuple5MapTest { val a3 = listOf(2L) val a4 = listOf(3F) val a5 = listOf(4.0) + expect( Tuple5(a1, a2, a3, a4, a5) .mapA3 { it.first() } @@ -100,12 +133,22 @@ class Tuple5MapTest { @Test fun mapA4__identity__returns_equal_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) + Tuple5(a1, a2, a3, a4, a5) .mapA4(::identity) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test @@ -115,6 +158,7 @@ class Tuple5MapTest { val a3 = listOf(2L) val a4 = listOf(3F) val a5 = listOf(4.0) + expect( Tuple5(a1, a2, a3, a4, a5) .mapA4 { it.first() } @@ -129,12 +173,22 @@ class Tuple5MapTest { @Test fun mapA5__identity__returns_equal_Tuple5() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + expect( - Tuple5("string", 1, 2L, 3F, 4.0) + Tuple5(a1, a2, a3, a4, a5) .mapA5(::identity) - ).toEqual( - Tuple5("string", 1, 2L, 3F, 4.0) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } @Test @@ -144,6 +198,7 @@ class Tuple5MapTest { val a3 = listOf(2L) val a4 = listOf(3F) val a5 = listOf(4.0) + expect( Tuple5(a1, a2, a3, a4, a5) .mapA5 { it.first() } diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple6MapTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple6MapTest.kt index 7140825..49bffb2 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple6MapTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple6MapTest.kt @@ -13,12 +13,24 @@ class Tuple6MapTest { @Test fun mapA1__identity__returns_equal_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') + Tuple6(a1, a2, a3, a4, a5, a6) .mapA1(::identity) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test @@ -29,6 +41,7 @@ class Tuple6MapTest { val a4 = listOf(3F) val a5 = listOf(4.0) val a6 = listOf('c') + expect( Tuple6(a1, a2, a3, a4, a5, a6) .mapA1 { it.first() } @@ -44,12 +57,24 @@ class Tuple6MapTest { @Test fun mapA2__identity__returns_equal_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') + Tuple6(a1, a2, a3, a4, a5, a6) .mapA2(::identity) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test @@ -60,6 +85,7 @@ class Tuple6MapTest { val a4 = listOf(3F) val a5 = listOf(4.0) val a6 = listOf('c') + expect( Tuple6(a1, a2, a3, a4, a5, a6) .mapA2 { it.first() } @@ -75,12 +101,24 @@ class Tuple6MapTest { @Test fun mapA3__identity__returns_equal_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') + Tuple6(a1, a2, a3, a4, a5, a6) .mapA3(::identity) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test @@ -91,6 +129,7 @@ class Tuple6MapTest { val a4 = listOf(3F) val a5 = listOf(4.0) val a6 = listOf('c') + expect( Tuple6(a1, a2, a3, a4, a5, a6) .mapA3 { it.first() } @@ -106,12 +145,24 @@ class Tuple6MapTest { @Test fun mapA4__identity__returns_equal_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') + Tuple6(a1, a2, a3, a4, a5, a6) .mapA4(::identity) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test @@ -122,6 +173,7 @@ class Tuple6MapTest { val a4 = listOf(3F) val a5 = listOf(4.0) val a6 = listOf('c') + expect( Tuple6(a1, a2, a3, a4, a5, a6) .mapA4 { it.first() } @@ -137,12 +189,24 @@ class Tuple6MapTest { @Test fun mapA5__identity__returns_equal_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') + Tuple6(a1, a2, a3, a4, a5, a6) .mapA5(::identity) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test @@ -153,6 +217,7 @@ class Tuple6MapTest { val a4 = listOf(3F) val a5 = listOf(4.0) val a6 = listOf('c') + expect( Tuple6(a1, a2, a3, a4, a5, a6) .mapA5 { it.first() } @@ -168,12 +233,24 @@ class Tuple6MapTest { @Test fun mapA6__identity__returns_equal_Tuple6() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + expect( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') + Tuple6(a1, a2, a3, a4, a5, a6) .mapA6(::identity) - ).toEqual( - Tuple6("string", 1, 2L, 3F, 4.0, 'c') - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } @Test @@ -184,6 +261,7 @@ class Tuple6MapTest { val a4 = listOf(3F) val a5 = listOf(4.0) val a6 = listOf('c') + expect( Tuple6(a1, a2, a3, a4, a5, a6) .mapA6 { it.first() } diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple7MapTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple7MapTest.kt index 3170218..0affa73 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple7MapTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple7MapTest.kt @@ -13,12 +13,26 @@ class Tuple7MapTest { @Test fun mapA1__identity__returns_equal_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) + Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA1(::identity) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test @@ -30,6 +44,7 @@ class Tuple7MapTest { val a5 = listOf(4.0) val a6 = listOf('c') val a7 = listOf(1.toShort()) + expect( Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA1 { it.first() } @@ -46,12 +61,26 @@ class Tuple7MapTest { @Test fun mapA2__identity__returns_equal_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) + Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA2(::identity) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test @@ -63,6 +92,7 @@ class Tuple7MapTest { val a5 = listOf(4.0) val a6 = listOf('c') val a7 = listOf(1.toShort()) + expect( Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA2 { it.first() } @@ -79,12 +109,26 @@ class Tuple7MapTest { @Test fun mapA3__identity__returns_equal_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) + Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA3(::identity) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test @@ -96,6 +140,7 @@ class Tuple7MapTest { val a5 = listOf(4.0) val a6 = listOf('c') val a7 = listOf(1.toShort()) + expect( Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA3 { it.first() } @@ -112,12 +157,26 @@ class Tuple7MapTest { @Test fun mapA4__identity__returns_equal_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) + Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA4(::identity) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test @@ -129,6 +188,7 @@ class Tuple7MapTest { val a5 = listOf(4.0) val a6 = listOf('c') val a7 = listOf(1.toShort()) + expect( Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA4 { it.first() } @@ -145,12 +205,26 @@ class Tuple7MapTest { @Test fun mapA5__identity__returns_equal_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) + Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA5(::identity) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test @@ -162,6 +236,7 @@ class Tuple7MapTest { val a5 = listOf(4.0) val a6 = listOf('c') val a7 = listOf(1.toShort()) + expect( Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA5 { it.first() } @@ -178,12 +253,26 @@ class Tuple7MapTest { @Test fun mapA6__identity__returns_equal_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) + Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA6(::identity) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test @@ -195,6 +284,7 @@ class Tuple7MapTest { val a5 = listOf(4.0) val a6 = listOf('c') val a7 = listOf(1.toShort()) + expect( Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA6 { it.first() } @@ -211,12 +301,26 @@ class Tuple7MapTest { @Test fun mapA7__identity__returns_equal_Tuple7() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + expect( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) + Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA7(::identity) - ).toEqual( - Tuple7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } @Test @@ -228,6 +332,7 @@ class Tuple7MapTest { val a5 = listOf(4.0) val a6 = listOf('c') val a7 = listOf(1.toShort()) + expect( Tuple7(a1, a2, a3, a4, a5, a6, a7) .mapA7 { it.first() } diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple8MapTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple8MapTest.kt index 23d1541..d36dbc1 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple8MapTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple8MapTest.kt @@ -13,12 +13,28 @@ class Tuple8MapTest { @Test fun mapA1__identity__returns_equal_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA1(::identity) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test @@ -31,6 +47,7 @@ class Tuple8MapTest { val a6 = listOf('c') val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) + expect( Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA1 { it.first() } @@ -48,12 +65,28 @@ class Tuple8MapTest { @Test fun mapA2__identity__returns_equal_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA2(::identity) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test @@ -66,6 +99,7 @@ class Tuple8MapTest { val a6 = listOf('c') val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) + expect( Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA2 { it.first() } @@ -83,12 +117,28 @@ class Tuple8MapTest { @Test fun mapA3__identity__returns_equal_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA3(::identity) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test @@ -101,6 +151,7 @@ class Tuple8MapTest { val a6 = listOf('c') val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) + expect( Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA3 { it.first() } @@ -118,12 +169,28 @@ class Tuple8MapTest { @Test fun mapA4__identity__returns_equal_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA4(::identity) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test @@ -136,6 +203,7 @@ class Tuple8MapTest { val a6 = listOf('c') val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) + expect( Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA4 { it.first() } @@ -153,12 +221,28 @@ class Tuple8MapTest { @Test fun mapA5__identity__returns_equal_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA5(::identity) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test @@ -171,6 +255,7 @@ class Tuple8MapTest { val a6 = listOf('c') val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) + expect( Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA5 { it.first() } @@ -188,12 +273,28 @@ class Tuple8MapTest { @Test fun mapA6__identity__returns_equal_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA6(::identity) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test @@ -206,6 +307,7 @@ class Tuple8MapTest { val a6 = listOf('c') val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) + expect( Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA6 { it.first() } @@ -223,12 +325,28 @@ class Tuple8MapTest { @Test fun mapA7__identity__returns_equal_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA7(::identity) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test @@ -241,6 +359,7 @@ class Tuple8MapTest { val a6 = listOf('c') val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) + expect( Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA7 { it.first() } @@ -258,12 +377,28 @@ class Tuple8MapTest { @Test fun mapA8__identity__returns_equal_Tuple8() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + expect( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) + Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA8(::identity) - ).toEqual( - Tuple8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } @Test @@ -276,6 +411,7 @@ class Tuple8MapTest { val a6 = listOf('c') val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) + expect( Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) .mapA8 { it.first() } diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple9MapTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple9MapTest.kt index 8ce527c..4c4217d 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple9MapTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/map/Tuple9MapTest.kt @@ -13,12 +13,30 @@ class Tuple9MapTest { @Test fun mapA1__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA1(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -32,6 +50,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA1 { it.first() } @@ -50,12 +69,30 @@ class Tuple9MapTest { @Test fun mapA2__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA2(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -69,6 +106,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA2 { it.first() } @@ -87,12 +125,30 @@ class Tuple9MapTest { @Test fun mapA3__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA3(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -106,6 +162,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA3 { it.first() } @@ -124,12 +181,30 @@ class Tuple9MapTest { @Test fun mapA4__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA4(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -143,6 +218,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA4 { it.first() } @@ -161,12 +237,30 @@ class Tuple9MapTest { @Test fun mapA5__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA5(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -180,6 +274,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA5 { it.first() } @@ -198,12 +293,30 @@ class Tuple9MapTest { @Test fun mapA6__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA6(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -217,6 +330,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA6 { it.first() } @@ -235,12 +349,30 @@ class Tuple9MapTest { @Test fun mapA7__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA7(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -254,6 +386,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA7 { it.first() } @@ -272,12 +405,30 @@ class Tuple9MapTest { @Test fun mapA8__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA8(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -291,6 +442,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA8 { it.first() } @@ -309,12 +461,30 @@ class Tuple9MapTest { @Test fun mapA9__identity__returns_equal_Tuple9() { + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + expect( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) + Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA9(::identity) - ).toEqual( - Tuple9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - ) + ) { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } @Test @@ -328,6 +498,7 @@ class Tuple9MapTest { val a7 = listOf(1.toShort()) val a8 = listOf(2.toByte()) val a9 = listOf(listOf(1, 2)) + expect( Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) .mapA9 { it.first() } diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple2LikeToTupleTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple2LikeToTupleTest.kt index 03214f4..a8ee5c6 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple2LikeToTupleTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple2LikeToTupleTest.kt @@ -13,15 +13,18 @@ class Tuple2LikeToTupleTest { @Test fun toTuple__returns_Pair_in_correct_order() { - val dataClass = Dummy2("string", 1) - expect(dataClass.toTuple()).toBeAnInstanceOf> { - feature { f(it::component1) }.toEqual("string") - feature { f(it::component2) }.toEqual(1) - } + val a1 = listOf("string") + val a2 = listOf(1) + val dataClass = Dummy2(a1, a2) + + expect(dataClass.toTuple()).toBeAnInstanceOf, List>> { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + } } data class Dummy2( - val a1: String, - val a2: Int - ): Tuple2Like + val a1: List, + val a2: List + ): Tuple2Like, List> } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple3LikeToTupleTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple3LikeToTupleTest.kt index 435ab14..4cf11fb 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple3LikeToTupleTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple3LikeToTupleTest.kt @@ -13,17 +13,21 @@ class Tuple3LikeToTupleTest { @Test fun toTuple__returns_Triple_in_correct_order() { - val dataClass = Dummy3("string", 1, 2L) - expect(dataClass.toTuple()).toBeAnInstanceOf> { - feature { f(it::component1) }.toEqual("string") - feature { f(it::component2) }.toEqual(1) - feature { f(it::component3) }.toEqual(2L) - } + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val dataClass = Dummy3(a1, a2, a3) + + expect(dataClass.toTuple()).toBeAnInstanceOf, List, List>> { + feature { f(it::first) }.toBeTheInstance(a1) + feature { f(it::second) }.toBeTheInstance(a2) + feature { f(it::third) }.toBeTheInstance(a3) + } } data class Dummy3( - val a1: String, - val a2: Int, - val a3: Long - ): Tuple3Like + val a1: List, + val a2: List, + val a3: List + ): Tuple3Like, List, List> } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple4LikeToTupleTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple4LikeToTupleTest.kt index 120eb11..cf69f87 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple4LikeToTupleTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple4LikeToTupleTest.kt @@ -13,19 +13,24 @@ class Tuple4LikeToTupleTest { @Test fun toTuple__returns_Tuple4_in_correct_order() { - val dataClass = Dummy4("string", 1, 2L, 3F) - expect(dataClass.toTuple()).toBeAnInstanceOf> { - feature { f(it::component1) }.toEqual("string") - feature { f(it::component2) }.toEqual(1) - feature { f(it::component3) }.toEqual(2L) - feature { f(it::component4) }.toEqual(3F) - } + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val dataClass = Dummy4(a1, a2, a3, a4) + + expect(dataClass.toTuple()).toBeAnInstanceOf, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + } } data class Dummy4( - val a1: String, - val a2: Int, - val a3: Long, - val a4: Float - ): Tuple4Like + val a1: List, + val a2: List, + val a3: List, + val a4: List + ): Tuple4Like, List, List, List> } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple5LikeToTupleTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple5LikeToTupleTest.kt index 2d036c3..3fb5048 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple5LikeToTupleTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple5LikeToTupleTest.kt @@ -13,21 +13,27 @@ class Tuple5LikeToTupleTest { @Test fun toTuple__returns_Tuple5_in_correct_order() { - val dataClass = Dummy5("string", 1, 2L, 3F, 4.0) - expect(dataClass.toTuple()).toBeAnInstanceOf> { - feature { f(it::component1) }.toEqual("string") - feature { f(it::component2) }.toEqual(1) - feature { f(it::component3) }.toEqual(2L) - feature { f(it::component4) }.toEqual(3F) - feature { f(it::component5) }.toEqual(4.0) - } + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val dataClass = Dummy5(a1, a2, a3, a4, a5) + + expect(dataClass.toTuple()).toBeAnInstanceOf, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + } } data class Dummy5( - val a1: String, - val a2: Int, - val a3: Long, - val a4: Float, - val a5: Double - ): Tuple5Like + val a1: List, + val a2: List, + val a3: List, + val a4: List, + val a5: List + ): Tuple5Like, List, List, List, List> } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple6LikeToTupleTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple6LikeToTupleTest.kt index 0d82a80..16184cc 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple6LikeToTupleTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple6LikeToTupleTest.kt @@ -13,23 +13,30 @@ class Tuple6LikeToTupleTest { @Test fun toTuple__returns_Tuple6_in_correct_order() { - val dataClass = Dummy6("string", 1, 2L, 3F, 4.0, 'c') - expect(dataClass.toTuple()).toBeAnInstanceOf> { - feature { f(it::component1) }.toEqual("string") - feature { f(it::component2) }.toEqual(1) - feature { f(it::component3) }.toEqual(2L) - feature { f(it::component4) }.toEqual(3F) - feature { f(it::component5) }.toEqual(4.0) - feature { f(it::component6) }.toEqual('c') - } + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val dataClass = Dummy6(a1, a2, a3, a4, a5, a6) + + expect(dataClass.toTuple()).toBeAnInstanceOf, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + } } data class Dummy6( - val a1: String, - val a2: Int, - val a3: Long, - val a4: Float, - val a5: Double, - val a6: Char - ): Tuple6Like + val a1: List, + val a2: List, + val a3: List, + val a4: List, + val a5: List, + val a6: List + ): Tuple6Like, List, List, List, List, List> } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple7LikeToTupleTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple7LikeToTupleTest.kt index 43d4971..48c3308 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple7LikeToTupleTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple7LikeToTupleTest.kt @@ -13,25 +13,33 @@ class Tuple7LikeToTupleTest { @Test fun toTuple__returns_Tuple7_in_correct_order() { - val dataClass = Dummy7("string", 1, 2L, 3F, 4.0, 'c', 1.toShort()) - expect(dataClass.toTuple()).toBeAnInstanceOf> { - feature { f(it::component1) }.toEqual("string") - feature { f(it::component2) }.toEqual(1) - feature { f(it::component3) }.toEqual(2L) - feature { f(it::component4) }.toEqual(3F) - feature { f(it::component5) }.toEqual(4.0) - feature { f(it::component6) }.toEqual('c') - feature { f(it::component7) }.toEqual(1.toShort()) - } + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val dataClass = Dummy7(a1, a2, a3, a4, a5, a6, a7) + + expect(dataClass.toTuple()).toBeAnInstanceOf, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + } } data class Dummy7( - val a1: String, - val a2: Int, - val a3: Long, - val a4: Float, - val a5: Double, - val a6: Char, - val a7: Short - ): Tuple7Like + val a1: List, + val a2: List, + val a3: List, + val a4: List, + val a5: List, + val a6: List, + val a7: List + ): Tuple7Like, List, List, List, List, List, List> } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple8LikeToTupleTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple8LikeToTupleTest.kt index 3e98205..fc2c942 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple8LikeToTupleTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple8LikeToTupleTest.kt @@ -13,27 +13,36 @@ class Tuple8LikeToTupleTest { @Test fun toTuple__returns_Tuple8_in_correct_order() { - val dataClass = Dummy8("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte()) - expect(dataClass.toTuple()).toBeAnInstanceOf> { - feature { f(it::component1) }.toEqual("string") - feature { f(it::component2) }.toEqual(1) - feature { f(it::component3) }.toEqual(2L) - feature { f(it::component4) }.toEqual(3F) - feature { f(it::component5) }.toEqual(4.0) - feature { f(it::component6) }.toEqual('c') - feature { f(it::component7) }.toEqual(1.toShort()) - feature { f(it::component8) }.toEqual(2.toByte()) - } + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val dataClass = Dummy8(a1, a2, a3, a4, a5, a6, a7, a8) + + expect(dataClass.toTuple()).toBeAnInstanceOf, List, List, List, List, List, List, List>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + } } data class Dummy8( - val a1: String, - val a2: Int, - val a3: Long, - val a4: Float, - val a5: Double, - val a6: Char, - val a7: Short, - val a8: Byte - ): Tuple8Like + val a1: List, + val a2: List, + val a3: List, + val a4: List, + val a5: List, + val a6: List, + val a7: List, + val a8: List + ): Tuple8Like, List, List, List, List, List, List, List> } \ No newline at end of file diff --git a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple9LikeToTupleTest.kt b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple9LikeToTupleTest.kt index a7e1545..d573e1a 100644 --- a/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple9LikeToTupleTest.kt +++ b/src/commonTest/generated/kotlin/ch/tutteli/kbox/toTuple/Tuple9LikeToTupleTest.kt @@ -13,29 +13,39 @@ class Tuple9LikeToTupleTest { @Test fun toTuple__returns_Tuple9_in_correct_order() { - val dataClass = Dummy9("string", 1, 2L, 3F, 4.0, 'c', 1.toShort(), 2.toByte(), listOf(1, 2)) - expect(dataClass.toTuple()).toBeAnInstanceOf>> { - feature { f(it::component1) }.toEqual("string") - feature { f(it::component2) }.toEqual(1) - feature { f(it::component3) }.toEqual(2L) - feature { f(it::component4) }.toEqual(3F) - feature { f(it::component5) }.toEqual(4.0) - feature { f(it::component6) }.toEqual('c') - feature { f(it::component7) }.toEqual(1.toShort()) - feature { f(it::component8) }.toEqual(2.toByte()) - feature { f(it::component9) }.toEqual(listOf(1, 2)) - } + val a1 = listOf("string") + val a2 = listOf(1) + val a3 = listOf(2L) + val a4 = listOf(3F) + val a5 = listOf(4.0) + val a6 = listOf('c') + val a7 = listOf(1.toShort()) + val a8 = listOf(2.toByte()) + val a9 = listOf(listOf(1, 2)) + val dataClass = Dummy9(a1, a2, a3, a4, a5, a6, a7, a8, a9) + + expect(dataClass.toTuple()).toBeAnInstanceOf, List, List, List, List, List, List, List, List>>> { + feature { f(it::a1) }.toBeTheInstance(a1) + feature { f(it::a2) }.toBeTheInstance(a2) + feature { f(it::a3) }.toBeTheInstance(a3) + feature { f(it::a4) }.toBeTheInstance(a4) + feature { f(it::a5) }.toBeTheInstance(a5) + feature { f(it::a6) }.toBeTheInstance(a6) + feature { f(it::a7) }.toBeTheInstance(a7) + feature { f(it::a8) }.toBeTheInstance(a8) + feature { f(it::a9) }.toBeTheInstance(a9) + } } data class Dummy9( - val a1: String, - val a2: Int, - val a3: Long, - val a4: Float, - val a5: Double, - val a6: Char, - val a7: Short, - val a8: Byte, - val a9: List - ): Tuple9Like> + val a1: List, + val a2: List, + val a3: List, + val a4: List, + val a5: List, + val a6: List, + val a7: List, + val a8: List, + val a9: List> + ): Tuple9Like, List, List, List, List, List, List, List, List>> } \ No newline at end of file