Disable illegal UTs 00/76400/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 23 Sep 2018 15:38:47 +0000 (17:38 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 23 Sep 2018 15:38:47 +0000 (17:38 +0200)
The XSD/Pattern conversion does not really work in this case, as
"&&" is not something which has the same meaning in XSD patterns.

The test is vailing with JDK9+, but is in general invalid. Disable
it for now, we will re-enable it once we have correct translation.

Change-Id: If54d4b9b4fcf3f612885f4af407d4d32ffcd916f
JIRA: YANGTOOLS-887
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/Bug5410Test.java

index 0e997093796c9b3716bdc1f4ff3020e0ef3b7b1b..08aa0513adab69fb2b715bf94473fd25b22f7567 100644 (file)
@@ -132,16 +132,17 @@ public class Bug5410Test {
         testPattern("^[\\[-b&&[^^-a]]+$", "^(?:\\^[\\[-b&&[^^-a]]+\\$)$", ImmutableList.of("^[$", "^\\$", "^]$", "^b$"),
                 ImmutableList.of("^a$", "^^$", "^_$"));
 
-        testPattern("[^^-~&&[^$-^]]", "^(?:[^^-~&&[^$-^]])$", ImmutableList.of("!", "\"", "#"),
-                ImmutableList.of("a", "A", "z", "Z", "$", "%", "^", "}"));
-        testPattern("\\\\\\[^[^^-~&&[^$-^]]", "^(?:\\\\\\[\\^[^^-~&&[^$-^]])$",
-                ImmutableList.of("\\[^ ", "\\[^!", "\\[^\"", "\\[^#"),
-                ImmutableList.of("\\[^a", "\\[^A", "\\[^z", "\\[^Z", "\\[^$", "\\[^%", "\\[^^", "\\[^}"));
-        testPattern("^\\[^\\\\[^^-b&&[^\\[-\\]]]\\]^", "^(?:\\^\\[\\^\\\\[^^-b&&[^\\[-\\]]]\\]\\^)$",
-                ImmutableList.of("^[^\\c]^", "^[^\\Z]^"),
-                ImmutableList.of("^[^\\[]^", "^[^\\\\]^", "^[^\\]]^", "^[^\\^]^", "^[^\\_]^", "^[^\\b]^"));
-        testPattern("[\\^]$", "^(?:[\\^]\\$)$", ImmutableList.of("^$"),
-                ImmutableList.of("^", "$", "$^", "\\", "\\^", "\\^\\", "\\^\\$"));
+        // FIXME: YANGTOOLS-887: these patterns are not translated correctly, "&&" is a different construct in XSD
+        //        testPattern("[^^-~&&[^$-^]]", "^(?:[^^-~&&[^$-^]])$", ImmutableList.of("!", "\"", "#"),
+        //                ImmutableList.of("a", "A", "z", "Z", "$", "%", "^", "}"));
+        //        testPattern("\\\\\\[^[^^-~&&[^$-^]]", "^(?:\\\\\\[\\^[^^-~&&[^$-^]])$",
+        //                ImmutableList.of("\\[^ ", "\\[^!", "\\[^\"", "\\[^#"),
+        //                ImmutableList.of("\\[^a", "\\[^A", "\\[^z", "\\[^Z", "\\[^$", "\\[^%", "\\[^^", "\\[^}"));
+        //        testPattern("^\\[^\\\\[^^-b&&[^\\[-\\]]]\\]^", "^(?:\\^\\[\\^\\\\[^^-b&&[^\\[-\\]]]\\]\\^)$",
+        //                ImmutableList.of("^[^\\c]^", "^[^\\Z]^"),
+        //                ImmutableList.of("^[^\\[]^", "^[^\\\\]^", "^[^\\]]^", "^[^\\^]^", "^[^\\_]^", "^[^\\b]^"));
+        //        testPattern("[\\^]$", "^(?:[\\^]\\$)$", ImmutableList.of("^$"),
+        //                ImmutableList.of("^", "$", "$^", "\\", "\\^", "\\^\\", "\\^\\$"));
     }
 
     @SuppressWarnings("checkstyle:regexpSinglelineJava")