Activating some tests viaYul after implementing getters for bytes.

This commit is contained in:
Djordje Mijovic
2020-12-21 14:46:13 +01:00
parent 2d5a2c65a8
commit 7b2614576f
19 changed files with 44 additions and 5 deletions
@@ -2,7 +2,7 @@ contract C {
struct T { uint8 x; uint8 y; uint[] z; }
T[3][] a;
function f() public returns (uint8, uint8, uint, uint, uint, uint8, uint8, uint, uint, uint) {
function f() public returns (uint8, uint8, uint, uint8, uint8, uint) {
a.push();
a.push();
a[0][1].x = 11;
@@ -17,10 +17,12 @@ contract C {
a[1][2].z.push(6);
T[3][] memory m = a;
return (
m[0][1].x, m[0][1].y, m[0][1].z[0], m[0][1].z[1], m[0][1].z[2],
m[1][2].x, m[1][2].y, m[1][2].z[0], m[1][2].z[1], m[1][2].z[2]
m[0][1].x, m[0][1].y, m[0][1].z[0],
m[1][2].x, m[1][2].y, m[1][2].z[0]
);
}
}
// ====
// compileViaYul: also
// ----
// f() -> 11, 0x0c, 1, 2, 3, 0x15, 22, 4, 5, 6
// f() -> 11, 0x0c, 1, 0x15, 22, 4
@@ -10,6 +10,8 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// test() ->
// tester() -> 0x20, 0x3, "abc"
@@ -23,6 +23,8 @@ contract C {
function arrayPushEmpty() public { x.push(); }
function del() public { delete x; }
}
// ====
// compileViaYul: also
// ----
// x() -> 0x20, 3, 0x6162630000000000000000000000000000000000000000000000000000000000
// abiEncode() -> 0x20, 3, 0x6162630000000000000000000000000000000000000000000000000000000000
@@ -16,5 +16,7 @@ contract Sample {
p[0] = m;
}
}
// ====
// compileViaYul: also
// ----
// p(uint256): 0x0 -> 0xbbbb, 0xcccc, 0x80, 0xc0, 0x05, "hello", 0x05, "world"
@@ -28,6 +28,8 @@ contract buggystruct {
return bug.last;
}
}
// ====
// compileViaYul: also
// ----
// getFirst() -> 0x0a
// getSecond() -> 0x14