From e912254516bedb2d45fff6aa70432146a45d8381 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 29 Nov 2014 21:18:09 +0100 Subject: mds-kbdc: only five test cases to go before it's time for the next step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .../mds-kbdc/simplify-tree/valid/alternated_map | 35 ++++++++++++++++++++++ .../valid/alternation_inside_unordered | 4 +++ .../valid/map_with_nested_alternation | 30 +++++++++++++++++++ .../valid/map_with_nothing_in_alternation | 29 ++++++++++++++++++ .../valid/mapping_with_unordered_singleton | 14 +++++++++ .../mds-kbdc/simplify-tree/valid/nothing_in_map | 18 +++++++++++ .../simplify-tree/valid/nothing_in_unordered | 24 +++++++++++++++ .../valid/unorderd_inside_alternation | 4 +++ .../simplify-tree/valid/unordered_inside_unordered | 4 +++ .../simplify-tree/valid/unordered_sequence | 4 +++ 10 files changed, 166 insertions(+) create mode 100644 test-files/mds-kbdc/simplify-tree/valid/alternated_map create mode 100644 test-files/mds-kbdc/simplify-tree/valid/alternation_inside_unordered create mode 100644 test-files/mds-kbdc/simplify-tree/valid/map_with_nested_alternation create mode 100644 test-files/mds-kbdc/simplify-tree/valid/map_with_nothing_in_alternation create mode 100644 test-files/mds-kbdc/simplify-tree/valid/mapping_with_unordered_singleton create mode 100644 test-files/mds-kbdc/simplify-tree/valid/nothing_in_map create mode 100644 test-files/mds-kbdc/simplify-tree/valid/nothing_in_unordered create mode 100644 test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation create mode 100644 test-files/mds-kbdc/simplify-tree/valid/unordered_inside_unordered create mode 100644 test-files/mds-kbdc/simplify-tree/valid/unordered_sequence (limited to 'test-files/mds-kbdc/simplify-tree/valid') diff --git a/test-files/mds-kbdc/simplify-tree/valid/alternated_map b/test-files/mds-kbdc/simplify-tree/valid/alternated_map new file mode 100644 index 0000000..2668805 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/alternated_map @@ -0,0 +1,35 @@ +[1 2 3 ] : "result" + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# ) +# (.result +# (string (@ 1 16-24) ‘"result"’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 3-4) ‘2’) +# ) +# (.result +# (string (@ 1 16-24) ‘"result"’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 5-6) ‘3’) +# ) +# (.result +# (string (@ 1 16-24) ‘"result"’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (keys (@ 1 7-12) ‘’) +# ) +# (.result +# (string (@ 1 16-24) ‘"result"’) +# ) +# ) + diff --git a/test-files/mds-kbdc/simplify-tree/valid/alternation_inside_unordered b/test-files/mds-kbdc/simplify-tree/valid/alternation_inside_unordered new file mode 100644 index 0000000..da3d3d2 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/alternation_inside_unordered @@ -0,0 +1,4 @@ +(1 [2 3]) : 0 + +# TODO + diff --git a/test-files/mds-kbdc/simplify-tree/valid/map_with_nested_alternation b/test-files/mds-kbdc/simplify-tree/valid/map_with_nested_alternation new file mode 100644 index 0000000..434c068 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/map_with_nested_alternation @@ -0,0 +1,30 @@ +[1 [2 3]] : 4 + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# ) +# (.result +# (string (@ 1 12-13) ‘4’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 4-5) ‘2’) +# ) +# (.result +# (string (@ 1 12-13) ‘4’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 6-7) ‘3’) +# ) +# (.result +# (string (@ 1 12-13) ‘4’) +# ) +# ) +# :1:3–4: warning: alternation inside alternation is unnessary +# [1 [2 3]] : 4 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/valid/map_with_nothing_in_alternation b/test-files/mds-kbdc/simplify-tree/valid/map_with_nothing_in_alternation new file mode 100644 index 0000000..498de9e --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/map_with_nothing_in_alternation @@ -0,0 +1,29 @@ +[1 2 .] 3 : 4 + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# (string (@ 1 8-9) ‘3’) +# ) +# (.result +# (string (@ 1 12-13) ‘4’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 3-4) ‘2’) +# (string (@ 1 8-9) ‘3’) +# ) +# (.result +# (string (@ 1 12-13) ‘4’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 8-9) ‘3’) +# ) +# (.result +# (string (@ 1 12-13) ‘4’) +# ) +# ) + diff --git a/test-files/mds-kbdc/simplify-tree/valid/mapping_with_unordered_singleton b/test-files/mds-kbdc/simplify-tree/valid/mapping_with_unordered_singleton new file mode 100644 index 0000000..cfe630d --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/mapping_with_unordered_singleton @@ -0,0 +1,14 @@ +(1) : 2 + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# ) +# (.result +# (string (@ 1 6-7) ‘2’) +# ) +# ) +# :1:0–1: warning: singleton unordered subsequence +# (1) : 2 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/valid/nothing_in_map b/test-files/mds-kbdc/simplify-tree/valid/nothing_in_map new file mode 100644 index 0000000..25d433d --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/nothing_in_map @@ -0,0 +1,18 @@ +1 . . 2 : 3 + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 0-1) ‘1’) +# (string (@ 1 6-7) ‘2’) +# ) +# (.result +# (string (@ 1 10-11) ‘3’) +# ) +# ) +# nothing_in_map:1:2–3: warning: ‘.’ outside alternation has no effect +# 1 . . 2 : 3 +# ^ +# nothing_in_map:1:4–5: warning: ‘.’ outside alternation has no effect +# 1 . . 2 : 3 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/valid/nothing_in_unordered b/test-files/mds-kbdc/simplify-tree/valid/nothing_in_unordered new file mode 100644 index 0000000..b75c71a --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/nothing_in_unordered @@ -0,0 +1,24 @@ +(. . . 1) : 2 + +# (map (@ 1 0-0) +# (.sequence +# (unordered (@ 1 0-1) +# (.inner +# (string (@ 1 7-8) ‘1’) +# ) +# ) +# ) +# (.result +# (string (@ 1 12-13) ‘2’) +# ) +# ) +# :1:1–2: warning: ‘.’ outside alternation has no effect +# (. . . 1) : 2 +# ^ +# :1:3–4: warning: ‘.’ outside alternation has no effect +# (. . . 1) : 2 +# ^ +# :1:5–6: warning: ‘.’ outside alternation has no effect +# (. . . 1) : 2 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation b/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation new file mode 100644 index 0000000..ac52b62 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation @@ -0,0 +1,4 @@ +[1 (2 3)] : 0 + +# TODO + diff --git a/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_unordered b/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_unordered new file mode 100644 index 0000000..ce999a2 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_unordered @@ -0,0 +1,4 @@ +(1 2 (3 4)) : 0 + +# TODO + diff --git a/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence b/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence new file mode 100644 index 0000000..a7cb1bf --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence @@ -0,0 +1,4 @@ +(1 2 3) : 0 + +# TODO + -- cgit v1.2.3-70-g09d2