From 99ec00b0eb3d7a1250398821680709c4f44fa530 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 9 Dec 2014 14:38:18 +0100 Subject: mds-kbdc: bug fixes and test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .../compile-layout/invalid/invalid_strings | 2 -- .../compile-layout/invalid/invalid_use_of_array | 3 ++ .../compile-layout/invalid/nonsingleton_bounds | 6 ++++ .../compile-layout/invalid/undefined_variable | 2 ++ .../mds-kbdc/make-tree/invalid/invalid_arrays | 37 ++++++++++++++++++++++ 5 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 test-files/mds-kbdc/compile-layout/invalid/invalid_use_of_array create mode 100644 test-files/mds-kbdc/compile-layout/invalid/nonsingleton_bounds create mode 100644 test-files/mds-kbdc/compile-layout/invalid/undefined_variable create mode 100644 test-files/mds-kbdc/make-tree/invalid/invalid_arrays (limited to 'test-files') diff --git a/test-files/mds-kbdc/compile-layout/invalid/invalid_strings b/test-files/mds-kbdc/compile-layout/invalid/invalid_strings index 93b58e1..676d86e 100644 --- a/test-files/mds-kbdc/compile-layout/invalid/invalid_strings +++ b/test-files/mds-kbdc/compile-layout/invalid/invalid_strings @@ -4,8 +4,6 @@ "hello"_ \0.0 " -" -\ \ \\ diff --git a/test-files/mds-kbdc/compile-layout/invalid/invalid_use_of_array b/test-files/mds-kbdc/compile-layout/invalid/invalid_use_of_array new file mode 100644 index 0000000..b5f8e32 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/invalid/invalid_use_of_array @@ -0,0 +1,3 @@ +let \1 : {} + : "\1" + diff --git a/test-files/mds-kbdc/compile-layout/invalid/nonsingleton_bounds b/test-files/mds-kbdc/compile-layout/invalid/nonsingleton_bounds new file mode 100644 index 0000000..541c5d0 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/invalid/nonsingleton_bounds @@ -0,0 +1,6 @@ +for "" to "hello" as \1 +end for +assumption + have_range "" "hello" +end assumption + diff --git a/test-files/mds-kbdc/compile-layout/invalid/undefined_variable b/test-files/mds-kbdc/compile-layout/invalid/undefined_variable new file mode 100644 index 0000000..65f3457 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/invalid/undefined_variable @@ -0,0 +1,2 @@ +"\1" : "" + diff --git a/test-files/mds-kbdc/make-tree/invalid/invalid_arrays b/test-files/mds-kbdc/make-tree/invalid/invalid_arrays new file mode 100644 index 0000000..2ae4cdf --- /dev/null +++ b/test-files/mds-kbdc/make-tree/invalid/invalid_arrays @@ -0,0 +1,37 @@ +let \1 : {{}}} +let \1 : {)} +let \1 : {>} + +# (let (@ 1 0-3) ‘\1’ +# (.value +# (array (@ 1 9-10) +# (.elements +# (string (@ 1 10-11) ‘{’) +# ) +# ) +# ) +# ) +# (let (@ 2 0-3) ‘\1’ +# (.value +# (array (@ 2 9-10) +# (.elements nil) +# ) +# ) +# ) +# (let (@ 3 0-3) ‘\1’ +# (.value +# (array (@ 3 9-10) +# (.elements nil) +# ) +# ) +# ) +# :1:12–14: error: too many parameters +# let \1 : {{}}} +# ^^ +# :2:10–11: error: x-stray ‘)’ +# let \1 : {)} +# ^ +# :3:10–11: error: x-stray ‘>’ +# let \1 : {>} +# ^ + -- cgit v1.2.3-70-g09d2