directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r225422 - /directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java
Date Tue, 26 Jul 2005 23:41:11 GMT
Author: elecharny
Date: Tue Jul 26 16:41:08 2005
New Revision: 225422

URL: http://svn.apache.org/viewcvs?rev=225422&view=rev
Log:
Fixed numerous errors in PDU lengths.

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java?rev=225422&r1=225421&r2=225422&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java
Tue Jul 26 16:41:08 2005
@@ -497,11 +497,11 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x65 );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x64 );
         stream.put(
             new byte[]
             {
-                0x30, 0x63,                   // LDAPMessage ::=SEQUENCE {
+                0x30, 0x62,                   // LDAPMessage ::=SEQUENCE {
 				0x02, 0x01, 0x01, 	          //        messageID MessageID
 				0x63, 0x5D,                   //	      CHOICE { ..., searchRequest SearchRequest, ...
                         			     	  // SearchRequest ::= APPLICATION[3] SEQUENCE {
@@ -581,7 +581,7 @@
         }
         
         // Check the length
-        Assert.assertEquals(0x65, message.computeLength());
+        Assert.assertEquals(0x64, message.computeLength());
     }
 
     /**
@@ -593,11 +593,11 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x65 );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x64 );
         stream.put(
             new byte[]
             {
-                0x30, 0x63,                   // LDAPMessage ::=SEQUENCE {
+                0x30, 0x62,                   // LDAPMessage ::=SEQUENCE {
 				0x02, 0x01, 0x01, 	          //        messageID MessageID
 				0x63, 0x5D,                   //	      CHOICE { ..., searchRequest SearchRequest, ...
                         			     	  // SearchRequest ::= APPLICATION[3] SEQUENCE {
@@ -679,7 +679,7 @@
         }
         
         // Check the length
-        Assert.assertEquals(0x65, message.computeLength());
+        Assert.assertEquals(0x64, message.computeLength());
     }
 
     /**
@@ -691,11 +691,11 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x68 );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x67 );
         stream.put(
             new byte[]
             {
-                0x30, 0x66,                   // LDAPMessage ::=SEQUENCE {
+                0x30, 0x65,                   // LDAPMessage ::=SEQUENCE {
 				0x02, 0x01, 0x01, 	          //        messageID MessageID
 				0x63, 0x60,                   //	      CHOICE { ..., searchRequest SearchRequest, ...
                         			     	  // SearchRequest ::= APPLICATION[3] SEQUENCE {
@@ -778,7 +778,7 @@
         }
         
         // Check the length
-        Assert.assertEquals(0x68, message.computeLength());
+        Assert.assertEquals(0x67, message.computeLength());
     }
 
     /**
@@ -790,11 +790,11 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x6B );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x6A );
         stream.put(
             new byte[]
             {
-                0x30, 0x69,                   // LDAPMessage ::=SEQUENCE {
+                0x30, 0x68,                   // LDAPMessage ::=SEQUENCE {
 				0x02, 0x01, 0x01, 	          //        messageID MessageID
 				0x63, 0x63,                   //	      CHOICE { ..., searchRequest SearchRequest, ...
                         			     	  // SearchRequest ::= APPLICATION[3] SEQUENCE {
@@ -878,7 +878,7 @@
         }
         
         // Check the length
-        Assert.assertEquals(0x6B, message.computeLength());
+        Assert.assertEquals(0x6A, message.computeLength());
     }
 
     /**
@@ -890,11 +890,11 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x68 );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x67 );
         stream.put(
             new byte[]
             {
-                0x30, 0x66,                   // LDAPMessage ::=SEQUENCE {
+                0x30, 0x65,                   // LDAPMessage ::=SEQUENCE {
 				0x02, 0x01, 0x01, 	          //        messageID MessageID
 				0x63, 0x60,                   //	      CHOICE { ..., searchRequest SearchRequest, ...
                         			     	  // SearchRequest ::= APPLICATION[3] SEQUENCE {
@@ -976,7 +976,7 @@
         }
         
         // Check the length
-        Assert.assertEquals(0x68, message.computeLength());
+        Assert.assertEquals(0x67, message.computeLength());
     }
 
     /**
@@ -988,11 +988,11 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x6B );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x6A );
         stream.put(
             new byte[]
             {
-                0x30, 0x69,                   // LDAPMessage ::=SEQUENCE {
+                0x30, 0x68,                   // LDAPMessage ::=SEQUENCE {
 				0x02, 0x01, 0x01, 	          //        messageID MessageID
 				0x63, 0x63,                   //	      CHOICE { ..., searchRequest SearchRequest, ...
                         			     	  // SearchRequest ::= APPLICATION[3] SEQUENCE {
@@ -1077,7 +1077,7 @@
         }
         
         // Check the length
-        Assert.assertEquals(0x6B, message.computeLength());
+        Assert.assertEquals(0x6A, message.computeLength());
     }
 
     /**
@@ -1089,11 +1089,11 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x68 );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x67 );
         stream.put(
             new byte[]
             {
-                0x30, 0x66,                   // LDAPMessage ::=SEQUENCE {
+                0x30, 0x65,                   // LDAPMessage ::=SEQUENCE {
 				0x02, 0x01, 0x01, 	          //        messageID MessageID
 				0x63, 0x60,                   //	      CHOICE { ..., searchRequest SearchRequest, ...
                         			     	  // SearchRequest ::= APPLICATION[3] SEQUENCE {
@@ -1175,7 +1175,7 @@
         }
         
         // Check the length
-        Assert.assertEquals(0x68, message.computeLength());
+        Assert.assertEquals(0x67, message.computeLength());
     }
 
     /**
@@ -1187,11 +1187,11 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x6B );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x6A );
         stream.put(
             new byte[]
             {
-                0x30, 0x69,                   // LDAPMessage ::=SEQUENCE {
+                0x30, 0x68,                   // LDAPMessage ::=SEQUENCE {
 				  0x02, 0x01, 0x01, 	          //        messageID MessageID
 				  0x63, 0x63,                   //	      CHOICE { ..., searchRequest SearchRequest, ...
                         			     	  // SearchRequest ::= APPLICATION[3] SEQUENCE {
@@ -1277,7 +1277,7 @@
         }
         
         // Check the length
-        Assert.assertEquals(0x6B, message.computeLength());
+        Assert.assertEquals(0x6A, message.computeLength());
     }
 
     /**
@@ -1403,13 +1403,13 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x75 );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x65 );
         stream.put(
             new byte[]
             {
-                    0x30, 0x73, 
+                    0x30, 0x63, 
                 	0x02, 0x01, 0x01, 
-                	0x63, 0x6E, // "dc=example,dc=com"
+                	0x63, 0x5E, // "dc=example,dc=com"
                 		0x04, 0x11, 0x64, 0x63, 0x3D, 0x65, 0x78, 0x61, 0x6D, 0x70, 0x6C, 0x65,
0x2C, 0x64, 0x63, 0x3D, 0x63, 0x6F, 0x6D, 
                 		0x0A, 0x01, 0x00, 
                 		0x0A, 0x01, 0x02, 
@@ -1466,7 +1466,6 @@
             Assert.assertEquals("attr" + i, attribute.toString());
         }
         
-        // Check the length
-        Assert.assertEquals(0x75, message.computeLength());
+        // Check the length675, message.computeLength());
     }
 }



Mime
View raw message