mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WI-46570 fix test
GitOrigin-RevId: 34b79fd7f90c6750a12a41c06cfdc018e8be6718
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f4ed78c8f5
commit
f04f93df18
+9
-5
@@ -8,9 +8,13 @@ import org.junit.Test
|
||||
|
||||
|
||||
class LongLineCutterTest {
|
||||
private fun createMessage(attrs:Map<String, String>) = ServiceMessage.asString(
|
||||
"myMessage",
|
||||
attrs + mapOf("name" to "testFailed")
|
||||
)
|
||||
@Test
|
||||
fun shortMessageUntouched() {
|
||||
val message = ServiceMessage.asString("foo", mapOf(
|
||||
val message = createMessage(mapOf(
|
||||
"A" to "B",
|
||||
"Z" to "Q"
|
||||
))
|
||||
@@ -27,10 +31,10 @@ class LongLineCutterTest {
|
||||
@Test
|
||||
fun actualExpectedShort() {
|
||||
val maxLength = 1000
|
||||
val message = ServiceMessage.asString("testFailed", mapOf(
|
||||
val message = createMessage(mapOf(
|
||||
"expected" to "A".repeat(maxLength * 2),
|
||||
"actual" to "B"
|
||||
));
|
||||
))
|
||||
val result = ServiceMessage.parse(cutLineIfTooLong(message, maxLength, 10))!!
|
||||
|
||||
val actual = result.attributes["actual"]!!
|
||||
@@ -46,7 +50,7 @@ class LongLineCutterTest {
|
||||
@Test
|
||||
fun actualExpectedLong() {
|
||||
val maxLength = 1000
|
||||
val message = ServiceMessage.asString("testFailed", mapOf(
|
||||
val message = createMessage(mapOf(
|
||||
"expected" to "A".repeat(maxLength * 2),
|
||||
"actual" to "B".repeat(maxLength * 2)
|
||||
));
|
||||
@@ -70,7 +74,7 @@ class LongLineCutterTest {
|
||||
val maxLength = 10000
|
||||
val s = "abc\r\n"
|
||||
val longString = s.repeat(maxLength * 2)
|
||||
val message = ServiceMessage.asString("foo", mapOf(
|
||||
val message = createMessage(mapOf(
|
||||
"A" to "B",
|
||||
"C" to "D",
|
||||
"Z" to longString
|
||||
|
||||
Reference in New Issue
Block a user