diff --git a/tests/src/test/kotlin/test/AdditionalMatchersTest.kt b/tests/src/test/kotlin/test/AdditionalMatchersTest.kt index 4036f7c..3b4fb8b 100644 --- a/tests/src/test/kotlin/test/AdditionalMatchersTest.kt +++ b/tests/src/test/kotlin/test/AdditionalMatchersTest.kt @@ -53,7 +53,34 @@ class AdditionalCaptorsTest : TestBase() { } @Test - fun testAryEqPrimitive() { + fun testAryEqBoolean() { + mock().apply { + booleanArray(booleanArrayOf(true, false, true)) + verify(this).booleanArray(aryEq(booleanArrayOf(true, false, true))) + verify(this, never()).booleanArray(aryEq(booleanArrayOf(true, false))) + } + } + + @Test + fun testAryEqByte() { + mock().apply { + byteArray(byteArrayOf(1, 2, 3)) + verify(this).byteArray(aryEq(byteArrayOf(1, 2, 3))) + verify(this, never()).byteArray(aryEq(byteArrayOf(1, 2))) + } + } + + @Test + fun testAryEqShort() { + mock().apply { + shortArray(shortArrayOf(1, 2, 3)) + verify(this).shortArray(aryEq(shortArrayOf(1, 2, 3))) + verify(this, never()).shortArray(aryEq(shortArrayOf(1, 2))) + } + } + + @Test + fun testAryEqInt() { mock().apply { intArray(intArrayOf(1, 2, 3)) verify(this).intArray(aryEq(intArrayOf(1, 2, 3))) @@ -61,6 +88,42 @@ class AdditionalCaptorsTest : TestBase() { } } + @Test + fun testAryEqLong() { + mock().apply { + longArray(longArrayOf(1, 2, 3)) + verify(this).longArray(aryEq(longArrayOf(1, 2, 3))) + verify(this, never()).longArray(aryEq(longArrayOf(1, 2))) + } + } + + @Test + fun testAryEqChar() { + mock().apply { + charArray(charArrayOf('1', '2', '3')) + verify(this).charArray(aryEq(charArrayOf('1', '2', '3'))) + verify(this, never()).charArray(aryEq(charArrayOf('1', '2'))) + } + } + + @Test + fun testAryEqFloat() { + mock().apply { + floatArray(floatArrayOf(1f, 2f, 3.4f)) + verify(this).floatArray(aryEq(floatArrayOf(1f, 2f, 3.4f))) + verify(this, never()).floatArray(aryEq(floatArrayOf(1f, 2f))) + } + } + + @Test + fun testAryEqDouble() { + mock().apply { + doubleArray(doubleArrayOf(1.0, 2.0, 3.4)) + verify(this).doubleArray(aryEq(doubleArrayOf(1.0, 2.0, 3.4))) + verify(this, never()).doubleArray(aryEq(doubleArrayOf(1.0, 2.0))) + } + } + @Test fun testAryEq() { mock().apply { diff --git a/tests/src/test/kotlin/test/Classes.kt b/tests/src/test/kotlin/test/Classes.kt index c084b62..4d2f26e 100644 --- a/tests/src/test/kotlin/test/Classes.kt +++ b/tests/src/test/kotlin/test/Classes.kt @@ -44,7 +44,6 @@ class Closed interface Methods { - fun intArray(i: IntArray) fun closed(c: Closed) fun closedArray(a: Array) fun closedNullableArray(a: Array) @@ -54,13 +53,21 @@ interface Methods { fun closedSet(s: Set) fun string(s: String) fun boolean(b: Boolean) + fun booleanArray(d: BooleanArray) fun byte(b: Byte) + fun byteArray(b: ByteArray) fun char(c: Char) + fun charArray(c: CharArray) fun short(s: Short) + fun shortArray(s: ShortArray) fun int(i: Int) + fun intArray(i: IntArray) fun long(l: Long) + fun longArray(l: LongArray) fun float(f: Float) + fun floatArray(f: FloatArray) fun double(d: Double) + fun doubleArray(d: DoubleArray) fun closedVararg(vararg c: Closed) fun throwableClass(t: ThrowableClass) fun nullableString(s: String?)