Merge pull request #5685 from androlo/develop

Update command-line tests
This commit is contained in:
chriseth 2019-01-07 15:29:33 +01:00 committed by GitHub
commit 165a689121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
101 changed files with 40 additions and 45 deletions

View File

@ -215,32 +215,27 @@ printTask "Testing passing empty remappings..."
test_solc_behaviour "${0}" "=/some/remapping/target" "" "" 1 "Invalid remapping: \"=/some/remapping/target\"."
test_solc_behaviour "${0}" "ctx:=/some/remapping/target" "" "" 1 "Invalid remapping: \"ctx:=/some/remapping/target\"."
printTask "Running standard JSON commandline tests..."
(
cd "$REPO_ROOT"/test/cmdlineTests/
for file in *.json
do
args="--standard-json"
stdin="$REPO_ROOT/test/cmdlineTests/$file"
stdout=$(cat $file.stdout 2>/dev/null || true)
exitCode=$(cat $file.exit 2>/dev/null || true)
err=$(cat $file.err 2>/dev/null || true)
printTask " - $file"
test_solc_behaviour "" "$args" "$stdin" "$stdout" "$exitCode" "$err"
done
)
printTask "Running general commandline tests..."
(
cd "$REPO_ROOT"/test/cmdlineTests/
for file in *.sol
for tdir in */
do
args=$(cat $file.args 2>/dev/null || true)
stdout=$(cat $file.stdout 2>/dev/null || true)
exitCode=$(cat $file.exit 2>/dev/null || true)
err=$(cat $file.err 2>/dev/null || true)
printTask " - $file"
test_solc_behaviour "$file" "$args" "" "$stdout" "$exitCode" "$err"
if [ -e "${tdir}/input.json" ]
then
inputFile=""
stdin="${tdir}/input.json"
stdout=$(cat ${tdir}/output.json 2>/dev/null || true)
args="--standard-json "$(cat ${tdir}/args 2>/dev/null || true)
else
inputFile="${tdir}input.sol"
stdin=""
stdout=$(cat ${tdir}/output 2>/dev/null || true)
args=$(cat ${tdir}/args 2>/dev/null || true)
fi
exitCode=$(cat ${tdir}/exit 2>/dev/null || true)
err=$(cat ${tdir}/err 2>/dev/null || true)
printTask " - ${tdir}"
test_solc_behaviour "$inputFile" "$args" "$stdin" "$stdout" "$exitCode" "$err"
done
)

View File

@ -1,5 +1,5 @@
======= data_storage.sol:C =======
======= data_storage/input.sol:C =======
Gas estimation:
construction:
306 + 264400 = 264706

View File

@ -1,5 +1,5 @@
======= gas_test_dispatch.sol:Large =======
======= gas_test_dispatch/input.sol:Large =======
Gas estimation:
construction:
1034 + 998400 = 999434
@ -27,7 +27,7 @@ external:
g8(uint256): 20721
g9(uint256): 20678
======= gas_test_dispatch.sol:Medium =======
======= gas_test_dispatch/input.sol:Medium =======
Gas estimation:
construction:
411 + 376600 = 377011
@ -42,7 +42,7 @@ external:
g8(uint256): 20699
g9(uint256): 20655
======= gas_test_dispatch.sol:Small =======
======= gas_test_dispatch/input.sol:Small =======
Gas estimation:
construction:
153 + 107800 = 107953

View File

@ -1,5 +1,5 @@
======= gas_test_dispatch_optimize.sol:Large =======
======= gas_test_dispatch_optimize/input.sol:Large =======
Gas estimation:
construction:
300 + 262000 = 262300
@ -27,7 +27,7 @@ external:
g8(uint256): 20980
g9(uint256): 20826
======= gas_test_dispatch_optimize.sol:Medium =======
======= gas_test_dispatch_optimize/input.sol:Medium =======
Gas estimation:
construction:
190 + 143000 = 143190
@ -42,7 +42,7 @@ external:
g8(uint256): 20870
g9(uint256): 20826
======= gas_test_dispatch_optimize.sol:Small =======
======= gas_test_dispatch_optimize/input.sol:Small =======
Gas estimation:
construction:
117 + 67400 = 67517

View File

@ -1,6 +1,6 @@
too_long_line.sol:1:1: Warning: Source file does not specify required compiler version!
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.sol:2:164: Error: Identifier not found or not unique.
too_long_line/input.sol:2:164: Error: Identifier not found or not unique.
... ffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string ...
^--------------^

View File

@ -1,6 +1,6 @@
too_long_line_both_sides_short.sol:1:1: Warning: Source file does not specify required compiler version!
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.sol:2:15: Error: Identifier not found or not unique.
too_long_line_both_sides_short/input.sol:2:15: Error: Identifier not found or not unique.
function f(announcementTypeXXXXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type,
^-------------------------------------------------------------------------^

View File

@ -1,6 +1,6 @@
too_long_line_edge_in.sol:1:1: Warning: Source file does not specify required compiler version!
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.sol:2:36: Error: Identifier not found or not unique.
too_long_line_edge_in/input.sol:2:36: Error: Identifier not found or not unique.
function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external {
^----------------------------------------------------------------------------------------------^

View File

@ -1,6 +1,6 @@
too_long_line_edge_out.sol:1:1: Warning: Source file does not specify required compiler version!
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.sol:2:37: Error: Identifier not found or not unique.
too_long_line_edge_out/input.sol:2:37: Error: Identifier not found or not unique.
... function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external ...
^----------------------------------------------------------------------------------------------^

View File

@ -1,6 +0,0 @@
too_long_line_left_short.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.sol:2:15: Error: Identifier not found or not unique.
function f(announcementType Type, string Announcement, string ...
^--------------^

View File

@ -0,0 +1,6 @@
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 ...
^--------------^

View File

@ -1,6 +1,6 @@
too_long_line_right_short.sol:1:1: Warning: Source file does not specify required compiler version!
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.sol:2:164: Error: Identifier not found or not unique.
too_long_line_right_short/input.sol:2:164: Error: Identifier not found or not unique.
... ffffffffffffffffffffffffffffffffff(announcementType Type,
^--------------^

Some files were not shown because too many files have changed in this diff Show More