You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by du...@apache.org on 2007/03/01 16:16:39 UTC
svn commit: r513379 - in
/webservices/axis/trunk/proposals/dug/java/test/types:
TestUnsignedByte.java TestUnsignedInt.java TestUnsignedLong.java
TestUnsignedShort.java
Author: dug
Date: Thu Mar 1 07:16:38 2007
New Revision: 513379
URL: http://svn.apache.org/viewvc?view=rev&rev=513379
Log:
sync with head
Modified:
webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedByte.java
webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedInt.java
webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedLong.java
webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedShort.java
Modified: webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedByte.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedByte.java?view=diff&rev=513379&r1=513378&r2=513379
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedByte.java (original)
+++ webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedByte.java Thu Mar 1 07:16:38 2007
@@ -92,4 +92,24 @@
public void testMinExclusive() throws Exception {
runPassTest(0L);
}
+
+ public void testCompareTo() throws Exception {
+ UnsignedByte v1, v2;
+
+ v1 = new UnsignedByte(100);
+ v2 = new UnsignedByte(200);
+
+ assertTrue(v1.compareTo(v2) < 0);
+ assertTrue(v2.compareTo(v1) > 0);
+
+ v2 = new UnsignedByte(100);
+
+ assertTrue(v1.compareTo(v2) == 0);
+ assertTrue(v2.compareTo(v1) == 0);
+
+ v2 = v1;
+
+ assertTrue(v1.compareTo(v2) == 0);
+ }
+
}
Modified: webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedInt.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedInt.java?view=diff&rev=513379&r1=513378&r2=513379
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedInt.java (original)
+++ webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedInt.java Thu Mar 1 07:16:38 2007
@@ -93,4 +93,23 @@
runPassTest(0L);
}
+ public void testCompareTo() throws Exception {
+ UnsignedInt v1, v2;
+
+ v1 = new UnsignedInt(500);
+ v2 = new UnsignedInt(600);
+
+ assertTrue(v1.compareTo(v2) < 0);
+ assertTrue(v2.compareTo(v1) > 0);
+
+ v2 = new UnsignedInt(500);
+
+ assertTrue(v1.compareTo(v2) == 0);
+ assertTrue(v2.compareTo(v1) == 0);
+
+ v2 = v1;
+
+ assertTrue(v1.compareTo(v2) == 0);
+ }
+
}
Modified: webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedLong.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedLong.java?view=diff&rev=513379&r1=513378&r2=513379
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedLong.java (original)
+++ webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedLong.java Thu Mar 1 07:16:38 2007
@@ -94,4 +94,24 @@
public void testMinExclusive() throws Exception {
runPassTest(BigInteger.ZERO, "0");
}
+
+ public void testCompareTo() throws Exception {
+ UnsignedLong v1, v2;
+
+ v1 = new UnsignedLong(500);
+ v2 = new UnsignedLong(600);
+
+ assertTrue(v1.compareTo(v2) < 0);
+ assertTrue(v2.compareTo(v1) > 0);
+
+ v2 = new UnsignedLong(500);
+
+ assertTrue(v1.compareTo(v2) == 0);
+ assertTrue(v2.compareTo(v1) == 0);
+
+ v2 = v1;
+
+ assertTrue(v1.compareTo(v2) == 0);
+ }
+
}
Modified: webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedShort.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedShort.java?view=diff&rev=513379&r1=513378&r2=513379
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedShort.java (original)
+++ webservices/axis/trunk/proposals/dug/java/test/types/TestUnsignedShort.java Thu Mar 1 07:16:38 2007
@@ -92,4 +92,24 @@
public void testMinExclusive() throws Exception {
runPassTest(0L);
}
+
+ public void testCompareTo() throws Exception {
+ UnsignedShort v1, v2;
+
+ v1 = new UnsignedShort(500);
+ v2 = new UnsignedShort(600);
+
+ assertTrue(v1.compareTo(v2) < 0);
+ assertTrue(v2.compareTo(v1) > 0);
+
+ v2 = new UnsignedShort(500);
+
+ assertTrue(v1.compareTo(v2) == 0);
+ assertTrue(v2.compareTo(v1) == 0);
+
+ v2 = v1;
+
+ assertTrue(v1.compareTo(v2) == 0);
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org