From 2d0181e9e07236ea28fb638c4a9eafb5896635b6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 1 Dec 2014 13:27:13 +0100 Subject: mds-kbdc: add some test cases + fix issued with inclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .../validate-tree/invalid/function-assumption | 19 ++++++++++++++++ .../validate-tree/invalid/function-function | 19 ++++++++++++++++ .../validate-tree/invalid/function-information | 19 ++++++++++++++++ .../mds-kbdc/validate-tree/invalid/function-macro | 19 ++++++++++++++++ .../invalid/include_information-information | 26 ++++++++++++++++++++++ .../validate-tree/invalid/information-assumption | 19 ++++++++++++++++ .../validate-tree/invalid/information-function | 19 ++++++++++++++++ .../validate-tree/invalid/information-information | 19 ++++++++++++++++ .../validate-tree/invalid/information-macro | 19 ++++++++++++++++ 9 files changed, 178 insertions(+) create mode 100644 test-files/mds-kbdc/validate-tree/invalid/function-assumption create mode 100644 test-files/mds-kbdc/validate-tree/invalid/function-function create mode 100644 test-files/mds-kbdc/validate-tree/invalid/function-information create mode 100644 test-files/mds-kbdc/validate-tree/invalid/function-macro create mode 100644 test-files/mds-kbdc/validate-tree/invalid/include_information-information create mode 100644 test-files/mds-kbdc/validate-tree/invalid/information-assumption create mode 100644 test-files/mds-kbdc/validate-tree/invalid/information-function create mode 100644 test-files/mds-kbdc/validate-tree/invalid/information-information create mode 100644 test-files/mds-kbdc/validate-tree/invalid/information-macro (limited to 'test-files/mds-kbdc/validate-tree/invalid') diff --git a/test-files/mds-kbdc/validate-tree/invalid/function-assumption b/test-files/mds-kbdc/validate-tree/invalid/function-assumption new file mode 100644 index 0000000..3ebe83e --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/function-assumption @@ -0,0 +1,19 @@ +function f/0 + assumption + end assumption +end function + +# (function (@ 1 0-8) ‘f/0’ +# (.inner +# (assumption (@ 2 2-12) +# (.inner nil) +# ) +# ) +# ) +# :2:2–12: error: assumption clause inside function definition +# assumption +# ^^^^^^^^^^ +# :1:0–8: note: outer function definition defined here +# function f/0 +# ^^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/function-function b/test-files/mds-kbdc/validate-tree/invalid/function-function new file mode 100644 index 0000000..4793bbc --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/function-function @@ -0,0 +1,19 @@ +function f/0 + function g/0 + end function +end function + +# (function (@ 1 0-8) ‘f/0’ +# (.inner +# (function (@ 2 2-10) ‘g/0’ +# (.inner nil) +# ) +# ) +# ) +# :2:2–10: error: nested function definition +# function g/0 +# ^^^^^^^^ +# :1:0–8: note: outer function defined here +# function f/0 +# ^^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/function-information b/test-files/mds-kbdc/validate-tree/invalid/function-information new file mode 100644 index 0000000..d6cda45 --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/function-information @@ -0,0 +1,19 @@ +function f/0 + information + end information +end function + +# (function (@ 1 0-8) ‘f/0’ +# (.inner +# (information (@ 2 2-13) +# (.inner nil) +# ) +# ) +# ) +# :2:2–13: error: information clause inside function definition +# information +# ^^^^^^^^^^^ +# :1:0–8: note: outer function definition defined here +# function f/0 +# ^^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/function-macro b/test-files/mds-kbdc/validate-tree/invalid/function-macro new file mode 100644 index 0000000..e8f48cd --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/function-macro @@ -0,0 +1,19 @@ +function f/0 + macro m/0 + end macro +end function + +# (function (@ 1 0-8) ‘f/0’ +# (.inner +# (macro (@ 2 2-7) ‘m/0’ +# (.inner nil) +# ) +# ) +# ) +# :2:2–7: error: macro definition inside function definition +# macro m/0 +# ^^^^^ +# :1:0–8: note: outer function definition defined here +# function f/0 +# ^^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/include_information-information b/test-files/mds-kbdc/validate-tree/invalid/include_information-information new file mode 100644 index 0000000..25a23ed --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/include_information-information @@ -0,0 +1,26 @@ +include "information-information" + +# (include (@ 1 0-7) ‘.../test-files/mds-kbdc/validate-tree/invalid/information-information’ +# (.inner +# (information (@ 1 0-11) +# (.inner +# (information (@ 2 2-13) +# (.inner nil) +# ) +# ) +# ) +# ) +# ) +# .../test-files/mds-kbdc/validate-tree/invalid/information-information:2:2–13: error: nested information clause +# information +# ^^^^^^^^^^^ +# .../test-files/mds-kbdc/validate-tree/invalid/include_information-information:1:0–7: note: included from here +# include "information-information" +# ^^^^^^^ +# .../test-files/mds-kbdc/validate-tree/invalid/information-information:1:0–11: note: outer information clause defined here +# information +# ^^^^^^^^^^^ +# .../test-files/mds-kbdc/validate-tree/invalid/include_information-information:1:0–7: note: included from here +# include "information-information" +# ^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/information-assumption b/test-files/mds-kbdc/validate-tree/invalid/information-assumption new file mode 100644 index 0000000..662542f --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/information-assumption @@ -0,0 +1,19 @@ +information + assumption + end assumption +end information + +# (information (@ 1 0-11) +# (.inner +# (assumption (@ 2 2-12) +# (.inner nil) +# ) +# ) +# ) +# :2:2–12: error: assumption clause inside information clause +# assumption +# ^^^^^^^^^^ +# :1:0–11: note: outer information clause defined here +# information +# ^^^^^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/information-function b/test-files/mds-kbdc/validate-tree/invalid/information-function new file mode 100644 index 0000000..06613f6 --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/information-function @@ -0,0 +1,19 @@ +information + function f/0 + end function +end information + +# (information (@ 1 0-11) +# (.inner +# (function (@ 2 2-10) ‘f/0’ +# (.inner nil) +# ) +# ) +# ) +# :2:2–10: error: function definition inside information clause +# function f/0 +# ^^^^^^^^ +# :1:0–11: note: outer information clause defined here +# information +# ^^^^^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/information-information b/test-files/mds-kbdc/validate-tree/invalid/information-information new file mode 100644 index 0000000..caa3003 --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/information-information @@ -0,0 +1,19 @@ +information + information + end information +end information + +# (information (@ 1 0-11) +# (.inner +# (information (@ 2 2-13) +# (.inner nil) +# ) +# ) +# ) +# :2:2–13: error: nested information clause +# information +# ^^^^^^^^^^^ +# :1:0–11: note: outer information clause defined here +# information +# ^^^^^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/information-macro b/test-files/mds-kbdc/validate-tree/invalid/information-macro new file mode 100644 index 0000000..51991de --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/information-macro @@ -0,0 +1,19 @@ +information + macro m/0 + end macro +end information + +# (information (@ 1 0-11) +# (.inner +# (macro (@ 2 2-7) ‘m/0’ +# (.inner nil) +# ) +# ) +# ) +# :2:2–7: error: macro definition inside information clause +# macro m/0 +# ^^^^^ +# :1:0–11: note: outer information clause defined here +# information +# ^^^^^^^^^^^ + -- cgit v1.2.3-70-g09d2