New tests.

This commit is contained in:
chriseth
2020-10-19 16:58:59 +02:00
parent e262f47f21
commit c9ef727136
15 changed files with 176 additions and 0 deletions
@@ -0,0 +1,17 @@
contract C {
function add(uint16 a, uint16 b) public returns (uint16) {
unchecked {
return a + b;
}
}
function f(uint16 a) public returns (uint16) {
return add(a, 0x100) + 0x100;
}
}
// ====
// compileViaYul: also
// ----
// f(uint16): 7 -> 0x0207
// f(uint16): 0xffff -> 511
// f(uint16): 0xfeff -> FAILURE