directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r291311 - /directory/asn1/trunk/ber-new/src/test/org/apache/asn1new/primitives/PrimitivesTest.java
Date Sat, 24 Sep 2005 15:26:53 GMT
Author: elecharny
Date: Sat Sep 24 08:26:48 2005
New Revision: 291311

URL: http://svn.apache.org/viewcvs?rev=291311&view=rev
Log:
Fixed the test according to the modification made in the IntegerDecoder

Modified:
    directory/asn1/trunk/ber-new/src/test/org/apache/asn1new/primitives/PrimitivesTest.java

Modified: directory/asn1/trunk/ber-new/src/test/org/apache/asn1new/primitives/PrimitivesTest.java
URL: http://svn.apache.org/viewcvs/directory/asn1/trunk/ber-new/src/test/org/apache/asn1new/primitives/PrimitivesTest.java?rev=291311&r1=291310&r2=291311&view=diff
==============================================================================
--- directory/asn1/trunk/ber-new/src/test/org/apache/asn1new/primitives/PrimitivesTest.java
(original)
+++ directory/asn1/trunk/ber-new/src/test/org/apache/asn1new/primitives/PrimitivesTest.java
Sat Sep 24 08:26:48 2005
@@ -64,7 +64,7 @@
 
             value.init(1);
             value.setData( new byte[] { ( byte ) 0xFF } ); // res = 255
-            Assert.assertEquals( 255, IntegerDecoder.parse( value ) );
+            Assert.assertEquals( -1, IntegerDecoder.parse( value ) );
             value.reset();
 
             value.init(2);
@@ -92,15 +92,9 @@
             Assert.assertEquals( 512, IntegerDecoder.parse( value ) );
             value.reset();
 
-            value.init(2);
-            value.setData( new byte[] { ( byte ) 0xFF, ( byte ) 0xFF } ); // res = 65535
+            value.init(3);
+            value.setData( new byte[] { 0x00, ( byte ) 0xFF, ( byte ) 0xFF } ); // res =
65535
             Assert.assertEquals( 65535, IntegerDecoder.parse( value ) );
-            value.reset();
-
-            value.init(4);
-            value.setData(
-                new byte[] { ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF }
); // res = 2^32 - 1 = -1
-            Assert.assertEquals( -1, IntegerDecoder.parse( value ) );
             value.reset();
 
             value.init(4);



Mime
View raw message