Adding semantic tests for bytes.concat.

This commit is contained in:
Djordje Mijovic
2021-03-24 11:49:21 +01:00
parent 4e75c6c3e8
commit d0a854b312
6 changed files with 113 additions and 0 deletions
@@ -0,0 +1,10 @@
contract C {
function f(bytes memory a, bytes memory b, bytes memory c) public returns (bytes memory) {
return bytes.concat(a, b, c);
}
}
// ====
// compileViaYul: also
// ----
// f(bytes, bytes, bytes): 0x60, 0xa0, 0xe0, 32, "abcdabcdabcdabcdabcdabcdabcdabcd", 5, "bcdef", 3, "abc" -> 0x20, 40, "abcdabcdabcdabcdabcdabcdabcdabcd", "bcdefabc"
// f(bytes, bytes, bytes): 0x60, 0xa0, 0xe0, 3, "abc", 2, "de", 3, "fgh" -> 0x20, 8, "abcdefgh"