mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[isoltest] Enforcing compileViaYul to be set if test can pass via yul
This commit is contained in:
committed by
chriseth
parent
cb32530b6b
commit
8b7f87eed5
@@ -11,6 +11,7 @@ contract c {
|
||||
l = data.length;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 1, 0
|
||||
|
||||
@@ -6,6 +6,7 @@ contract c {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> FAILURE
|
||||
|
||||
@@ -8,6 +8,7 @@ contract c {
|
||||
x = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 3
|
||||
|
||||
@@ -14,6 +14,7 @@ contract c {
|
||||
z = data[2];
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 5, 4, 3, 3
|
||||
|
||||
@@ -9,6 +9,5 @@ contract c {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// test() -> FAILURE
|
||||
|
||||
@@ -8,6 +8,7 @@ contract c {
|
||||
x = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 3
|
||||
|
||||
@@ -11,6 +11,7 @@ contract C {
|
||||
b = s[1];
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256[2]): 42, 23 -> 42, 23
|
||||
|
||||
@@ -11,7 +11,8 @@ contract C {
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256[][]): 0x20, 0x0 -> 42 # valid access stub #
|
||||
// f(uint256[][]): 0x20, 0x1 -> FAILURE # invalid on argument decoding #
|
||||
|
||||
+2
-1
@@ -16,7 +16,8 @@ contract C {
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256[][1][]): 0x20, 0x0 -> 42 # valid access stub #
|
||||
// f(uint256[][1][]): 0x20, 0x1 -> FAILURE # invalid on argument decoding #
|
||||
|
||||
@@ -4,6 +4,7 @@ contract C {
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 7
|
||||
|
||||
@@ -29,6 +29,7 @@ contract C {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 7
|
||||
|
||||
@@ -12,7 +12,8 @@ contract A {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> false
|
||||
// testIt() -> FAILURE
|
||||
|
||||
@@ -7,7 +7,8 @@ contract Creator {
|
||||
ch = s[2];
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 1, 2, 3, 4 ->
|
||||
// r() -> 4
|
||||
|
||||
@@ -5,6 +5,7 @@ contract C {
|
||||
return (x.length, bytes16(uint128(2)).length, a.length + 7);
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(bytes32): "789" -> 32, 16, 8
|
||||
|
||||
@@ -10,5 +10,7 @@ contract Test {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07
|
||||
|
||||
@@ -11,7 +11,8 @@ contract C {
|
||||
return rows[n][k - 1];
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256,uint256): 3, 1 -> 1
|
||||
// f(uint256,uint256): 9, 5 -> 70
|
||||
|
||||
@@ -19,6 +19,8 @@ contract C {
|
||||
}
|
||||
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// l() -> 0
|
||||
// lv(uint256): 42 ->
|
||||
|
||||
Reference in New Issue
Block a user