tests/libjava/src/stx/libjava/tests/lib/java/net/InetAddressTests.java
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 28 Aug 2013 09:16:36 +0100
branchdevelopment
changeset 2674 8b3736c87626
child 3184 3611c3493dbc
permissions -rw-r--r--
Added InetAddressTests to cover different layouts in different OpenJDK 6. There seems to be at least two different clas layouts for Inet4Address and Inet6Address. This testcase should test whether native methods handle both layouts correctly.

package stx.libjava.tests.lib.java.net;

import static org.junit.Assert.*;

import java.net.InetAddress;
import java.net.UnknownHostException;

import org.junit.Test;

public class InetAddressTests {

    @Test
    public void test() {
        try {
            InetAddress addr = InetAddress.getLocalHost();
            addr.getAddress();
        } catch (UnknownHostException e) {
            // TODO Auto-generated catch block
            assertTrue(false);
        }
        
    }

}