aboutsummaryrefslogtreecommitdiff
path: root/tests/decode
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2020-06-02 16:13:28 -0700
committerRichard Henderson <richard.henderson@linaro.org>2020-06-08 11:09:48 -0700
commit33c0f25bfd7af2848d078afe2876dcb0d5a1c6d3 (patch)
tree9f8548c016ef5e63010973c9c14d4e34fcad1e49 /tests/decode
parent067e8b0f45d650ced89a638577b85443f3333480 (diff)
downloadqemu-33c0f25bfd7af2848d078afe2876dcb0d5a1c6d3.zip
qemu-33c0f25bfd7af2848d078afe2876dcb0d5a1c6d3.tar.gz
qemu-33c0f25bfd7af2848d078afe2876dcb0d5a1c6d3.tar.bz2
tests/decode: Test non-overlapping groups
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests/decode')
-rw-r--r--tests/decode/err_pattern_group_nest1.decode14
-rw-r--r--tests/decode/err_pattern_group_nest2.decode6
-rw-r--r--tests/decode/err_pattern_group_nest3.decode14
-rw-r--r--tests/decode/succ_pattern_group_nest3.decode11
4 files changed, 45 insertions, 0 deletions
diff --git a/tests/decode/err_pattern_group_nest1.decode b/tests/decode/err_pattern_group_nest1.decode
new file mode 100644
index 0000000..7d09891
--- /dev/null
+++ b/tests/decode/err_pattern_group_nest1.decode
@@ -0,0 +1,14 @@
+# This work is licensed under the terms of the GNU LGPL, version 2 or later.
+# See the COPYING.LIB file in the top-level directory.
+
+%sub1 0:8
+%sub2 8:8
+
+# Make sure braces are matched
+{
+ top 00000000 00000000 00000000 00000000
+ [
+ sub1 00000000 00000000 00000000 ........ %sub1
+ sub2 00000000 00000000 ........ ........ %sub1 %sub2
+ }
+}
diff --git a/tests/decode/err_pattern_group_nest2.decode b/tests/decode/err_pattern_group_nest2.decode
new file mode 100644
index 0000000..c172239
--- /dev/null
+++ b/tests/decode/err_pattern_group_nest2.decode
@@ -0,0 +1,6 @@
+# This work is licensed under the terms of the GNU LGPL, version 2 or later.
+# See the COPYING.LIB file in the top-level directory.
+
+# Make sure braces are matched
+{
+ [
diff --git a/tests/decode/err_pattern_group_nest3.decode b/tests/decode/err_pattern_group_nest3.decode
new file mode 100644
index 0000000..b085d01
--- /dev/null
+++ b/tests/decode/err_pattern_group_nest3.decode
@@ -0,0 +1,14 @@
+# This work is licensed under the terms of the GNU LGPL, version 2 or later.
+# See the COPYING.LIB file in the top-level directory.
+
+%sub1 0:8
+%sub2 8:8
+
+# The exclusive group should error for overlap.
+{
+ top 00000000 00000000 00000000 00000000
+ [
+ sub1 00000000 00000000 00000000 ........ %sub1
+ sub2 00000000 00000000 ........ ........ %sub1 %sub2
+ ]
+}
diff --git a/tests/decode/succ_pattern_group_nest3.decode b/tests/decode/succ_pattern_group_nest3.decode
new file mode 100644
index 0000000..156249f
--- /dev/null
+++ b/tests/decode/succ_pattern_group_nest3.decode
@@ -0,0 +1,11 @@
+# This work is licensed under the terms of the GNU LGPL, version 2 or later.
+# See the COPYING.LIB file in the top-level directory.
+
+{
+ [
+ sub1 00000000 a:8 b:8 c:8
+ sub2 00000001 a:8 b:8 c:8
+ sub3 00000010 a:8 b:8 c:8
+ ]
+ sub4 000000 d:2 a:8 b:8 c:8
+}