@@ -95,13 +95,18 @@ internal class RecursionTest : ApproximationsTestRunner() {
95
95
96
96
@Test
97
97
fun recursionWithExceptionTest () {
98
- checkDiscoveredPropertiesWithExceptions(
99
- Recursion ::recursionWithException,
100
- ge(3 ),
101
- { _, x, r -> x < 42 && r.isException<IllegalArgumentException >() },
102
- { _, x, r -> x == 42 && r.isException<IllegalArgumentException >() },
103
- { _, x, r -> x > 42 && r.isException<IllegalArgumentException >() },
104
- )
98
+ // Two goto statements are expected to not be covered
99
+ // The expected coverage is 15 out of 17 instructions
100
+ val options = options.copy(stopOnCoverage = 88 )
101
+ withOptions(options) {
102
+ checkDiscoveredPropertiesWithExceptions(
103
+ Recursion ::recursionWithException,
104
+ ge(3 ),
105
+ { _, x, r -> x < 42 && r.isException<IllegalArgumentException >() },
106
+ { _, x, r -> x == 42 && r.isException<IllegalArgumentException >() },
107
+ { _, x, r -> x > 42 && r.isException<IllegalArgumentException >() },
108
+ )
109
+ }
105
110
}
106
111
107
112
@UsvmTest([Options ([PathSelectionStrategy .RANDOM_PATH ])])
0 commit comments