Skip to content

Commit 28fbc70

Browse files
committed
eof: Update yulSyntaxTests tests for EOF
1 parent 3c94682 commit 28fbc70

37 files changed

+76
-12
lines changed

test/libyul/yulSyntaxTests/builtin_function_literal.yul

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
datasize(x,1)
33
}
4+
// ====
5+
// bytecodeFormat: legacy
46
// ----
57
// TypeError 7000: (4-12): Function "datasize" expects 1 arguments but got 2.
68
// TypeError 9114: (4-12): Function expects direct literals as arguments.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
function datacopy(a, b, c) {}
33
}
4+
// ====
5+
// bytecodeFormat: legacy
46
// ----
57
// ParserError 5568: (15-23): Cannot use builtin function name "datacopy" as identifier name.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
function dataoffset(a) -> b {}
33
}
4+
// ====
5+
// bytecodeFormat: legacy
46
// ----
57
// ParserError 5568: (15-25): Cannot use builtin function name "dataoffset" as identifier name.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
function datasize(a) -> b {}
33
}
4+
// ====
5+
// bytecodeFormat: legacy
46
// ----
57
// ParserError 5568: (15-23): Cannot use builtin function name "datasize" as identifier name.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
auxdataloadn(x,1)
3+
}
4+
// ====
5+
// bytecodeFormat: >=EOFv1
6+
// ----
7+
// TypeError 7000: (6-18): Function "auxdataloadn" expects 1 arguments but got 2.
8+
// TypeError 9114: (6-18): Function expects direct literals as arguments.
9+
// DeclarationError 8198: (19-20): Identifier "x" not found.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
auxdataloadn(auxdataloadn(0))
3+
}
4+
// ====
5+
// bytecodeFormat: >=EOFv1
6+
// dialect: evm
7+
// ----
8+
// TypeError 9114: (6-18): Function expects direct literals as arguments.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
switch codesize()
2+
switch calldataload(0)
33
case hex"00" {}
44
case hex"1122" {}
55
}
6-
// ----
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
switch codesize()
2+
switch calldataload(0)
33
case hex"00" {}
44
case hex"112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900" {}
55
}
66
// ----
7-
// TypeError 3069: (53-178): String literal too long (60 > 32)
7+
// TypeError 3069: (58-183): String literal too long (60 > 32)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
pop(pc())
33
}
4+
// ====
5+
// bytecodeFormat: legacy
46
// ----
57
// SyntaxError 2450: (10-12): PC instruction is a low-level EVM feature. Because of that PC is disallowed in strict assembly.

test/libyul/yulSyntaxTests/loadimmutable.yul

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
}
44
// ====
55
// dialect: evm
6+
// bytecodeFormat: legacy
67
// ----

0 commit comments

Comments
 (0)