Skip to content

Commit ee9ef20

Browse files
committed
Fix tests warnings
1 parent 4b2c6ea commit ee9ef20

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

mokkery-runtime/src/commonTest/kotlin/dev/mokkery/matcher/logical/AndArgMatcherTest.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package dev.mokkery.matcher.logical
22

33
import dev.mokkery.matcher.ArgMatcher
4+
import dev.mokkery.matcher.ArgMatcher.Equals
45
import dev.mokkery.matcher.capture.CaptureMatcher
56
import dev.mokkery.matcher.capture.asCapture
7+
import dev.mokkery.matcher.logical.LogicalMatchers.And
8+
import dev.mokkery.matcher.logical.LogicalMatchers.Not
69
import kotlin.test.Test
710
import kotlin.test.assertEquals
811
import kotlin.test.assertFalse
@@ -13,13 +16,13 @@ class AndArgMatcherTest {
1316

1417
@Test
1518
fun testMatchesWhenAllMatchersSatisfied() {
16-
val matcher = LogicalMatchers.And(listOf(ArgMatcher.NotEqual(1), ArgMatcher.NotEqual(2)))
19+
val matcher = And(listOf(Not(Equals(1)), Not(Equals(2))))
1720
assertTrue(matcher.matches(3))
1821
}
1922

2023
@Test
2124
fun testComposedMatcherDoesNotMatchWhenAnyMatcherNotSatisfied() {
22-
val matcher = LogicalMatchers.And(listOf(ArgMatcher.NotEqual(1), ArgMatcher.NotEqual(2)))
25+
val matcher = And(listOf(Not(Equals(1)), Not(Equals(2))))
2326
assertFalse(matcher.matches(1))
2427
assertFalse(matcher.matches(2))
2528
}
@@ -30,7 +33,7 @@ class AndArgMatcherTest {
3033
val list2 = mutableListOf<Int>()
3134
val matcher1 = CaptureMatcher(list1.asCapture(), ArgMatcher.Any)
3235
val matcher2 = CaptureMatcher(list2.asCapture(), ArgMatcher.Any)
33-
LogicalMatchers.And(listOf(matcher2, matcher1))
36+
And(listOf(matcher2, matcher1))
3437
.apply {
3538
capture(1)
3639
capture(2)

test-mokkery/src/commonMain/kotlin/dev/mokkery/test/AbstractClass.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ abstract class AbstractClassLevel1 : AbstractClassLevel2() {
99
// to be ignored by the compiler
1010
inline val inlineProperty get() = "Ignored inline property"
1111

12+
@Suppress("NOTHING_TO_INLINE")
1213
inline fun inlineMethod() = "Ignored inline method"
1314

1415
fun finalMethod() = "Ignored final method"

0 commit comments

Comments
 (0)