assertk / assertk.assertions / index

index

(common, jvm) @JvmName("byteArrayIndex") fun Assert<ByteArray>.index(index: Int): Assert<Byte>

Returns an assert that assertion on the value at the given index in the array.

assertThat(byteArrayOf(0, 1, 2)).index(1).isPositive()
(common, jvm) @JvmName("intArrayIndex") fun Assert<IntArray>.index(index: Int): Assert<Int>

Returns an assert that assertion on the value at the given index in the array.

assertThat(intArrayOf(0, 1, 2)).index(1).isPositive()
(common, jvm) @JvmName("shortArrayIndex") fun Assert<ShortArray>.index(index: Int): Assert<Short>

Returns an assert that assertion on the value at the given index in the array.

assertThat(shortArrayOf(0, 1, 2)).index(1).isPositive()
(common, jvm) @JvmName("longArrayIndex") fun Assert<LongArray>.index(index: Int): Assert<Long>

Returns an assert that assertion on the value at the given index in the array.

assertThat(longArrayOf(0, 1, 2)).index(1).isPositive()
(common, jvm) @JvmName("floatArrayIndex") fun Assert<FloatArray>.index(index: Int): Assert<Float>

Returns an assert that assertion on the value at the given index in the array.

assertThat(floatArrayOf(0, 1, 2)).index(1).isPositive()
(common, jvm) @JvmName("doubleArrayIndex") fun Assert<DoubleArray>.index(index: Int): Assert<Double>

Returns an assert that assertion on the value at the given index in the array.

assertThat(doubleArrayOf(0, 1, 2)).index(1).isPositive()
(common, jvm) @JvmName("charArrayIndex") fun Assert<CharArray>.index(index: Int): Assert<Char>

Returns an assert that assertion on the value at the given index in the array.

assertThat(charArrayOf(0, 1, 2)).index(1).isPositive()
(common, jvm) fun <T> Assert<Array<T>>.index(index: Int): Assert<T>

Returns an assert that assertion on the value at the given index in the array.

assertThat(arrayOf(0, 1, 2)).index(1).isPositive()
(common, jvm) fun <T> Assert<List<T>>.index(index: Int): Assert<T>

Returns an assert that assertion on the value at the given index in the list.

assertThat(listOf(0, 1, 2)).index(1).isPositive()