Skip to content

Commit

Permalink
Fix some unit test failure (apache#3337)
Browse files Browse the repository at this point in the history
  • Loading branch information
kexianjun authored and ralf0131 committed Jan 27, 2019
1 parent 21046c8 commit 2308a36
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public void test1() {
});

String kv = tKv.rendering();
assertThat(kv, containsString("ABCDEFGHIJ\n"));
assertThat(kv, containsString("KLMNOPQRST\n"));
assertThat(kv, containsString("UVWXYZ\n"));
assertThat(kv, containsString("ABCDEFGHIJ" + System.lineSeparator()));
assertThat(kv, containsString("KLMNOPQRST" + System.lineSeparator()));
assertThat(kv, containsString("UVWXYZ" + System.lineSeparator()));

tTable.addRow("OPTIONS", kv);
String table = tTable.rendering();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public void testRendering() throws Exception {
ladder.addItem("3");
ladder.addItem("4");
String result = ladder.rendering();
String expected = "1\n" +
" `-2\n" +
" `-3\n" +
" `-4\n";
String expected = "1" + System.lineSeparator() +
" `-2" + System.lineSeparator() +
" `-3" + System.lineSeparator() +
" `-4" + System.lineSeparator();
assertThat(result, equalTo(expected));
System.out.println(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public void test1() throws Exception {
table.addRow(1, "one", "uno", "un");
table.addRow(2, "two", "dos", "deux");
String result = table.rendering();
String expected = "+-+---+---+----+\n" +
"|1|one|uno|un |\n" +
"+-+---+---+----+\n" +
"|2|two|dos|deux|\n" +
"+-+---+---+----+\n";
String expected = "+-+---+---+----+" + System.lineSeparator() +
"|1|one|uno|un |" + System.lineSeparator() +
"+-+---+---+----+" + System.lineSeparator() +
"|2|two|dos|deux|" + System.lineSeparator() +
"+-+---+---+----+" + System.lineSeparator();
assertThat(result, equalTo(expected));
System.out.println(result);
}
Expand All @@ -46,9 +46,9 @@ public void test2() throws Exception {
});
table.addRow(1, "abcde", "ABCDE");
String result = table.rendering();
String expected = "+-+----------+----------+\n" +
"|1| abcde | ABCDE|\n" +
"+-+----------+----------+\n";
String expected = "+-+----------+----------+" + System.lineSeparator() +
"|1| abcde | ABCDE|" + System.lineSeparator() +
"+-+----------+----------+" + System.lineSeparator();
assertThat(result, equalTo(expected));
System.out.println(result);
}
Expand Down

0 comments on commit 2308a36

Please sign in to comment.