Fixes to tests: forgotten package names and tests
This commit is contained in:
@@ -1265,7 +1265,7 @@ task link(type: LinkKonanTest) {
|
||||
goldValue = "0\n"
|
||||
source = "link/src/bar.kt"
|
||||
lib = "link/lib"
|
||||
}
|
||||
}(
|
||||
*/
|
||||
|
||||
task link_omit_unused(type: LinkKonanTest) {
|
||||
@@ -1274,7 +1274,7 @@ task link_omit_unused(type: LinkKonanTest) {
|
||||
lib = "link/omit/lib.kt"
|
||||
}
|
||||
|
||||
task link_default_libs(type: RunKonanTest) {
|
||||
task link_default_libs(type: RunStandaloneKonanTest) {
|
||||
disabled = (project.testTarget == 'wasm32') // there will be no posix.klib for wasm
|
||||
goldValue = "sizet = 0\n"
|
||||
source = "link/default/default.kt"
|
||||
@@ -1761,17 +1761,17 @@ task lambda13(type: RunKonanTest) {
|
||||
|
||||
task objectExpression1(type: RunKonanTest) {
|
||||
goldValue = "aabb\n"
|
||||
source = "codegen/objectExpression/1.kt"
|
||||
source = "codegen/objectExpression/expr1.kt"
|
||||
}
|
||||
|
||||
task objectExpression2(type: RunKonanTest) {
|
||||
goldValue = "a\n"
|
||||
source = "codegen/objectExpression/2.kt"
|
||||
source = "codegen/objectExpression/expr2.kt"
|
||||
}
|
||||
|
||||
task objectExpression3(type: RunKonanTest) {
|
||||
goldValue = "\n1\n2\n"
|
||||
source = "codegen/objectExpression/3.kt"
|
||||
source = "codegen/objectExpression/expr3.kt"
|
||||
}
|
||||
|
||||
task initializers2(type: RunStandaloneKonanTest) {
|
||||
@@ -1841,7 +1841,7 @@ task memory_cycles0(type: RunKonanTest) {
|
||||
source = "runtime/memory/cycles0.kt"
|
||||
}
|
||||
|
||||
task memory_basic0(type: RunStandaloneKonanTest) {
|
||||
task memory_basic0(type: RunKonanTest) {
|
||||
source = "runtime/memory/basic0.kt"
|
||||
}
|
||||
|
||||
@@ -2036,7 +2036,7 @@ task deserialized_members(type: LinkKonanTest) {
|
||||
source = "serialization/deserialize_members.kt"
|
||||
}
|
||||
|
||||
task testing_annotations(type: RunKonanTest) {
|
||||
task testing_annotations(type: RunStandaloneKonanTest) {
|
||||
source = "testing/annotations.kt"
|
||||
flags = ['-tr']
|
||||
arguments = ['--ktest_logger=SIMPLE']
|
||||
@@ -2062,14 +2062,14 @@ task testing_annotations(type: RunKonanTest) {
|
||||
'Test suite finished: kotlin.test.tests.AnnotationsKt\nIteration finished: 1\nTesting finished\n'
|
||||
}
|
||||
|
||||
task testing_assertions(type: RunKonanTest) {
|
||||
task testing_assertions(type: RunStandaloneKonanTest) {
|
||||
source = "testing/assertions.kt"
|
||||
flags = ['-tr']
|
||||
expectedFail = (project.testTarget == 'wasm32') // Uses exceptions.
|
||||
expectedExitStatus = 0
|
||||
}
|
||||
|
||||
task testing_custom_main(type: RunKonanTest) {
|
||||
task testing_custom_main(type: RunStandaloneKonanTest) {
|
||||
source = "testing/custom_main.kt"
|
||||
flags = ['-tr', '-e', 'kotlin.test.tests.main']
|
||||
arguments = ['--ktest_logger=SIMPLE', '--ktest_repeat=2']
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.advanced_when2
|
||||
package codegen.branching.advanced_when2
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.advanced_when5
|
||||
package codegen.branching.advanced_when5
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.if_else
|
||||
package codegen.branching.if_else
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.when2
|
||||
package codegen.branching.when2
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.when4
|
||||
package codegen.branching.when4
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.when5
|
||||
package codegen.branching.when5
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.when6
|
||||
package codegen.branching.when6
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.when7
|
||||
package codegen.branching.when7
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.when8
|
||||
package codegen.branching.when8
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.when9
|
||||
package codegen.branching.when9
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package codegen.boxing.when_through
|
||||
package codegen.branching.when_through
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ fun main(args: Array<String>) {
|
||||
checkClass(Any::class, "kotlin.Any", "Any", Any(), null)
|
||||
checkClass(Int::class, "kotlin.Int", "Int", 42, "17")
|
||||
checkClass(String::class, "kotlin.String", "String", "17", 42)
|
||||
checkClass(RootClass::class, "RootClass", "RootClass", RootClass(), Any())
|
||||
checkClass(RootClass.Nested::class, "RootClass.Nested", "Nested", RootClass.Nested(), Any())
|
||||
checkClass(RootClass::class, "codegen.kclass.kclass0.RootClass", "RootClass", RootClass(), Any())
|
||||
checkClass(RootClass.Nested::class, "codegen.kclass.kclass0.RootClass.Nested", "Nested", RootClass.Nested(), Any())
|
||||
|
||||
class Local {
|
||||
val captured = args
|
||||
@@ -33,7 +33,7 @@ fun main(args: Array<String>) {
|
||||
|
||||
// Interfaces:
|
||||
checkClass(Comparable::class, "kotlin.Comparable", "Comparable", 42, Any())
|
||||
checkClass(Interface::class, "Interface", "Interface", object : Interface {}, Any())
|
||||
checkClass(Interface::class, "codegen.kclass.kclass0.Interface", "Interface", object : Interface {}, Any())
|
||||
|
||||
checkInstanceClass(Any(), Any::class)
|
||||
checkInstanceClass(42, Int::class)
|
||||
|
||||
@@ -40,9 +40,9 @@ class App(testQualified: Boolean) {
|
||||
}
|
||||
|
||||
init {
|
||||
assert(type.simpleName == "Test")
|
||||
assert(type.simpleName == "TestClass")
|
||||
if (testQualified)
|
||||
assert(type.qualifiedName == "com.github.salomonbrys.kmffkn.Test") // This is not really necessary, but always better :).
|
||||
assert(type.qualifiedName == "codegen.kclass.kclass1.TestClass") // This is not really necessary, but always better :).
|
||||
|
||||
assert(String::class == String::class)
|
||||
assert(String::class != Int::class)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package codegen.objectExpression_1
|
||||
package codegen.objectExpression.expr1
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
package codegen.objectExpression_2
|
||||
|
||||
package codegen.objectExpression.expr2
|
||||
import kotlin.test.*
|
||||
|
||||
@Test fun runTest() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package codegen.objectExpression_3
|
||||
package codegen.objectExpression.expr3
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
fun main(args: Array<String>) {
|
||||
package runtime.basic.main_exception
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@Test fun runTest() {
|
||||
throw Error("Hello!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user