Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mijovic committed Mar 10, 2021
1 parent 63017bd commit b73e9f3
Show file tree
Hide file tree
Showing 133 changed files with 502 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ contract C {
// compileViaYul: also
// ----
// f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb
// gas irOptimized: 194189
// gas legacy: 196426
// gas legacyOptimized: 193424
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ contract C {
}
}
// ====
// compileViaYul: also
// EVMVersion: >homestead
// compileViaYul: also
// ----
// test_bytes() ->
// gas irOptimized: 516922
// gas legacy: 466763
// gas legacyOptimized: 374537
// test_uint256() ->
// gas irOptimized: 712790
// gas legacy: 634592
// gas legacyOptimized: 499481
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ contract C {
// ----
// library: L
// f() -> 8, 7, 1, 2, 7, 12
// gas irOptimized: 172153
// gas legacy: 164775
// gas legacyOptimized: 162697
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ contract C {
}
}
// ====
// compileViaYul: also
// EVMVersion: >homestead
// compileViaYul: also
// ----
// test_bytes() ->
// gas irOptimized: 516922
// gas legacy: 466763
// gas legacyOptimized: 374537
// test_uint256() ->
// gas irOptimized: 712790
// gas legacy: 634592
// gas legacyOptimized: 499481
3 changes: 3 additions & 0 deletions test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ contract C {
// f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
// f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
// f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3
// gas irOptimized: 110858
// gas legacy: 111328
// gas legacyOptimized: 109206
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ contract C is B {
// compileViaYul: also
// ----
// test() -> 77
// gas irOptimized: 139834
// gas legacy: 156573
// gas legacyOptimized: 112983
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ contract C is B {
// compileViaYul: also
// ----
// test() -> 5, 10
// gas legacy: 100441
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ contract C {
}
}
// ====
// compileViaYul: also
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[][1]): 32, 32, 0 -> true
// f(uint256[][1]): 32, 32, 1, 42 -> true
// f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true
// gas irOptimized: 227663
// gas legacy: 144300
// gas legacyOptimized: 124199
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ contract C {
}
}
// ====
// compileViaYul: also
// EVMVersion: >homestead
// compileViaYul: also
// ----
// h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324
// gas irOptimized: 172714
// gas legacy: 175929
// gas legacyOptimized: 172506
// i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224
// gas irOptimized: 107681
// gas legacy: 109868
// gas legacyOptimized: 107388
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ contract C {
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"
// gas irOptimized: 130305
// gas legacy: 131690
// gas legacyOptimized: 130574
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ contract D {
// ----
// f() -> FAILURE, hex"4e487b71", 0x11
// g(), 100 wei -> 1
// gas legacy: 101718
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ contract Test {
// compileViaYul: also
// ----
// set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06
// gas irOptimized: 200205
// gas legacy: 278685
// gas legacyOptimized: 273734
// data(uint256,uint256): 0x02, 0x02 -> 0x09
// data(uint256,uint256): 0x05, 0x01 -> 0x11
// data(uint256,uint256): 0x06, 0x00 -> FAILURE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@ contract c {
// ----
// storage: empty
// test_short() -> 1780731860627700044960722568376587075150542249149356309979516913770823710
// gas legacy: 110938
// gas legacyOptimized: 109691
// storage: nonempty
// test_long() -> 67
// gas irOptimized: 134832
// gas legacy: 213590
// gas legacyOptimized: 211011
// storage: nonempty
// test_pop() -> 1780731860627700044960722568376592200742329637303199754547598369979433020
// gas legacy: 176030
// gas legacyOptimized: 173470
// storage: nonempty
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 0
// gas irOptimized: 312920
// gas legacy: 483915
// gas legacyOptimized: 478508
3 changes: 3 additions & 0 deletions test/libsolidity/semanticTests/array/bytes_length_member.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ contract c {
// ----
// getLength() -> 0
// set(): 1, 2 -> true
// gas irOptimized: 103213
// gas legacy: 103126
// gas legacyOptimized: 102966
// getLength() -> 68
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ contract c {
// compileViaYul: also
// ----
// store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32
// gas irOptimized: 629040
// gas legacy: 817315
// gas legacyOptimized: 816813
// retrieve() -> 9, 28, 9, 28, 4, 3, 32
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ contract C {
// compileViaYul: also
// ----
// f() -> true
// gas irOptimized: 112029
// gas legacy: 107335
// gas legacyOptimized: 105857
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ contract C {
// compileViaYul: also
// ----
// f() -> true
// gas irOptimized: 253583
// gas legacy: 239061
// gas legacyOptimized: 235988
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ contract C {
// compileViaYul: also
// ----
// f() -> 0
// gas irOptimized: 150551
// gas legacy: 138913
// gas legacyOptimized: 137448
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,11 @@ contract C {
// compileViaYul: also
// ----
// f() -> 0
// gas irOptimized: 112032
// gas legacy: 107306
// gas legacyOptimized: 105861
// g() -> 0
// h() -> 0
// h() -> 0
// gas irOptimized: 112057
// gas legacy: 107328
// gas legacyOptimized: 105903
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000
// gas irOptimized: 247582
// gas legacy: 276683
// gas legacyOptimized: 275534
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ contract c {
// compileViaYul: also
// ----
// test() -> 0x02000202
// gas irOptimized: 2481131
// gas legacy: 2288641
// gas legacyOptimized: 2258654
// storage: empty
// clear() -> 0, 0
// gas irOptimized: 1856788
// gas legacy: 1727169
// gas legacyOptimized: 1698931
// storage: empty
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ contract c {
// compileViaYul: also
// ----
// test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10
// gas irOptimized: 611500
// gas legacy: 604268
// gas legacyOptimized: 603690
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 5, 4
// gas irOptimized: 235646
// gas legacy: 237001
// gas legacyOptimized: 235316
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 3, 4
// gas irOptimized: 195485
// gas legacy: 208853
// gas legacyOptimized: 200341
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 5, 4
// gas irOptimized: 276032
// gas legacy: 264734
// gas legacyOptimized: 263160
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ contract c {
// compileViaYul: also
// ----
// test() -> 9, 4
// gas irOptimized: 100285
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ contract C {
// compileViaYul: also
// ----
// test() -> left(0x01), left(0x02)
// gas legacy: 154001
// gas legacyOptimized: 152385
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ contract c {
}

// ====
// compileViaYul: also
// compileToEwasm: also
// compileViaYul: also
// ----
// test() -> 8, 0
// gas irOptimized: 158935
// gas legacy: 153995
// gas legacyOptimized: 153403
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ contract c {
// compileViaYul: also
// ----
// test() -> 4, 5
// gas irOptimized: 282888
// gas legacy: 255936
// gas legacyOptimized: 254359
// storage: empty
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ contract C {
// compileViaYul: also
// ----
// f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3
// gas irOptimized: 170704
// gas legacy: 163978
// gas legacyOptimized: 158152
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000
// gas irOptimized: 223456
// gas legacy: 328106
// gas legacyOptimized: 308072
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 0x04000000000000000000000000000000000000000000000000, 0x0, 0x0
// gas irOptimized: 109240
// gas legacy: 116651
// gas legacyOptimized: 107000
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0
// gas irOptimized: 290262
// gas legacy: 309353
// gas legacyOptimized: 307699
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ contract c {
// compileViaYul: also
// ----
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00
// gas irOptimized: 269636
// gas legacy: 269681
// gas legacyOptimized: 268753
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ contract c {
// compileViaYul: true
// ----
// test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65
// gas irOptimized: 179776
// test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65
// gas irOptimized: 155253
// test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65
// gas irOptimized: 133521
// test4(uint256[2][2]): 23, 42, 23, 42 -> 65
// gas irOptimized: 107882
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ contract Test {
// compileViaYul: also
// ----
// test() -> 24
// gas irOptimized: 217774
// gas legacy: 215533
// gas legacyOptimized: 214947
// test1() -> 3
// test2() -> 6
// test3() -> 24
// test3() -> 24
// gas irOptimized: 124684
// gas legacy: 122795
// gas legacyOptimized: 121883
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ contract C {
// ====
// compileViaYul: true
// ----
// f((uint128, uint64, uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12
// f((uint128,uint64,uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12
// gas irOptimized: 123327
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ contract C {
// ====
// compileViaYul: true
// ----
// f() -> 10, 11, 12
// f() -> 10, 11, 12
// gas irOptimized: 122695
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ contract C {
// ====
// compileViaYul: true
// ----
// f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1
// f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1
// gas irOptimized: 354585
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ contract C {
// compileViaYul: true
// ----
// f() -> 3, 3, 3, 1
// gas irOptimized: 189829
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ contract C {
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// compileViaYul: also
// ----
// f() -> 1, 2, 3
// gas irOptimized: 135092
// gas legacy: 134419
// gas legacyOptimized: 125440
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ contract Test {
// compileViaYul: also
// ----
// set(uint24[]): 0x20, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 -> 18
// gas irOptimized: 121147
// gas legacy: 125815
// gas legacyOptimized: 123617
// data(uint256): 7 -> 8
// data(uint256): 15 -> 16
// data(uint256): 18 -> FAILURE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ contract c {
// compileViaYul: also
// ----
// set(uint256): 1, 2 -> true
// gas irOptimized: 103365
// gas legacy: 103491
// gas legacyOptimized: 103135
// set(uint256): 2, 2, 3, 4, 5 -> true
// gas irOptimized: 164052
// gas legacy: 164121
// gas legacyOptimized: 163765
// storage: nonempty
// copy(uint256,uint256): 1, 2 -> true
// storage: nonempty
Expand Down
Loading

0 comments on commit b73e9f3

Please sign in to comment.