Skip to content

Commit 4744dc1

Browse files
committed
Fix tests and samples
1 parent b33bf7e commit 4744dc1

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

examples/java/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies {
88
}
99

1010
benchmark {
11-
configurations {
11+
targets {
1212
register("main") {
1313
jmhVersion = "1.21"
1414
}

examples/kotlin-kts/build.gradle.kts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ tasks.withType<KotlinCompile> {
3232
}
3333

3434
benchmark {
35-
defaults {
36-
37-
}
38-
39-
configurations {
35+
targets {
4036
register("main") {
41-
//jmhVersion = "1.21"
37+
this as JvmBenchmarkTarget
38+
jmhVersion = "1.21"
4239
}
4340
}
4441
}

examples/kotlin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies {
2727
// Configure benchmark
2828
benchmark {
2929
// Setup configurations
30-
configurations {
30+
targets {
3131
// This one matches sourceSet name above
3232
register("benchmarks") {
3333
jmhVersion = "1.21"

runtime/commonTest/src/org/jetbrains/gradle/benchmarks/tests/FormatTests.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class FormatTests {
1616

1717
@Test
1818
fun formatTimeUnits() {
19-
assertEquals("83.33 ops/us", 12.0.nanosToText(Mode.Throughput, BenchmarkTimeUnit.MICROSECONDS))
20-
assertEquals("0.01200 us/op", 12.0.nanosToText(Mode.AverageTime, BenchmarkTimeUnit.MICROSECONDS))
19+
assertEquals("83.3333 ops/us", 12.0.nanosToText(Mode.Throughput, BenchmarkTimeUnit.MICROSECONDS))
20+
assertEquals("0.0120000 us/op", 12.0.nanosToText(Mode.AverageTime, BenchmarkTimeUnit.MICROSECONDS))
2121
}
2222
}

0 commit comments

Comments
 (0)