[K/JS] Migrate invalidation tests to ES modules
This commit is contained in:
-2
@@ -1,2 +0,0 @@
|
||||
data class Demo(val x: Int) {
|
||||
}
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
class Demo(val x: Int) {
|
||||
}
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
inline class Demo(val x: Int) {
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1.0_data_class.kt -> l1.kt
|
||||
added file: l1.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1.1_simple_class.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1.2_inline_class.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
STEP 3:
|
||||
modifications:
|
||||
U : l1.1_simple_class.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
@@ -1,18 +0,0 @@
|
||||
fun box(stepId: Int): String {
|
||||
val d = Demo(15)
|
||||
when (stepId) {
|
||||
0, 2 -> {
|
||||
if (!testEquals(d, Demo(15))) return "Fail equals"
|
||||
if (testHashCode(d) != Demo(15).hashCode()) return "Fail hashCode"
|
||||
if (testToString(d) != "Demo(x=15)") return "Fail toString"
|
||||
}
|
||||
1, 3-> {
|
||||
if (testEquals(d, Demo(15))) return "Fail equals"
|
||||
if (testHashCode(d) == Demo(15).hashCode()) return "Fail hashCode"
|
||||
if (testToString(d) != "[object Object]") return "Fail toString"
|
||||
}
|
||||
else -> return "Unknown"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
added file: m.kt, testEquals.kt, testHashCode.kt, testToString.kt
|
||||
STEP 1..3:
|
||||
dependencies: lib1
|
||||
updated imports: m.kt, testEquals.kt, testHashCode.kt, testToString.kt
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
fun testEquals(lhs: Demo, rhs: Demo): Boolean {
|
||||
return lhs == rhs
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
fun testHashCode(d: Demo): Int {
|
||||
return d.hashCode()
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
fun testToString(d: Demo): String {
|
||||
return d.toString()
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
MODULES: lib1, main
|
||||
MODULE_KIND: es
|
||||
|
||||
STEP 0:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
STEP 1..3:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
(function (_) {
|
||||
'use strict';
|
||||
function externalDemoFunction() { return 3; }
|
||||
|
||||
_.externalDemoFunction = externalDemoFunction;
|
||||
|
||||
return _
|
||||
}(module.exports));
|
||||
+1
@@ -0,0 +1 @@
|
||||
export function externalDemoFunction() { return 3; }
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
(function (_) {
|
||||
'use strict';
|
||||
function externalDemoFunction() { return 0; }
|
||||
|
||||
_.externalDemoFunction = externalDemoFunction;
|
||||
|
||||
return _
|
||||
}(module.exports));
|
||||
+1
@@ -0,0 +1 @@
|
||||
export function externalDemoFunction() { return 0; }
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
(function (_) {
|
||||
'use strict';
|
||||
function externalDemoFunction() { return 2; }
|
||||
|
||||
_.externalDemoFunction = externalDemoFunction;
|
||||
|
||||
return _
|
||||
}(module.exports));
|
||||
+1
@@ -0,0 +1 @@
|
||||
export function externalDemoFunction() { return 2; }
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
(function (_) {
|
||||
'use strict';
|
||||
function externalDemoFunction() { return 1; }
|
||||
|
||||
_.externalDemoFunction = externalDemoFunction;
|
||||
|
||||
return _
|
||||
}(module.exports));
|
||||
+1
@@ -0,0 +1 @@
|
||||
export function externalDemoFunction() { return 1; }
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
(function (_) {
|
||||
'use strict';
|
||||
function externalDemoFunction() { return 5; }
|
||||
|
||||
_.externalDemoFunction = externalDemoFunction;
|
||||
|
||||
return _
|
||||
}(module.exports));
|
||||
+1
@@ -0,0 +1 @@
|
||||
export function externalDemoFunction() { return 5; }
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
(function (_) {
|
||||
'use strict';
|
||||
function externalDemoFunction() { return 4; }
|
||||
|
||||
_.externalDemoFunction = externalDemoFunction;
|
||||
|
||||
return _
|
||||
}(module.exports));
|
||||
+1
@@ -0,0 +1 @@
|
||||
export function externalDemoFunction() { return 4; }
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
@file:JsModule("js-module-a")
|
||||
@file:JsModule("./js-module-a.mjs")
|
||||
|
||||
external fun externalDemoFunction(): Int
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
@file:JsModule("js-module-a")
|
||||
@file:JsModule("./js-module-a.mjs")
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
@file:JsModule("js-module-a-new")
|
||||
@file:JsModule("./js-module-a-new.mjs")
|
||||
|
||||
external fun externalDemoFunction(): Int
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
@file:JsModule("js-module-b")
|
||||
@file:JsModule("./js-module-b.mjs")
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
@file:JsModule("js-module-b")
|
||||
@file:JsModule("./js-module-b.mjs")
|
||||
|
||||
external fun externalDemoFunction(): Int
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
@file:JsModule("js-module-b-new")
|
||||
@file:JsModule("./js-module-b-new.mjs")
|
||||
|
||||
external fun externalDemoFunction(): Int
|
||||
|
||||
Reference in New Issue
Block a user