Skip to content

Commit f51c4c7

Browse files
committed
0.6.1
1 parent 0da3889 commit f51c4c7

9 files changed

Lines changed: 19 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 0.x
44

5+
### 0.6.1
6+
* Add missing TestExecutionScope to data-driven test leaves
57

68
### 0.6.0 Breaking FreeSpec Fixture Generation
79
* Support fixture generation for suites in addition to tests

datatest/src/commonMain/kotlin/at/asitplus/test/Data.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package at.asitplus.testballoon
22

33
import at.asitplus.catchingUnwrapped
44
import de.infix.testBalloon.framework.core.TestConfig
5+
import de.infix.testBalloon.framework.core.TestExecutionScope
56
import de.infix.testBalloon.framework.core.TestSuite
67

78
/**
@@ -56,7 +57,7 @@ internal fun <Data> TestSuite.withDataInternal(
5657
compact: Boolean,
5758
maxLength: Int,
5859
displayNameMaxLength: Int,
59-
action: suspend (Data) -> Unit
60+
action: suspend TestExecutionScope.(Data) -> Unit
6061
) {
6162
if (compact) {
6263
val (compactName, map) = map.peekTypeNameAndReplay { it.second }

datatest/src/commonMain/kotlin/at/asitplus/test/Terminal.iterable.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package at.asitplus.testballoon
22

33
import de.infix.testBalloon.framework.core.TestConfig
4+
import de.infix.testBalloon.framework.core.TestExecutionScope
45
import de.infix.testBalloon.framework.core.TestSuite
56

67

@@ -17,7 +18,7 @@ fun <Data> TestSuite.withData(
1718
maxLength: Int = DataTest.defaultTestNameMaxLength,
1819
displayNameMaxLength: Int = DataTest.defaultDisplayNameMaxLength,
1920
testConfig: TestConfig = TestConfig,
20-
action: suspend (Data) -> Unit
21+
action: suspend TestExecutionScope.(Data) -> Unit
2122
) = withDataInternal(
2223
data.asSequence().map { it.toPrettyString() to it },
2324
testConfig,
@@ -47,7 +48,7 @@ fun <Data> TestSuite.withData(
4748
maxLength: Int = DataTest.defaultTestNameMaxLength,
4849
displayNameMaxLength: Int = DataTest.defaultDisplayNameMaxLength,
4950
testConfig: TestConfig = TestConfig,
50-
action: suspend (Data) -> Unit
51+
action: suspend TestExecutionScope.(Data) -> Unit
5152
) = withDataInternal(
5253
data.asSequence().map { nameFn(it) to it },
5354
testConfig,

datatest/src/commonMain/kotlin/at/asitplus/test/Terminal.map.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package at.asitplus.testballoon
22

33
import de.infix.testBalloon.framework.core.TestConfig
4+
import de.infix.testBalloon.framework.core.TestExecutionScope
45
import de.infix.testBalloon.framework.core.TestSuite
56

67

@@ -21,7 +22,7 @@ fun <Data> TestSuite.withData(
2122
maxLength: Int = DataTest.defaultTestNameMaxLength,
2223
displayNameMaxLength: Int = DataTest.defaultDisplayNameMaxLength,
2324
testConfig: TestConfig = TestConfig,
24-
action: suspend (Data) -> Unit
25+
action: suspend TestExecutionScope.(Data) -> Unit
2526
) = withDataInternal(
2627
map.asSequence().map { (k, v) -> k to v },
2728
testConfig,

datatest/src/commonMain/kotlin/at/asitplus/test/Terminal.seuqence.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package at.asitplus.testballoon
22

33
import de.infix.testBalloon.framework.core.TestConfig
4+
import de.infix.testBalloon.framework.core.TestExecutionScope
45
import de.infix.testBalloon.framework.core.TestSuite
56

67

@@ -20,7 +21,7 @@ fun <Data> TestSuite.withData(
2021
maxLength: Int = DataTest.defaultTestNameMaxLength,
2122
displayNameMaxLength: Int = DataTest.defaultDisplayNameMaxLength,
2223
testConfig: TestConfig = TestConfig,
23-
action: suspend (Data) -> Unit
24+
action: suspend TestExecutionScope.(Data) -> Unit
2425
) = withDataInternal(data.map { it.toPrettyString() to it }, testConfig, compact, maxLength, displayNameMaxLength, action)
2526

2627
/**
@@ -42,6 +43,6 @@ fun <Data> TestSuite.withData(
4243
maxLength: Int = DataTest.defaultTestNameMaxLength,
4344
displayNameMaxLength: Int = DataTest.defaultDisplayNameMaxLength,
4445
testConfig: TestConfig = TestConfig,
45-
action: suspend (Data) -> Unit
46+
action: suspend TestExecutionScope.(Data) -> Unit
4647
) = withDataInternal(data.map { nameFn(it) to it }, testConfig, compact, maxLength, displayNameMaxLength, action)
4748

datatest/src/commonMain/kotlin/at/asitplus/test/Terminal.vararg.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package at.asitplus.testballoon
22

33
import de.infix.testBalloon.framework.core.TestConfig
4+
import de.infix.testBalloon.framework.core.TestExecutionScope
45
import de.infix.testBalloon.framework.core.TestSuite
56

67
/**
@@ -21,7 +22,7 @@ fun <Data> TestSuite.withData(
2122
maxLength: Int = DataTest.defaultTestNameMaxLength,
2223
displayNameMaxLength: Int = DataTest.defaultDisplayNameMaxLength,
2324
testConfig: TestConfig = TestConfig,
24-
action: suspend (Data) -> Unit
25+
action: suspend TestExecutionScope.(Data) -> Unit
2526
) = withDataInternal(
2627
parameters.asSequence().map { it.toPrettyString() to it },
2728
testConfig,
@@ -52,7 +53,7 @@ fun <Data> TestSuite.withData(
5253
maxLength: Int = DataTest.defaultTestNameMaxLength,
5354
displayNameMaxLength: Int = DataTest.defaultDisplayNameMaxLength,
5455
testConfig: TestConfig = TestConfig,
55-
action: suspend (Data) -> Unit
56+
action: suspend TestExecutionScope.(Data) -> Unit
5657
) = withDataInternal(
5758
parameters.asSequence().map { nameFn(it) to it },
5859
testConfig,

datatest/src/commonTest/kotlin/DataTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ val aDataDrivenSuite by testSuite {
1717
withData(number.toString(), "one",null, null, null, "two", "three", "four", compact = true) { word ->
1818
number shouldBe number
1919
word shouldBe "three"
20+
2021
}
2122
}
2223

freespec/src/commonMain/kotlin/at/asitplus/test/FreeSpec.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ operator fun String.invoke(
6161
*/
6262
data class ConfiguredSuite(
6363
val parent: TestSuite,
64-
val maxLength: Int = FreeSpec.defaultTestNameMaxLength,
65-
val displayNameMaxLength: Int = FreeSpec.defaultDisplayNameMaxLength,
64+
val maxLength: Int = FreeSpec.defaultTestNameMaxLength,
65+
val displayNameMaxLength: Int = FreeSpec.defaultDisplayNameMaxLength,
6666
val displayName: String,
6767
val testName: String,
6868
val config: TestConfig

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ kotlin.code.style=official
22
org.gradle.jvmargs=-Xmx10g -Dfile.encoding=UTF-8 -Xms200m
33
kotlin.daemon.jvm.options=-Xmx10G -Xms200m
44
kotlin.daemon.jvmargs=-Xmx10g -Xms200m
5-
artifactVersion = 0.6.0
5+
artifactVersion = 0.6.1
66
jdk.version=17
77
android.minSdk=21
88
android.compileSdk=34

0 commit comments

Comments
 (0)