[K/N][Tests] Adjust moved codegen tests to new infra
^KT-61259
This commit is contained in:
committed by
Space Team
parent
71a834b778
commit
73032213f0
@@ -3,7 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
@file:Suppress("RESERVED_MEMBER_INSIDE_VALUE_CLASS")
|
||||
package codegen.inlineClass.customEquals
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -11,6 +10,7 @@ private inline class Z(val data: Int) {
|
||||
override fun equals(other: Any?) = other is Z && data % 256 == other.data % 256
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
fun box(): String {
|
||||
assertTrue(Z(0) == Z(256))
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.inlineClass.defaultEquals
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
inline class A(val x: Int)
|
||||
@@ -12,7 +10,7 @@ inline class B(val a: A)
|
||||
inline class C(val s: String)
|
||||
inline class D(val c: C)
|
||||
|
||||
@Test fun runTest() {
|
||||
fun box(): String {
|
||||
val a = A(42)
|
||||
val b = B(a)
|
||||
val c = C("zzz")
|
||||
@@ -21,4 +19,6 @@ inline class D(val c: C)
|
||||
assertTrue(b.equals(b))
|
||||
assertTrue(c.equals(c))
|
||||
assertTrue(d.equals(d))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.inlineClass.inlineClass0
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
// Based on KT-27225.
|
||||
@@ -15,6 +13,7 @@ inline class Second(val value: First) {
|
||||
constructor(c: Int) : this(First(c))
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
fun box(): String {
|
||||
assertEquals(Second(42).value.value, 42)
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.inlineClass.nestedInlineClasses
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
interface I {
|
||||
@@ -15,7 +13,9 @@ interface I2 {
|
||||
inline class IC(val x: Int)
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
fun box(): String {
|
||||
assertEquals(42, I.IC(42).x)
|
||||
assertEquals(117, I2.IC(117).x)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
+3
-4
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.inlineClass.secondaryConstructorWithGenerics
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
// Based on KT-42649.
|
||||
@@ -12,7 +10,8 @@ inline class IC<T>(val value: List<T>) {
|
||||
constructor(value: T) : this(listOf(value))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun runTest() {
|
||||
fun box(): String {
|
||||
assertEquals("abc", IC("abc").value.singleOrNull())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.inlineClass.valueClass0
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
// Based on KT-27225.
|
||||
@@ -15,6 +13,7 @@ value class Second(val value: First) {
|
||||
constructor(c: Int) : this(First(c))
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
fun box(): String {
|
||||
assertEquals(Second(42).value.value, 42)
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user