mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix command line tests for new error reporter.
This commit is contained in:
parent
90d5c98272
commit
f84371b2e0
@ -74,7 +74,7 @@ function compileFull()
|
||||
set +e
|
||||
"$SOLC" $FULLARGS $files >/dev/null 2>"$stderr_path"
|
||||
local exit_code=$?
|
||||
local errors=$(grep -v -E 'Warning: This is a pre-release compiler version|Warning: Experimental features are turned on|pragma experimental ABIEncoderV2|\^-------------------------------\^' < "$stderr_path")
|
||||
local errors=$(grep -v -E 'Warning: This is a pre-release compiler version|Warning: Experimental features are turned on|pragma experimental ABIEncoderV2|^ +--> |^ +\||^[0-9]+ +\|' < "$stderr_path")
|
||||
set -e
|
||||
rm "$stderr_path"
|
||||
|
||||
@ -156,6 +156,9 @@ function test_solc_behaviour()
|
||||
else
|
||||
sed -i -e '/^Warning: This is a pre-release compiler version, please do not use it in production./d' "$stderr_path"
|
||||
sed -i -e 's/ Consider adding "pragma .*$//' "$stderr_path"
|
||||
# Remove trailing empty lines. Needs a line break to make OSX sed happy.
|
||||
sed -i -e '1{/^$/d
|
||||
}' "$stderr_path"
|
||||
fi
|
||||
# Remove path to cpp file
|
||||
sed -i -e 's/^\(Exception while assembling:\).*/\1/' "$stderr_path"
|
||||
|
@ -1,8 +1,14 @@
|
||||
recovery_ast_constructor/input.sol:5:27: Error: Expected primary expression.
|
||||
balances[tx.origin] = ; // missing RHS.
|
||||
^
|
||||
recovery_ast_constructor/input.sol:5:27: Warning: Recovered in Statement at ';'.
|
||||
balances[tx.origin] = ; // missing RHS.
|
||||
^
|
||||
Error: Expected primary expression.
|
||||
--> recovery_ast_constructor/input.sol:5:27:
|
||||
|
|
||||
5 | balances[tx.origin] = ; // missing RHS.
|
||||
| ^
|
||||
|
||||
Warning: Recovered in Statement at ';'.
|
||||
--> recovery_ast_constructor/input.sol:5:27:
|
||||
|
|
||||
5 | balances[tx.origin] = ; // missing RHS.
|
||||
| ^
|
||||
|
||||
|
||||
Compilation halted after AST generation due to errors.
|
||||
|
@ -1,4 +1,6 @@
|
||||
Warning: Yul and its optimizer are still experimental. Please use the output with care.
|
||||
strict_asm_jump/input.sol:1:3: Error: Function not found.
|
||||
{ jump(1) }
|
||||
^--^
|
||||
Error: Function not found.
|
||||
--> strict_asm_jump/input.sol:1:3:
|
||||
|
|
||||
1 | { jump(1) }
|
||||
| ^^^^
|
||||
|
@ -1,6 +1,11 @@
|
||||
too_long_line/input.sol:1:1: Warning: Source file does not specify required compiler version!
|
||||
contract C {
|
||||
^ (Relevant source part starts here and spans across multiple lines).
|
||||
too_long_line/input.sol:2:164: Error: Identifier not found or not unique.
|
||||
... ffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string ...
|
||||
^--------------^
|
||||
Warning: Source file does not specify required compiler version!
|
||||
--> too_long_line/input.sol:1:1:
|
||||
|
|
||||
1 | contract C {
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
||||
Error: Identifier not found or not unique.
|
||||
--> too_long_line/input.sol:2:164:
|
||||
|
|
||||
2 | ... ffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string ...
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
@ -1,6 +1,11 @@
|
||||
too_long_line_both_sides_short/input.sol:1:1: Warning: Source file does not specify required compiler version!
|
||||
contract C {
|
||||
^ (Relevant source part starts here and spans across multiple lines).
|
||||
too_long_line_both_sides_short/input.sol:2:15: Error: Identifier not found or not unique.
|
||||
function f(announcementTypeXXXXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type,
|
||||
^-------------------------------------------------------------------------^
|
||||
Warning: Source file does not specify required compiler version!
|
||||
--> too_long_line_both_sides_short/input.sol:1:1:
|
||||
|
|
||||
1 | contract C {
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
||||
Error: Identifier not found or not unique.
|
||||
--> too_long_line_both_sides_short/input.sol:2:15:
|
||||
|
|
||||
2 | function f(announcementTypeXXXXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,6 +1,11 @@
|
||||
too_long_line_edge_in/input.sol:1:1: Warning: Source file does not specify required compiler version!
|
||||
contract C {
|
||||
^ (Relevant source part starts here and spans across multiple lines).
|
||||
too_long_line_edge_in/input.sol:2:36: Error: Identifier not found or not unique.
|
||||
function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external {
|
||||
^----------------------------------------------------------------------------------------------^
|
||||
Warning: Source file does not specify required compiler version!
|
||||
--> too_long_line_edge_in/input.sol:1:1:
|
||||
|
|
||||
1 | contract C {
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
||||
Error: Identifier not found or not unique.
|
||||
--> too_long_line_edge_in/input.sol:2:36:
|
||||
|
|
||||
2 | function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,6 +1,11 @@
|
||||
too_long_line_edge_out/input.sol:1:1: Warning: Source file does not specify required compiler version!
|
||||
contract C {
|
||||
^ (Relevant source part starts here and spans across multiple lines).
|
||||
too_long_line_edge_out/input.sol:2:37: Error: Identifier not found or not unique.
|
||||
... function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external ...
|
||||
^----------------------------------------------------------------------------------------------^
|
||||
Warning: Source file does not specify required compiler version!
|
||||
--> too_long_line_edge_out/input.sol:1:1:
|
||||
|
|
||||
1 | contract C {
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
||||
Error: Identifier not found or not unique.
|
||||
--> too_long_line_edge_out/input.sol:2:37:
|
||||
|
|
||||
2 | ... function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external ...
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,6 +1,11 @@
|
||||
too_long_line_left_short/input.sol:1:1: Warning: Source file does not specify required compiler version!
|
||||
contract C {
|
||||
^ (Relevant source part starts here and spans across multiple lines).
|
||||
too_long_line_left_short/input.sol:2:15: Error: Identifier not found or not unique.
|
||||
function f(announcementType Type, string Announcement, string ...
|
||||
^--------------^
|
||||
Warning: Source file does not specify required compiler version!
|
||||
--> too_long_line_left_short/input.sol:1:1:
|
||||
|
|
||||
1 | contract C {
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
||||
Error: Identifier not found or not unique.
|
||||
--> too_long_line_left_short/input.sol:2:15:
|
||||
|
|
||||
2 | function f(announcementType Type, string Announcement, string ...
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
@ -1,6 +1,11 @@
|
||||
too_long_line_multiline/input.sol:2:5: Error: No visibility specified. Did you intend to add "public"?
|
||||
function f() returns (byte _b, byte ... _b7, bytes22 _b22, bytes32 _b32) {
|
||||
^ (Relevant source part starts here and spans across multiple lines).
|
||||
too_long_line_multiline/input.sol:1:1: Warning: Source file does not specify required compiler version!
|
||||
contract C {
|
||||
^ (Relevant source part starts here and spans across multiple lines).
|
||||
Error: No visibility specified. Did you intend to add "public"?
|
||||
--> too_long_line_multiline/input.sol:2:5:
|
||||
|
|
||||
2 | function f() returns (byte _b, byte ... _b7, bytes22 _b22, bytes32 _b32) {
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
||||
Warning: Source file does not specify required compiler version!
|
||||
--> too_long_line_multiline/input.sol:1:1:
|
||||
|
|
||||
1 | contract C {
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
@ -1,6 +1,11 @@
|
||||
too_long_line_right_short/input.sol:1:1: Warning: Source file does not specify required compiler version!
|
||||
contract C {
|
||||
^ (Relevant source part starts here and spans across multiple lines).
|
||||
too_long_line_right_short/input.sol:2:164: Error: Identifier not found or not unique.
|
||||
... ffffffffffffffffffffffffffffffffff(announcementType Type,
|
||||
^--------------^
|
||||
Warning: Source file does not specify required compiler version!
|
||||
--> too_long_line_right_short/input.sol:1:1:
|
||||
|
|
||||
1 | contract C {
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
||||
Error: Identifier not found or not unique.
|
||||
--> too_long_line_right_short/input.sol:2:164:
|
||||
|
|
||||
2 | ... ffffffffffffffffffffffffffffffffff(announcementType Type,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user