commit | ffba27a8952923668821c572202380f8371139e3 | [log] [tgz] |
---|---|---|
author | Victor Chang <vichang@google.com> | Thu May 12 18:11:11 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu May 12 18:11:11 2022 +0000 |
tree | a847a3c1a1c45509d2de47f1e59cd189e999d23f | |
parent | b646fc8766d9b2a07b9877f454af736325a41b51 [diff] | |
parent | 9993b98822a79378145893dd49c0ee01a6c98e1c [diff] |
Add more test for MalformedURLException am: 8fb5c96082 am: 9993b98822 Original change: https://googleplex-android-review.googlesource.com/c/platform/libcore/+/18234478 Change-Id: Ia0844988d2af43ab4f65b91ce82c243705fc3579 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/luni/src/test/java/libcore/java/net/MalformedURLExceptionTest.java b/luni/src/test/java/libcore/java/net/MalformedURLExceptionTest.java index b9998da..b60b7b8 100644 --- a/luni/src/test/java/libcore/java/net/MalformedURLExceptionTest.java +++ b/luni/src/test/java/libcore/java/net/MalformedURLExceptionTest.java
@@ -17,6 +17,7 @@ package libcore.java.net; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import java.net.MalformedURLException; @@ -28,8 +29,12 @@ public class MalformedURLExceptionTest { @Test - public void testEmptyConstructor() { + public void testConstructor() { MalformedURLException e = new MalformedURLException(); assertNull(e.getMessage()); + + String msg = "x:yyy is not valid URL"; + e = new MalformedURLException(msg); + assertEquals(msg, e.getMessage()); } }