[ewasm] Polyfill: balance & address: Update Tests.

This commit is contained in:
Alexander Arlt
2021-01-19 13:04:45 -05:00
parent 87e3fbee6c
commit f928107181
46 changed files with 143 additions and 108 deletions
@@ -9,5 +9,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x00
@@ -9,6 +9,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f(uint16,uint16,uint16): 0xe000, 0xe500, 2 -> FAILURE, hex"4e487b71", 0x11
// f(uint16,uint16,uint16): 0xe000, 0x1000, 0x1000 -> 0x00
@@ -11,6 +11,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f(uint16): 7 -> 0x0207
// f(uint16): 0xffff -> 511
@@ -15,6 +15,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// div(uint256,uint256): 7, 2 -> 3
// div(uint256,uint256): 7, 0 -> FAILURE, hex"4e487b71", 0x12 # throws #
@@ -14,6 +14,7 @@ contract Test {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// g(uint256[]): 0x20, 4, 1, 2, 3, 4 -> 4, 1
// h(uint256[], uint256, uint256): 0x60, 1, 3, 4, 1, 2, 3, 4 -> 2, 2
// h(uint256[],uint256,uint256): 0x60, 1, 3, 4, 1, 2, 3, 4 -> 2, 2
@@ -15,5 +15,6 @@ contract c {
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// test() -> 8, 0
@@ -6,5 +6,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f(uint256[2]): 43, 57 -> 43, 57
@@ -7,5 +7,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 11, 10
@@ -11,5 +11,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 2, 2, 2, 2
@@ -9,6 +9,7 @@ contract C {
}
// ====
// compileViaYul: true
// compileToEwasm: also
// ----
// constructor() ->
// f() -> 0x0a, 0x0a
@@ -7,6 +7,7 @@ contract A {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// ()
// x() -> 1
@@ -12,5 +12,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() ->
@@ -19,6 +19,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// withValue() -> 0x00
// withoutValue() -> 0x60
@@ -12,5 +12,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// foo() -> 992
@@ -14,5 +14,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// foo() -> 0x60
@@ -14,5 +14,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// foo() -> 0x2324
@@ -11,5 +11,6 @@ contract C {
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x0
@@ -16,7 +16,8 @@ contract C {
}
}
// ====
// EVMVersion: >=byzantium
// compileViaYul: also
// compileToEwasm: also
// EVMVersion: >=byzantium
// ----
// test() -> FAILURE, hex"4e487b71", 33 # should throw #
// test() -> FAILURE, hex"4e487b71", 0x21 # should throw #
@@ -5,6 +5,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x7878787878787878787878787878787878787878
// f() -> 0x7878787878787878787878787878787878787878
@@ -5,6 +5,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 20000000
// f() -> 20000000
@@ -6,6 +6,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// constructor()
// f() -> 2
@@ -6,7 +6,8 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// constructor() # This is the 1st block #
// f() -> 0x1e # This is the 2nd block (each block is "15 seconds") #
// f() -> 0x2d # This is the 3rd block #
// constructor() # This is the 1st block #
// f() -> 0x1e # This is the 2nd block (each block is "15 seconds") #
// f() -> 0x2d # This is the 3rd block #
@@ -5,6 +5,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> true
// f() -> true
@@ -5,5 +5,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x1212121212121212121212121212120000000012
@@ -8,6 +8,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x26121ff000000000000000000000000000000000000000000000000000000000
// g() -> 0xe2179b8e00000000000000000000000000000000000000000000000000000000
@@ -5,6 +5,7 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x9292929292929292929292929292929292929292
// f() -> 0x9292929292929292929292929292929292929292
@@ -5,5 +5,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x3737373737373737373737373737373737373737373737373737373737373738
@@ -22,5 +22,6 @@ contract C {
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// test() -> -2, 4, -112, 0
@@ -6,5 +6,6 @@ contract test {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x090a0d27225c0000000000000000000000000000000000000000000000000000
@@ -20,5 +20,6 @@ contract C {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f((uint32,uint256[],uint64)): 0x20, 42, 0x60, 23, 2, 1, 2 -> 42, 1, 2, 23
@@ -21,5 +21,6 @@ contract Test {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> FAILURE, hex"4e487b71", 0x51
@@ -21,5 +21,6 @@ contract Test {
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> FAILURE, hex"4e487b71", 0x51
@@ -8,6 +8,7 @@ contract test {
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// constructor(), 23 wei ->
// getBalance() -> 23
@@ -17,5 +17,6 @@ contract C {
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> true
@@ -24,5 +24,6 @@ contract C {
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f((uint256,uint256,(uint256,uint256),uint256)): 1, 2, 3, 4, 5 -> 1, 2, 3, 4, 5