diff options
author | Yun Peng <pcloudy@google.com> | 2016-06-15 10:00:55 +0000 |
---|---|---|
committer | Yue Gan <yueg@google.com> | 2016-06-15 14:49:20 +0000 |
commit | ce79c8170a723e9e21407f891c92f2730e272f78 (patch) | |
tree | 3d6f1549693d71e8bea233630e2020ab9a23c451 /examples/java-native/src/test/java/com/example/myproject/TestCustomGreeting.java | |
parent | 3c18cd05f9eb573cf1b153da97fd42d1b380b6c7 (diff) |
Make bazel test work on Windows
bazel test now works for java native example tests, but most of
Bazel's java_test still fail on Windows due to other reasons.
--
Change-Id: Ie4ab6570b294815b9e06dd9bbd0cb7a48eb6ed11
Reviewed-on: https://bazel-review.googlesource.com/#/c/3810
MOS_MIGRATED_REVID=124932604
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.java | 4 |
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()); } } |