From 58d10b17ca767635b1e38cb2e57d07438478571b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 10 Dec 2014 01:16:09 +0100 Subject: mds-kbdc: compile-layout: m bug fix + more test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .../mds-kbdc/compile-layout/valid/overloaded_builtin_function | 7 +++++++ test-files/mds-kbdc/compile-layout/valid/overloaded_function | 10 ++++++++++ test-files/mds-kbdc/compile-layout/valid/overloaded_macro | 9 +++++++++ .../mds-kbdc/compile-layout/valid/samenamed_macro_and_function | 8 ++++++++ 4 files changed, 34 insertions(+) create mode 100644 test-files/mds-kbdc/compile-layout/valid/overloaded_builtin_function create mode 100644 test-files/mds-kbdc/compile-layout/valid/overloaded_function create mode 100644 test-files/mds-kbdc/compile-layout/valid/overloaded_macro create mode 100644 test-files/mds-kbdc/compile-layout/valid/samenamed_macro_and_function (limited to 'test-files/mds-kbdc/compile-layout/valid') diff --git a/test-files/mds-kbdc/compile-layout/valid/overloaded_builtin_function b/test-files/mds-kbdc/compile-layout/valid/overloaded_builtin_function new file mode 100644 index 0000000..e13d291 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/overloaded_builtin_function @@ -0,0 +1,7 @@ +function add/3 + \add(\1 \add(\2 \3)) +end function +if \not(\equals(\add(1 2 3) 6)) + "" : 0 +end if + diff --git a/test-files/mds-kbdc/compile-layout/valid/overloaded_function b/test-files/mds-kbdc/compile-layout/valid/overloaded_function new file mode 100644 index 0000000..70bc5b0 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/overloaded_function @@ -0,0 +1,10 @@ +function f/0 + 1 +end function +function f/1 + \1 +end function +if \equals(\f() \f(2)) + "" : 0 +end if + diff --git a/test-files/mds-kbdc/compile-layout/valid/overloaded_macro b/test-files/mds-kbdc/compile-layout/valid/overloaded_macro new file mode 100644 index 0000000..d9bdd41 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/overloaded_macro @@ -0,0 +1,9 @@ +macro m/1 + "" : \1 +end macro +macro m/2 + \add(1 \1) : 2 +end macro +m(1) +m(0 1) + diff --git a/test-files/mds-kbdc/compile-layout/valid/samenamed_macro_and_function b/test-files/mds-kbdc/compile-layout/valid/samenamed_macro_and_function new file mode 100644 index 0000000..8703e7a --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/samenamed_macro_and_function @@ -0,0 +1,8 @@ +function c/0 + "a" +end function +macro c/0 + \c() : \c() +end macro +c() + -- cgit v1.2.3-70-g09d2