From c2367e9938dac08321234cd7134c398c8af64d3d Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 24 Oct 2006 16:55:29 +0000
Subject: [PATCH] Update the bit string attribute syntax and the corresponding test case to remove convenience methods for creating and decoding bit string values.  These methods aren't really very useful for anything, and they don't properly deal with bit strings where the number of bits is not a multiple of eight.

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BitStringSyntaxTest.java |   24 ++++--------------------
 1 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BitStringSyntaxTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BitStringSyntaxTest.java
index 7d8b09e..dcfb0ab 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BitStringSyntaxTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BitStringSyntaxTest.java
@@ -29,7 +29,6 @@
 import static org.testng.Assert.*;
 
 import org.opends.server.api.AttributeSyntax;
-import org.opends.server.api.EqualityMatchingRule;
 import org.opends.server.config.ConfigEntry;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.protocols.asn1.ASN1OctetString;
@@ -81,36 +80,21 @@
     ConfigEntry configEntry = DirectoryServer.getConfigEntry(
                         DN.decode("cn=Bit String,cn=Syntaxes,cn=config"));
     syntax.initializeSyntax(configEntry);
-    
+
     ByteString byteStringValue = new ASN1OctetString(value);
 
     StringBuilder reason = new StringBuilder();
     Boolean liveResult =
       syntax.valueIsAcceptable(byteStringValue, reason);
-    
+
     if (liveResult != result)
-      fail(syntax + ".valueIsAcceptable gave bad result for " + value + 
+      fail(syntax + ".valueIsAcceptable gave bad result for " + value +
           "reason : " + reason);
-    if (result == true)
-    {
-      byte[] decodedValue =
-        BitStringSyntax.decodeBitStringValue(byteStringValue);
-    
-      ByteString newValue =
-        BitStringSyntax.createBitStringValue(decodedValue).getNormalizedValue();
-      
-      EqualityMatchingRule matchingRule = syntax.getEqualityMatchingRule();
-     /* disabled because it currently fails
-      * see issue 726
-      * 
-      * assertTrue(matchingRule.areEqual(byteStringValue, newValue));
-      */
-    }
 
     // call the getters
     syntax.getApproximateMatchingRule();
     syntax.getDescription();
-    
+
     syntax.getOID();
     syntax.getOrderingMatchingRule();
     syntax.getSubstringMatchingRule();

--
Gitblit v1.10.0