diff options
author | Casey Marshall <csm@gnu.org> | 2006-06-03 07:44:41 +0000 |
---|---|---|
committer | Casey Marshall <csm@gnu.org> | 2006-06-03 07:44:41 +0000 |
commit | 7c7214a9667bbc4c58c6402f3ea3d3f4dcd82d07 (patch) | |
tree | a91dc7af7365281bd58df4e2c16aabde1bd019a1 /jessie-tests/testCompressionMethodList.java | |
parent | 844789758995530a09478582a2c7d8f913185065 (diff) | |
download | classpath-7c7214a9667bbc4c58c6402f3ea3d3f4dcd82d07.tar.gz |
Add test files.
Diffstat (limited to 'jessie-tests/testCompressionMethodList.java')
-rw-r--r-- | jessie-tests/testCompressionMethodList.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/jessie-tests/testCompressionMethodList.java b/jessie-tests/testCompressionMethodList.java new file mode 100644 index 000000000..290d6b81b --- /dev/null +++ b/jessie-tests/testCompressionMethodList.java @@ -0,0 +1,42 @@ + + +import gnu.javax.net.ssl.provider.CompressionMethod; +import gnu.javax.net.ssl.provider.CompressionMethodList; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.nio.ByteBuffer; + +class testCompressionMethodList +{ + public static void main (String[] argv) + { + try + { + check (); + } + catch (Exception x) + { + System.out.println ("FAIL: uncaught exception " + x); + x.printStackTrace (); + } + } + + static void check () throws Exception + { + ByteBuffer buffer = ByteBuffer.allocate (3); + CompressionMethodList list = new CompressionMethodList (buffer); + + list.setSize (2); + list.put (0, CompressionMethod.NULL); + list.put (1, CompressionMethod.ZLIB); + + System.err.println (list); + + CompressionMethodList list2 = new CompressionMethodList (buffer); + if (list2.equals (list)) + System.out.println ("PASS: equals()"); + else + System.out.println ("FAIL: equals()"); + } +} |