Skip to content

Commit 2803dba

Browse files
committed
Add pragmas and SPDX comments to command-line tests to get cleaner error output
1 parent dc4620d commit 2803dba

File tree

34 files changed

+95
-133
lines changed

34 files changed

+95
-133
lines changed

test/cmdlineTests/combined_json_generated_sources/err

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/cmdlineTests/combined_json_generated_sources/input.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: GPL-3.0
2+
pragma solidity >=0.0;
13
pragma abicoder v2;
24

35
contract C {

test/cmdlineTests/dup_opt_peephole/err

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/cmdlineTests/dup_opt_peephole/input.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-License-Identifier: GPL-3.0
2+
pragma solidity >=0.0;
3+
14
contract C {
25
fallback() external {
36
assembly {

test/cmdlineTests/dup_opt_peephole/output

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
======= dup_opt_peephole/input.sol:C =======
33
EVM assembly:
4-
/* "dup_opt_peephole/input.sol":0:111 contract C {... */
4+
/* "dup_opt_peephole/input.sol":60:171 contract C {... */
55
mstore(0x40, 0x80)
66
callvalue
77
dup1
@@ -23,7 +23,7 @@ tag_1:
2323
stop
2424

2525
sub_0: assembly {
26-
/* "dup_opt_peephole/input.sol":0:111 contract C {... */
26+
/* "dup_opt_peephole/input.sol":60:171 contract C {... */
2727
mstore(0x40, 0x80)
2828
callvalue
2929
dup1
@@ -35,19 +35,19 @@ sub_0: assembly {
3535
revert
3636
tag_3:
3737
pop
38-
/* "dup_opt_peephole/input.sol":74:75 0 */
38+
/* "dup_opt_peephole/input.sol":134:135 0 */
3939
0x00
40-
/* "dup_opt_peephole/input.sol":61:76 calldataload(0) */
40+
/* "dup_opt_peephole/input.sol":121:136 calldataload(0) */
4141
calldataload
42-
/* "dup_opt_peephole/input.sol":100:101 x */
42+
/* "dup_opt_peephole/input.sol":160:161 x */
4343
dup1
44-
/* "dup_opt_peephole/input.sol":97:98 0 */
44+
/* "dup_opt_peephole/input.sol":157:158 0 */
4545
0x00
46-
/* "dup_opt_peephole/input.sol":90:102 sstore(0, x) */
46+
/* "dup_opt_peephole/input.sol":150:162 sstore(0, x) */
4747
sstore
48-
/* "dup_opt_peephole/input.sol":47:106 {... */
48+
/* "dup_opt_peephole/input.sol":107:166 {... */
4949
pop
50-
/* "dup_opt_peephole/input.sol":0:111 contract C {... */
50+
/* "dup_opt_peephole/input.sol":60:171 contract C {... */
5151
stop
5252

5353
auxdata: <AUXDATA REMOVED>

test/cmdlineTests/keccak_optimization_low_runs/exit

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
1-
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
2-
--> message_format_utf8/input.sol
3-
4-
Warning: Source file does not specify required compiler version!
5-
--> message_format_utf8/input.sol
6-
71
Warning: Statement has no effect.
8-
--> message_format_utf8/input.sol:2:51:
2+
--> message_format_utf8/input.sol:5:51:
93
|
10-
2 | /* ©©©©ᄅ©©©©© 2017 */ constructor () { unicode"©©©©ᄅ©©©©©" ; }
4+
5 | /* ©©©©ᄅ©©©©© 2017 */ constructor () { unicode"©©©©ᄅ©©©©©" ; }
115
| ^^^^^^^^^^^^^^^^^^^
126

137
Warning: Statement has no effect.
14-
--> message_format_utf8/input.sol:6:25:
8+
--> message_format_utf8/input.sol:9:25:
159
|
16-
6 | unicode"S = π × r²";
10+
9 | unicode"S = π × r²";
1711
| ^^^^^^^^^^^^^^^^^^^
1812

1913
Warning: Statement has no effect.
20-
--> message_format_utf8/input.sol:7:39:
21-
|
22-
7 | /* ₀₁₂₃₄⁵⁶⁷⁸⁹ */ unicode"∑ 1/n! ≈ 2.7"; // tabs in-between
23-
| ^^^^^^^^^^^^^^^^^^^^^
14+
--> message_format_utf8/input.sol:10:39:
15+
|
16+
10 | /* ₀₁₂₃₄⁵⁶⁷⁸⁹ */ unicode"∑ 1/n! ≈ 2.7"; // tabs in-between
17+
| ^^^^^^^^^^^^^^^^^^^^^
2418

2519
Warning: Statement has no effect.
26-
--> message_format_utf8/input.sol:8:30:
27-
|
28-
8 | /* Ŀŏŗėɯ ïƥŝʉɱ */ unicode"μὴ χεῖρον βέλτιστον"; // tabs in-between and inside
29-
| ^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^
20+
--> message_format_utf8/input.sol:11:30:
21+
|
22+
11 | /* Ŀŏŗėɯ ïƥŝʉɱ */ unicode"μὴ χεῖρον βέλτιστον"; // tabs in-between and inside
23+
| ^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^
3024

3125
Warning: Function state mutability can be restricted to pure
32-
--> message_format_utf8/input.sol:12:2:
26+
--> message_format_utf8/input.sol:15:2:
3327
|
34-
12 | function selector() public returns(uint) { // starts with tab
28+
15 | function selector() public returns(uint) { // starts with tab
3529
| ^ (Relevant source part starts here and spans across multiple lines).
36-

test/cmdlineTests/message_format_utf8/input.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-License-Identifier: GPL-3.0
2+
pragma solidity >=0.0;
3+
14
contract Foo {
25
/* ©©©©ᄅ©©©©© 2017 */ constructor () { unicode"©©©©ᄅ©©©©©" ; }
36

test/cmdlineTests/model_checker_engine_none/err

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// Removed to yield a warning, otherwise CI test fails with the expectation
2-
// "no output requested"
3-
//pragma solidity >=0.0;
1+
// SPDX-License-Identifier: GPL-3.0
2+
pragma solidity >=0.0;
3+
44
contract test {
5-
function f(uint x) public pure {
5+
function f(uint x) public pure {
66
assert(x > 0);
7-
}
8-
}
7+
}
8+
}

0 commit comments

Comments
 (0)