aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/java-native/src/test/java/com/example/myproject/TestCustomGreeting.java
diff options
context:
space:
mode:
Diffstat (limited to 'examples/java-native/src/test/java/com/example/myproject/TestCustomGreeting.java')
-rw-r--r--examples/java-native/src/test/java/com/example/myproject/TestCustomGreeting.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/java-native/src/test/java/com/example/myproject/TestCustomGreeting.java b/examples/java-native/src/test/java/com/example/myproject/TestCustomGreeting.java
index f14b7d234a..7bc55fc643 100644
--- a/examples/java-native/src/test/java/com/example/myproject/TestCustomGreeting.java
+++ b/examples/java-native/src/test/java/com/example/myproject/TestCustomGreeting.java
@@ -18,7 +18,7 @@ public class TestCustomGreeting {
ByteArrayOutputStream out = new ByteArrayOutputStream();
Greeter.out = new PrintStream(out);
Greeter.main();
- assertEquals("Bye world\n", new String(out.toByteArray(), StandardCharsets.UTF_8));
+ assertEquals("Bye world", new String(out.toByteArray(), StandardCharsets.UTF_8).trim());
}
@Test
@@ -26,7 +26,7 @@ public class TestCustomGreeting {
ByteArrayOutputStream out = new ByteArrayOutputStream();
Greeter.out = new PrintStream(out);
Greeter.main("toto");
- assertEquals("Bye toto\n", new String(out.toByteArray(), StandardCharsets.UTF_8));
+ assertEquals("Bye toto", new String(out.toByteArray(), StandardCharsets.UTF_8).trim());
}
}