From: fennecdjay Date: Sun, 21 Jul 2019 09:21:33 +0000 (+0200) Subject: :bug: Fix macro arguments X-Git-Tag: nightly~2313 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3781a2671044e274a9392fc1f7f7a84070a3c1f1;p=gwion.git :bug: Fix macro arguments --- diff --git a/ast b/ast index 2a9afe54..bd7f714f 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 2a9afe545081756266000246a32193648f9b9618 +Subproject commit bd7f714f19c2c2e237cbe4cd6a74aa2cb2dd7206 diff --git a/tests/error/fail_assign.gw b/tests/error/fail_assign.gw index 1384a540..3fd3131b 100644 --- a/tests/error/fail_assign.gw +++ b/tests/error/fail_assign.gw @@ -1,3 +1,3 @@ -#! [contains] not allowed +#! [contains] can't assign class C extends Event{} Event e @=> C o; diff --git a/tests/error/invalid_cast.gw b/tests/error/invalid_cast.gw index 0770d9cb..fb8b3eca 100644 --- a/tests/error/invalid_cast.gw +++ b/tests/error/invalid_cast.gw @@ -1,4 +1,4 @@ -#! [contains] no match found for operator +#! [contains] can't cast class C {} class D {} D d; diff --git a/tests/error/no_cast.gw b/tests/error/no_cast.gw index c05a98b2..40b5cda6 100644 --- a/tests/error/no_cast.gw +++ b/tests/error/no_cast.gw @@ -1,4 +1,4 @@ -#! [contains] no match found for operator +#! [contains] can't cast class C{} class D{} diff --git a/tests/fptr/class_ptr01.gw b/tests/fptr/class_ptr01.gw index 0bc05495..a0f286a6 100644 --- a/tests/fptr/class_ptr01.gw +++ b/tests/fptr/class_ptr01.gw @@ -1,4 +1,4 @@ -#![contains] cant't assign +#! [contains] can't assign class C { fun static void test(int i) { <<< "int arg" >>>; } typedef void PtrType(int i); diff --git a/tests/pp/already_defined.gw b/tests/pp/already_defined.gw index a7de5d34..6af0964d 100644 --- a/tests/pp/already_defined.gw +++ b/tests/pp/already_defined.gw @@ -1,3 +1,3 @@ -#![contains] macro already defined +#! [contains] macro already defined #define macro #define macro diff --git a/tests/pp/call_not_enough.gw b/tests/pp/call_not_enough.gw index 404c3e5c..59e2c3c7 100644 --- a/tests/pp/call_not_enough.gw +++ b/tests/pp/call_not_enough.gw @@ -1,3 +1,3 @@ -#![contains] not enough arguments +#! [contains] not enough arguments #define macro(a, b) a, b <<< macro(1) >>>; diff --git a/tests/pp/call_too_many.gw b/tests/pp/call_too_many.gw index 72753f9e..b133de5a 100644 --- a/tests/pp/call_too_many.gw +++ b/tests/pp/call_too_many.gw @@ -1,3 +1,3 @@ -#![contains] too many arguments +#! [contains] too many arguments #define macro(a) a <<< macro(1,2) >>>; diff --git a/tests/pp/conditional.gw b/tests/pp/conditional.gw index 8ba5dcc5..7b9330c4 100644 --- a/tests/pp/conditional.gw +++ b/tests/pp/conditional.gw @@ -1,5 +1,4 @@ -#![contains] 'macro' defined" -#![contains] 'macro' undefined (after undefining)" +#! [contains] 'macro' defined #define macro #ifdef macro <<< "'macro' defined" >>>; diff --git a/tests/pp/define_empty.gw b/tests/pp/define_empty.gw index 4bce1e10..13a6313c 100644 --- a/tests/pp/define_empty.gw +++ b/tests/pp/define_empty.gw @@ -1,4 +1,4 @@ -#![contains] end of text +#! [contains] end of test #define macro macro diff --git a/tests/pp/define_empty_args.gw b/tests/pp/define_empty_args.gw index 81e39aef..ddbd5cb0 100644 --- a/tests/pp/define_empty_args.gw +++ b/tests/pp/define_empty_args.gw @@ -1,4 +1,4 @@ -#![contains] end of test +#! [contains] end of test #define macro(a,b) macro(1,2); diff --git a/tests/pp/define_empty_vararg.gw b/tests/pp/define_empty_vararg.gw index ae6fd2b3..8bc239a6 100644 --- a/tests/pp/define_empty_vararg.gw +++ b/tests/pp/define_empty_vararg.gw @@ -1,3 +1,3 @@ -#![contains] 123 +#! [contains] 123 #define macro(...) __VA_ARGS__ <<< macro(1,2,3) >>>; diff --git a/tests/pp/define_text.gw b/tests/pp/define_text.gw index e7431071..479402d9 100644 --- a/tests/pp/define_text.gw +++ b/tests/pp/define_text.gw @@ -1,3 +1,3 @@ -#![contains] test +#! [contains] test #define macro "test" <<< macro >>>; diff --git a/tests/pp/define_text_args.gw b/tests/pp/define_text_args.gw index eac94955..0a540d63 100644 --- a/tests/pp/define_text_args.gw +++ b/tests/pp/define_text_args.gw @@ -1,3 +1,3 @@ -#![contains] test12 +#! [contains] test12 #define macro(a,b) "test", a, b <<< macro(1,2) >>>; diff --git a/tests/pp/file_not_found.gw b/tests/pp/file_not_found.gw index b1814a22..bced9890 100644 --- a/tests/pp/file_not_found.gw +++ b/tests/pp/file_not_found.gw @@ -1,2 +1,2 @@ -#![contains] file not found +#! [contains] file not found #include diff --git a/tests/pp/include.gw b/tests/pp/include.gw index 608ce297..59152713 100644 --- a/tests/pp/include.gw +++ b/tests/pp/include.gw @@ -1,2 +1,2 @@ -#![contains] tests/pp/header.gw +#! [contains] tests/pp/header.gw #include diff --git a/tests/pp/undefined_macro.gw b/tests/pp/undefined_macro.gw index f6d764a3..5efd75d3 100644 --- a/tests/pp/undefined_macro.gw +++ b/tests/pp/undefined_macro.gw @@ -1,2 +1,2 @@ -#![contains] undefined macro +#! [contains] undefined macro #undef macro diff --git a/tests/sh/test.sh b/tests/sh/test.sh index 69545c0a..58f409f0 100644 --- a/tests/sh/test.sh +++ b/tests/sh/test.sh @@ -31,7 +31,7 @@ assert_returns() { assert_contain() { local contains - contains=$(grep '// \[contains\]' "$1" | cut -d "]" -f2) + contains=$(grep '#! \[contains\]' "$1" | cut -d "]" -f2) contains=${contains:1} [ -z "$contains" ] && return 0 grep "$contains" "$2.err.log" > /dev/null && return 0