From 1fa8b1c2497b6ec488b77b9302b7c416d4ac934d Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Sun, 23 Sep 2018 17:38:47 +0200 Subject: [PATCH] Disable illegal UTs 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 --- .../yang/model/util/Bug5410Test.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/Bug5410Test.java b/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/Bug5410Test.java index 0e99709379..08aa0513ad 100644 --- a/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/Bug5410Test.java +++ b/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/Bug5410Test.java @@ -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") -- 2.36.6