From 796792592022092feb21f4f3c291f3292b036b12 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 10 Aug 2010 21:30:05 +0000 Subject: [PATCH] More types! git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6111 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/io/StreamableTest.java | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/src/java/com/threerings/io/StreamableTest.java b/tests/src/java/com/threerings/io/StreamableTest.java index bbcac204f..2e651f21a 100644 --- a/tests/src/java/com/threerings/io/StreamableTest.java +++ b/tests/src/java/com/threerings/io/StreamableTest.java @@ -55,6 +55,24 @@ public class StreamableTest public float float1 = Float.MAX_VALUE; public double double1 = Double.MAX_VALUE; + public Boolean boxedBool = true; + public Byte boxedByte = Byte.MAX_VALUE; + public Character boxedChar = 'a'; + public Short boxedShort = Short.MAX_VALUE; + public Integer boxedInt = Integer.MAX_VALUE; + public Long boxedLong = Long.MAX_VALUE; + public Float boxedFloat = Float.MAX_VALUE; + public Double boxedDouble = Double.MAX_VALUE; + + public Boolean nullBoxedBool; + public Byte nullBoxedByte; + public Character nullBoxedChar; + public Short nullBoxedShort; + public Integer nullBoxedInt; + public Long nullBoxedLong; + public Float nullBoxedFloat; + public Double nullBoxedDouble; + public String string1 = "one"; public String nullString1; @@ -104,6 +122,24 @@ public class StreamableTest float1 == ow.float1 && double1 == ow.double1 && + Objects.equal(boxedBool, ow.boxedBool) && + Objects.equal(boxedByte, ow.boxedByte) && + Objects.equal(boxedShort, ow.boxedShort) && + Objects.equal(boxedChar, ow.boxedChar) && + Objects.equal(boxedInt, ow.boxedInt) && + Objects.equal(boxedLong, ow.boxedLong) && + Objects.equal(boxedFloat, ow.boxedFloat) && + Objects.equal(boxedDouble, ow.boxedDouble) && + + Objects.equal(nullBoxedBool, ow.nullBoxedBool) && + Objects.equal(nullBoxedByte, ow.nullBoxedByte) && + Objects.equal(nullBoxedShort, ow.nullBoxedShort) && + Objects.equal(nullBoxedChar, ow.nullBoxedChar) && + Objects.equal(nullBoxedInt, ow.nullBoxedInt) && + Objects.equal(nullBoxedLong, ow.nullBoxedLong) && + Objects.equal(nullBoxedFloat, ow.nullBoxedFloat) && + Objects.equal(nullBoxedDouble, ow.nullBoxedDouble) && + Objects.equal(string1, ow.string1) && Objects.equal(nullString1, ow.nullString1) && @@ -285,5 +321,5 @@ public class StreamableTest assertEquals(tup, otup); } - protected static final byte[] WIRE_DATA = {-1, -1, 0, 39, 99, 111, 109, 46, 116, 104, 114, 101, 101, 114, 105, 110, 103, 115, 46, 105, 111, 46, 83, 116, 114, 101, 97, 109, 97, 98, 108, 101, 84, 101, 115, 116, 36, 87, 105, 100, 103, 101, 116, 1, 127, 0, 97, 127, -1, 127, -1, -1, -1, 127, -1, -1, -1, -1, -1, -1, -1, 127, 127, -1, -1, 127, -17, -1, -1, -1, -1, -1, -1, 1, 0, 3, 111, 110, 101, 0, 1, 0, 0, 0, 3, 1, 0, 1, 1, 0, 0, 0, 3, 127, 2, 3, 1, 0, 0, 0, 3, 127, -1, 0, 2, 0, 3, 1, 0, 0, 0, 3, 0, 97, 0, 98, 0, 99, 1, 0, 0, 0, 3, 127, -1, -1, -1, 0, 0, 0, 2, 0, 0, 0, 3, 1, 0, 0, 0, 3, 127, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 3, 127, 127, -1, -1, 64, 0, 0, 0, 64, 64, 0, 0, 1, 0, 0, 0, 3, 127, -17, -1, -1, -1, -1, -1, -1, 64, 0, 0, 0, 0, 0, 0, 0, 64, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -2, 0, 39, 99, 111, 109, 46, 116, 104, 114, 101, 101, 114, 105, 110, 103, 115, 46, 105, 111, 46, 83, 116, 114, 101, 97, 109, 97, 98, 108, 101, 84, 101, 115, 116, 36, 87, 111, 99, 107, 101, 116, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, -1, -3, 0, 42, 91, 76, 99, 111, 109, 46, 116, 104, 114, 101, 101, 114, 105, 110, 103, 115, 46, 105, 111, 46, 83, 116, 114, 101, 97, 109, 97, 98, 108, 101, 84, 101, 115, 116, 36, 87, 111, 99, 107, 101, 116, 59, 0, 0, 0, 2, 0, 2, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, 0, 2, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, -1, -4, 0, 42, 91, 76, 99, 111, 109, 46, 116, 104, 114, 101, 101, 114, 105, 110, 103, 115, 46, 105, 111, 46, 83, 116, 114, 101, 97, 109, 97, 98, 108, 101, 84, 101, 115, 116, 36, 87, 105, 99, 107, 101, 116, 59, 0, 0, 0, 3, 0, 1, 7, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, 0, 0, 0, 19, 0, 0, 0, 19, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, 0, 0, 0, 19, 0, 0, 0, 19, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, -1, -5, 0, 19, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 65, 114, 114, 97, 121, 76, 105, 115, 116, 0, 0, 0, 3, -1, -6, 0, 17, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 73, 110, 116, 101, 103, 101, 114, 0, 0, 0, 1, 0, 6, 0, 0, 0, 2, 0, 6, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 3, 0, 6, 0, 0, 0, 3, 0, 6, 0, 0, 0, 2, 0, 6, 0, 0, 0, 1, 0}; + protected static final byte[] WIRE_DATA = {-1, -1, 0, 39, 99, 111, 109, 46, 116, 104, 114, 101, 101, 114, 105, 110, 103, 115, 46, 105, 111, 46, 83, 116, 114, 101, 97, 109, 97, 98, 108, 101, 84, 101, 115, 116, 36, 87, 105, 100, 103, 101, 116, 1, 127, 0, 97, 127, -1, 127, -1, -1, -1, 127, -1, -1, -1, -1, -1, -1, -1, 127, 127, -1, -1, 127, -17, -1, -1, -1, -1, -1, -1, 1, 1, 1, 127, 1, 0, 97, 1, 127, -1, 1, 127, -1, -1, -1, 1, 127, -1, -1, -1, -1, -1, -1, -1, 1, 127, 127, -1, -1, 1, 127, -17, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 111, 110, 101, 0, 1, 0, 0, 0, 3, 1, 0, 1, 1, 0, 0, 0, 3, 127, 2, 3, 1, 0, 0, 0, 3, 127, -1, 0, 2, 0, 3, 1, 0, 0, 0, 3, 0, 97, 0, 98, 0, 99, 1, 0, 0, 0, 3, 127, -1, -1, -1, 0, 0, 0, 2, 0, 0, 0, 3, 1, 0, 0, 0, 3, 127, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 3, 127, 127, -1, -1, 64, 0, 0, 0, 64, 64, 0, 0, 1, 0, 0, 0, 3, 127, -17, -1, -1, -1, -1, -1, -1, 64, 0, 0, 0, 0, 0, 0, 0, 64, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -2, 0, 39, 99, 111, 109, 46, 116, 104, 114, 101, 101, 114, 105, 110, 103, 115, 46, 105, 111, 46, 83, 116, 114, 101, 97, 109, 97, 98, 108, 101, 84, 101, 115, 116, 36, 87, 111, 99, 107, 101, 116, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, -1, -3, 0, 42, 91, 76, 99, 111, 109, 46, 116, 104, 114, 101, 101, 114, 105, 110, 103, 115, 46, 105, 111, 46, 83, 116, 114, 101, 97, 109, 97, 98, 108, 101, 84, 101, 115, 116, 36, 87, 111, 99, 107, 101, 116, 59, 0, 0, 0, 2, 0, 2, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, 0, 2, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, -1, -4, 0, 42, 91, 76, 99, 111, 109, 46, 116, 104, 114, 101, 101, 114, 105, 110, 103, 115, 46, 105, 111, 46, 83, 116, 114, 101, 97, 109, 97, 98, 108, 101, 84, 101, 115, 116, 36, 87, 105, 99, 107, 101, 116, 59, 0, 0, 0, 3, 0, 1, 7, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, 0, 0, 0, 19, 0, 0, 0, 19, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, 0, 0, 0, 19, 0, 0, 0, 19, 15, 127, -1, 64, 9, 33, -5, 84, 68, 45, 24, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, -1, -5, 0, 19, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 65, 114, 114, 97, 121, 76, 105, 115, 116, 0, 0, 0, 3, -1, -6, 0, 17, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 73, 110, 116, 101, 103, 101, 114, 0, 0, 0, 1, 0, 6, 0, 0, 0, 2, 0, 6, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 3, 0, 6, 0, 0, 0, 3, 0, 6, 0, 0, 0, 2, 0, 6, 0, 0, 0, 1, 0}; }