diff options
Diffstat (limited to 'test')
4 files changed, 44 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_fun_arg.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_fun_arg.sol new file mode 100644 index 00000000..e05277de --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_fun_arg.sol @@ -0,0 +1,13 @@ +contract C { + function f() public pure { + assembly { + function f(a, b) {} + f() + f(1,) + f(,1) + } + } +} +// ---- +// ParserError: (113-114): Literal, identifier or instruction expected. +// ParserError: (113-114): Expected primary expression. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_function_name.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_function_name.sol new file mode 100644 index 00000000..17995b09 --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_function_name.sol @@ -0,0 +1,10 @@ +contract C { + function f() public pure { + assembly { + function (a, b) {} + } + } +} +// ---- +// ParserError: (72-73): Expected identifier but got '(' +// ParserError: (79-80): Expected ';' but got '{' diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/invalid_number.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/invalid_number.sol new file mode 100644 index 00000000..715913de --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/invalid_number.sol @@ -0,0 +1,10 @@ +contract C { + function f() public pure { + assembly { + let x := 0100 + } + } +} +// ---- +// ParserError: (72-73): Literal, identifier or instruction expected. +// ParserError: (72-73): Expected primary expression. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/missing_variable_in_assign.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/missing_variable_in_assign.sol new file mode 100644 index 00000000..c8984333 --- /dev/null +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/missing_variable_in_assign.sol @@ -0,0 +1,11 @@ +contract C { + function f() public pure { + assembly { + let x := mload(0) + := 1 + } + } +} +// ---- +// ParserError: (87-88): Literal, identifier or instruction expected. +// ParserError: (87-88): Expected primary expression. |