diff options
author | Elliott Hughes <enh@google.com> | 2011-05-24 13:50:13 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-05-24 13:50:13 -0700 |
commit | 548d2e6ef6d2f4334a488cac591d11e60675111a (patch) | |
tree | df655832b15954c298032bfbe739fb22165f56ee /luni | |
parent | 8bc9296d071a77994b6418df2edb120d6a9f70ac (diff) | |
download | libcore-548d2e6ef6d2f4334a488cac591d11e60675111a.zip libcore-548d2e6ef6d2f4334a488cac591d11e60675111a.tar.gz libcore-548d2e6ef6d2f4334a488cac591d11e60675111a.tar.bz2 |
Remove two tests that are duplicated in the Harmony suite.
(And a spurious blank line from ThreadGroup.)
Change-Id: I3cb1ccb94a8352937d221a141a598ffe4696b06e
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/java/lang/ThreadGroup.java | 1 | ||||
-rw-r--r-- | luni/src/test/java/libcore/java/net/OldDatagramSocketTest.java | 72 |
2 files changed, 0 insertions, 73 deletions
diff --git a/luni/src/main/java/java/lang/ThreadGroup.java b/luni/src/main/java/java/lang/ThreadGroup.java index d0e593f..e99e99f 100644 --- a/luni/src/main/java/java/lang/ThreadGroup.java +++ b/luni/src/main/java/java/lang/ThreadGroup.java @@ -75,7 +75,6 @@ public class ThreadGroup implements Thread.UncaughtExceptionHandler { * @param name the name * @see Thread#currentThread */ - public ThreadGroup(String name) { this(Thread.currentThread().getThreadGroup(), name); } diff --git a/luni/src/test/java/libcore/java/net/OldDatagramSocketTest.java b/luni/src/test/java/libcore/java/net/OldDatagramSocketTest.java index 1958256..0b4009c 100644 --- a/luni/src/test/java/libcore/java/net/OldDatagramSocketTest.java +++ b/luni/src/test/java/libcore/java/net/OldDatagramSocketTest.java @@ -712,33 +712,6 @@ public class OldDatagramSocketTest extends junit.framework./*Socket*/TestCase { } - public void test_getLocalAddress() { - // Test for method java.net.InetAddress - // java.net.DatagramSocket.getLocalAddress() - InetAddress local = null; - try { - int portNumber = Support_PortManager.getNextPortForUDP(); - local = InetAddress.getLocalHost(); - ds = new java.net.DatagramSocket(portNumber, local); - assertTrue("Returned incorrect address. Got:" - + ds.getLocalAddress() - + " wanted: " - + InetAddress.getByName(InetAddress.getLocalHost() - .getHostName()), InetAddress.getByName( - InetAddress.getLocalHost().getHostName()).equals( - ds.getLocalAddress())); - - // now check behavior when the ANY address is returned - DatagramSocket s = new DatagramSocket(0); - assertTrue("ANY address not IPv6: " + s.getLocalSocketAddress(), - s.getLocalAddress() instanceof Inet6Address); - s.close(); - } catch (Exception e) { - fail( - "Exception during getLocalAddress: " + local + " - " + e); - } - } - public void test_getLocalPort() { // Test for method int java.net.DatagramSocket.getLocalPort() try { @@ -1805,51 +1778,6 @@ public class OldDatagramSocketTest extends junit.framework./*Socket*/TestCase { } } - public void test_getLocalSocketAddress() throws Exception { - int portNumber = Support_PortManager.getNextPortForUDP(); - DatagramSocket s = new DatagramSocket(new InetSocketAddress( - InetAddress.getLocalHost(), portNumber)); - assertTrue("Returned incorrect InetSocketAddress(1):" - + s.getLocalSocketAddress().toString() - + "Expected: " - + (new InetSocketAddress(InetAddress.getLocalHost(), - portNumber)).toString(), s.getLocalSocketAddress() - .equals( - new InetSocketAddress(InetAddress.getLocalHost(), - portNumber))); - s.close(); - - InetSocketAddress remoteAddress = (InetSocketAddress) s - .getRemoteSocketAddress(); - - // now create a socket that is not bound and validate we get the - // right answer - DatagramSocket theSocket = new DatagramSocket((SocketAddress) null); - assertNull( - "Returned incorrect InetSocketAddress -unbound socket- Expected null", - theSocket.getLocalSocketAddress()); - - // now bind the socket and make sure we get the right answer - portNumber = Support_PortManager.getNextPortForUDP(); - theSocket.bind(new InetSocketAddress(InetAddress.getLocalHost(), - portNumber)); - assertTrue("Returned incorrect InetSocketAddress(2):" - + theSocket.getLocalSocketAddress().toString() - + "Expected: " - + (new InetSocketAddress(InetAddress.getLocalHost(), - portNumber)).toString(), theSocket - .getLocalSocketAddress().equals( - new InetSocketAddress(InetAddress.getLocalHost(), - portNumber))); - theSocket.close(); - - // now check behavior when the ANY address is returned - s = new DatagramSocket(0); - assertTrue("ANY address not IPv6: " + s.getLocalSocketAddress(), - ((InetSocketAddress) s.getLocalSocketAddress()).getAddress() instanceof Inet6Address); - s.close(); - } - public void test_setReuseAddressZ() throws Exception { // test case were we set it to false DatagramSocket theSocket1 = null; |