Added test to check fields deserialization from caches (#4540)
This commit is contained in:
committed by
Stanislav Erokhin
parent
2953fb3970
commit
63b1aad3ef
@@ -3283,6 +3283,10 @@ task deserialized_listof0(type: KonanLocalTest) {
|
||||
source = "serialization/deserialized_listof0.kt"
|
||||
}
|
||||
|
||||
task deserialized_fields(type: KonanLocalTest) {
|
||||
source = "serialization/deserialized_fields.kt"
|
||||
}
|
||||
|
||||
task genKt39548 {
|
||||
doFirst {
|
||||
GenTestKT39548Kt.genTestKT39548(file("$buildDir/kt39548/kt39548.kt"))
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
package serialization.deserialized_fields
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class CustomThrowable(val extraInfo: String): Throwable("Some message", null)
|
||||
|
||||
@Test fun runTest() {
|
||||
val custom = CustomThrowable("Extra info")
|
||||
assertEquals(custom.extraInfo, "Extra info")
|
||||
assertEquals(custom.message, "Some message")
|
||||
assertEquals(custom.cause, null)
|
||||
}
|
||||
Reference in New Issue
Block a user