You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2020/03/13 14:37:27 UTC

[sling-org-apache-sling-jcr-repoinit] 01/02: SLING-9195 - add a few test cases

This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git

commit 94807668bf994d5d580f40258092910a8aefff55
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Mar 13 15:06:26 2020 +0100

    SLING-9195 - add a few test cases
---
 .../org/apache/sling/jcr/repoinit/impl/AclUtilTest.java     | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/sling/jcr/repoinit/impl/AclUtilTest.java b/src/test/java/org/apache/sling/jcr/repoinit/impl/AclUtilTest.java
index ebf918d..40079de 100644
--- a/src/test/java/org/apache/sling/jcr/repoinit/impl/AclUtilTest.java
+++ b/src/test/java/org/apache/sling/jcr/repoinit/impl/AclUtilTest.java
@@ -176,20 +176,29 @@ public class AclUtilTest {
         final Value[] a6 = new Value[] {vf.createValue("b", PropertyType.STRING), vf.createValue("a", PropertyType.STRING), vf.createValue("c", PropertyType.STRING)};
         final Value[] a7 = new Value[] {vf.createValue("a", PropertyType.STRING), vf.createValue("b", PropertyType.STRING)};
         final Value[] a8 = new Value[] {vf.createValue("jcr:data", PropertyType.NAME), vf.createValue("jcr:content", PropertyType.NAME)};
+        final Value[] a9 = new Value[] {vf.createValue("jcr:data", PropertyType.NAME), vf.createValue("jcr:content", PropertyType.STRING)};
         final Value[] emptyA = {};
         final Value[] emptyB = {};
 
         assertArrayCompare(null, a3, false);
+        assertArrayCompare(a3, null, false);
+        assertArrayCompare(null, null, false);
+
+        assertArrayCompare(emptyA, emptyB, true);
+        assertArrayCompare(emptyA, emptyA, true);
+        assertArrayCompare(emptyA, a1, false);
+        assertArrayCompare(a1, emptyA, false);
+
         assertArrayCompare(a1, a3, false);
         assertArrayCompare(a3, a1, false);
-        assertArrayCompare(a1, a3, false);
+        assertArrayCompare(a1, a1, true);
         assertArrayCompare(a1, a4, false);
         assertArrayCompare(a4, a4, true);
         assertArrayCompare(a2, a7, true);
         assertArrayCompare(a5, a7, true);
         assertArrayCompare(a4, a6, true);
         assertArrayCompare(a1, a8, true);
-        assertArrayCompare(emptyA, emptyB, true);
+        assertArrayCompare(a8, a9, false);
     }
 
     /**