mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-03 05:09:22 +08:00
Fix tests
This commit is contained in:
parent
629226553c
commit
7c87f2869b
@ -30,6 +30,8 @@ class DebugLoggerTest : AbstractTest() {
|
|||||||
JCE_DESERIALIZER_DEBUG = true
|
JCE_DESERIALIZER_DEBUG = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun String.uniteLine(): String = replace("\r\n", "\n").replace("\r", "\n")
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Struct(
|
data class Struct(
|
||||||
@TarsId(1) val str: String,
|
@TarsId(1) val str: String,
|
||||||
@ -53,7 +55,7 @@ class DebugLoggerTest : AbstractTest() {
|
|||||||
name=int
|
name=int
|
||||||
decodeElementIndex: currentHead == null
|
decodeElementIndex: currentHead == null
|
||||||
endStructure: net.mamoe.mirai.internal.utils.io.serialization.tars.internal.DebugLoggerTest.Struct, null, null
|
endStructure: net.mamoe.mirai.internal.utils.io.serialization.tars.internal.DebugLoggerTest.Struct, null, null
|
||||||
""".trimIndent(), out.toByteArray().decodeToString().trim()
|
""".trimIndent(), out.toByteArray().decodeToString().trim().uniteLine()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +77,8 @@ class DebugLoggerTest : AbstractTest() {
|
|||||||
decodeElementIndex: TarsHead(tag=1, type=6(String1))
|
decodeElementIndex: TarsHead(tag=1, type=6(String1))
|
||||||
name=str
|
name=str
|
||||||
decodeElementIndex: TarsHead(tag=3, type=0(Byte))
|
decodeElementIndex: TarsHead(tag=3, type=0(Byte))
|
||||||
""".trimIndent(), exception.message!!.trim()
|
skipping Byte
|
||||||
|
""".trimIndent().trim(), exception.message!!.trim().uniteLine()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user