File tree 2 files changed +6
-3
lines changed
selfie-runner-junit5/src/test/kotlin/com/diffplug/selfie/junit5
undertest-junit5/src/test/kotlin/undertest/junit5
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,18 @@ package com.diffplug.selfie.junit5
17
17
18
18
import io.kotest.matchers.shouldBe
19
19
import kotlin.test.Test
20
+ import org.junit.jupiter.api.AfterAll
20
21
import org.junit.jupiter.api.MethodOrderer
21
22
import org.junit.jupiter.api.Order
22
23
import org.junit.jupiter.api.TestMethodOrder
23
- import org.junitpioneer.jupiter.DisableIfTestFails
24
24
25
25
/* * Write-only test which asserts adding and removing snapshots results in same-class GC. */
26
26
@TestMethodOrder(MethodOrderer .OrderAnnotation ::class )
27
- @DisableIfTestFails
27
+ // @DisableIfTestFails don't disable if test fails because we *have* to run cleanup
28
28
class InlineIntTest : Harness (" undertest-junit5" ) {
29
29
@Test @Order(1 )
30
30
fun toBe_TODO () {
31
+ ut_mirror().lineWith(" @Ignore" ).setContent(" //@Ignore" )
31
32
ut_mirror().lineWith(" expectSelfie" ).setContent(" expectSelfie(1234).toBe_TODO()" )
32
33
gradleReadSSFail()
33
34
}
@@ -42,5 +43,6 @@ class InlineIntTest : Harness("undertest-junit5") {
42
43
@Test @Order(3 )
43
44
fun cleanup () {
44
45
ut_mirror().lineWith(" expectSelfie" ).setContent(" expectSelfie(1234).toBe_TODO()" )
46
+ ut_mirror().lineWith(" //@Ignore" ).setContent(" @Ignore" )
45
47
}
46
48
}
Original file line number Diff line number Diff line change 1
1
package undertest.junit5
2
2
// spotless:off
3
3
import com.diffplug.selfie.expectSelfie
4
+ import kotlin.test.Ignore
4
5
import kotlin.test.Test
5
-
6
6
// spotless:on
7
7
8
+ @Ignore
8
9
class UT_InlineIntTest {
9
10
@Test fun singleInt () {
10
11
expectSelfie(1234 ).toBe_TODO()
You can’t perform that action at this time.
0 commit comments