Minor. Add more tests
This commit is contained in:
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class UInt<T: Int>(val x: T)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class UIntArray(private val storage: IntArray) : Collection<UInt<Int>> {
|
||||
public override val size: Int get() = storage.size
|
||||
|
||||
override operator fun iterator() = TODO()
|
||||
override fun contains(element: UInt<Int>): Boolean = TODO()
|
||||
override fun containsAll(elements: Collection<UInt<Int>>): Boolean = TODO()
|
||||
override fun isEmpty(): Boolean = TODO()
|
||||
}
|
||||
|
||||
fun calculate(u: UIntArray): Int {
|
||||
return u.size
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (calculate(UIntArray(intArrayOf(1, 2, 3, 4))) != 4) return "Fail"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user