accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1380875 - /accumulo/trunk/core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java
Date Tue, 04 Sep 2012 20:46:56 GMT
Author: kturner
Date: Tue Sep  4 20:46:55 2012
New Revision: 1380875

URL: http://svn.apache.org/viewvc?rev=1380875&view=rev
Log:
ACCUMULO-241 Added the two character chinese word for fifty to the non-ascii visibility unit
test

Modified:
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java?rev=1380875&r1=1380874&r2=1380875&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java
Tue Sep  4 20:46:55 2012
@@ -105,16 +105,19 @@ public class VisibilityEvaluatorTest {
     assertEquals("\"A\\\"C\"", quote("A\"C"));
     assertEquals("\"A\\\"\\\\C\"", quote("A\"\\C"));
     assertEquals("ACS", quote("ACS"));
+    assertEquals("\"九\"", quote("九"));
+    assertEquals("\"五十\"", quote("五十"));
   }
   
   @Test
   public void testNonAscii() throws VisibilityParseException {
-    VisibilityEvaluator ct = new VisibilityEvaluator(ByteArraySet.fromStrings("五", "六",
"八", "九"));
+    VisibilityEvaluator ct = new VisibilityEvaluator(ByteArraySet.fromStrings("五", "六",
"八", "九", "五十"));
     
     assertTrue(ct.evaluate(new ColumnVisibility(quote("五") + "|" + quote("四"))));
     assertFalse(ct.evaluate(new ColumnVisibility(quote("五") + "&" + quote("四"))));
     assertTrue(ct.evaluate(new ColumnVisibility(quote("五") + "&(" + quote("四")
+ "|" + quote("九") + ")")));
+    assertTrue(ct.evaluate(new ColumnVisibility("\"五\"&(\"四\"|\"五十\")")));
     assertFalse(ct.evaluate(new ColumnVisibility(quote("五") + "&(" + quote("四")
+ "|" + quote("三") + ")")));
-
+    assertFalse(ct.evaluate(new ColumnVisibility("\"五\"&(\"四\"|\"三\")")));
   }
 }



Mime
View raw message