mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5685 from androlo/develop
Update command-line tests
This commit is contained in:
commit
165a689121
@ -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}" "=/some/remapping/target" "" "" 1 "Invalid remapping: \"=/some/remapping/target\"."
|
||||||
test_solc_behaviour "${0}" "ctx:=/some/remapping/target" "" "" 1 "Invalid remapping: \"ctx:=/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..."
|
printTask "Running general commandline tests..."
|
||||||
(
|
(
|
||||||
cd "$REPO_ROOT"/test/cmdlineTests/
|
cd "$REPO_ROOT"/test/cmdlineTests/
|
||||||
for file in *.sol
|
for tdir in */
|
||||||
do
|
do
|
||||||
args=$(cat $file.args 2>/dev/null || true)
|
if [ -e "${tdir}/input.json" ]
|
||||||
stdout=$(cat $file.stdout 2>/dev/null || true)
|
then
|
||||||
exitCode=$(cat $file.exit 2>/dev/null || true)
|
inputFile=""
|
||||||
err=$(cat $file.err 2>/dev/null || true)
|
stdin="${tdir}/input.json"
|
||||||
printTask " - $file"
|
stdout=$(cat ${tdir}/output.json 2>/dev/null || true)
|
||||||
test_solc_behaviour "$file" "$args" "" "$stdout" "$exitCode" "$err"
|
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
|
done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
======= data_storage.sol:C =======
|
======= data_storage/input.sol:C =======
|
||||||
Gas estimation:
|
Gas estimation:
|
||||||
construction:
|
construction:
|
||||||
306 + 264400 = 264706
|
306 + 264400 = 264706
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
======= gas_test_dispatch.sol:Large =======
|
======= gas_test_dispatch/input.sol:Large =======
|
||||||
Gas estimation:
|
Gas estimation:
|
||||||
construction:
|
construction:
|
||||||
1034 + 998400 = 999434
|
1034 + 998400 = 999434
|
||||||
@ -27,7 +27,7 @@ external:
|
|||||||
g8(uint256): 20721
|
g8(uint256): 20721
|
||||||
g9(uint256): 20678
|
g9(uint256): 20678
|
||||||
|
|
||||||
======= gas_test_dispatch.sol:Medium =======
|
======= gas_test_dispatch/input.sol:Medium =======
|
||||||
Gas estimation:
|
Gas estimation:
|
||||||
construction:
|
construction:
|
||||||
411 + 376600 = 377011
|
411 + 376600 = 377011
|
||||||
@ -42,7 +42,7 @@ external:
|
|||||||
g8(uint256): 20699
|
g8(uint256): 20699
|
||||||
g9(uint256): 20655
|
g9(uint256): 20655
|
||||||
|
|
||||||
======= gas_test_dispatch.sol:Small =======
|
======= gas_test_dispatch/input.sol:Small =======
|
||||||
Gas estimation:
|
Gas estimation:
|
||||||
construction:
|
construction:
|
||||||
153 + 107800 = 107953
|
153 + 107800 = 107953
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
======= gas_test_dispatch_optimize.sol:Large =======
|
======= gas_test_dispatch_optimize/input.sol:Large =======
|
||||||
Gas estimation:
|
Gas estimation:
|
||||||
construction:
|
construction:
|
||||||
300 + 262000 = 262300
|
300 + 262000 = 262300
|
||||||
@ -27,7 +27,7 @@ external:
|
|||||||
g8(uint256): 20980
|
g8(uint256): 20980
|
||||||
g9(uint256): 20826
|
g9(uint256): 20826
|
||||||
|
|
||||||
======= gas_test_dispatch_optimize.sol:Medium =======
|
======= gas_test_dispatch_optimize/input.sol:Medium =======
|
||||||
Gas estimation:
|
Gas estimation:
|
||||||
construction:
|
construction:
|
||||||
190 + 143000 = 143190
|
190 + 143000 = 143190
|
||||||
@ -42,7 +42,7 @@ external:
|
|||||||
g8(uint256): 20870
|
g8(uint256): 20870
|
||||||
g9(uint256): 20826
|
g9(uint256): 20826
|
||||||
|
|
||||||
======= gas_test_dispatch_optimize.sol:Small =======
|
======= gas_test_dispatch_optimize/input.sol:Small =======
|
||||||
Gas estimation:
|
Gas estimation:
|
||||||
construction:
|
construction:
|
||||||
117 + 67400 = 67517
|
117 + 67400 = 67517
|
@ -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 {
|
contract C {
|
||||||
^ (Relevant source part starts here and spans across multiple lines).
|
^ (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 ...
|
... ffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string ...
|
||||||
^--------------^
|
^--------------^
|
@ -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 {
|
contract C {
|
||||||
^ (Relevant source part starts here and spans across multiple lines).
|
^ (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,
|
function f(announcementTypeXXXXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type,
|
||||||
^-------------------------------------------------------------------------^
|
^-------------------------------------------------------------------------^
|
@ -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 {
|
contract C {
|
||||||
^ (Relevant source part starts here and spans across multiple lines).
|
^ (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 {
|
function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external {
|
||||||
^----------------------------------------------------------------------------------------------^
|
^----------------------------------------------------------------------------------------------^
|
@ -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 {
|
contract C {
|
||||||
^ (Relevant source part starts here and spans across multiple lines).
|
^ (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 ...
|
... function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external ...
|
||||||
^----------------------------------------------------------------------------------------------^
|
^----------------------------------------------------------------------------------------------^
|
@ -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 ...
|
|
||||||
^--------------^
|
|
6
test/cmdlineTests/too_long_line_left_short/err
Normal file
6
test/cmdlineTests/too_long_line_left_short/err
Normal 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 ...
|
||||||
|
^--------------^
|
@ -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 {
|
contract C {
|
||||||
^ (Relevant source part starts here and spans across multiple lines).
|
^ (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,
|
... ffffffffffffffffffffffffffffffffff(announcementType Type,
|
||||||
^--------------^
|
^--------------^
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user