diff options
author | liangdzou <liang.d.zou@gmail.com> | 2018-09-11 03:22:13 +0800 |
---|---|---|
committer | liangdzou <liang.d.zou@gmail.com> | 2018-09-13 09:55:54 +0800 |
commit | 558a4ac49c40761697580e0915490714c4370767 (patch) | |
tree | 6a58a384b8a3600a5186a303f93405fa27a26000 /test/cmdlineErrorReports | |
parent | 9214c7c34f5e4501a50cb29de964bbf04131f9a3 (diff) | |
download | dexon-solidity-558a4ac49c40761697580e0915490714c4370767.tar.gz dexon-solidity-558a4ac49c40761697580e0915490714c4370767.tar.zst dexon-solidity-558a4ac49c40761697580e0915490714c4370767.zip |
give more information (at most 35 chars before and after) for too long lines
add tests for giving more informations for too long lines
add edge tests for giving more informations for too long lines
avoid printing out tailing white space
update test case after avoiding printing out trailing whitespace
update test case for removing the pre-release warning from reference
refactor the code to if-else flavor
rename folder to cmdlineErrorReports under test
rename folder to cmdlineErrorReports under test
ignore whitespace for reference files
avoiding to modify the file stderr_path by call sed without -i option
print ' ...' instead of ' ... ' at the end of a line
Diffstat (limited to 'test/cmdlineErrorReports')
12 files changed, 68 insertions, 0 deletions
diff --git a/test/cmdlineErrorReports/too_long_line.sol b/test/cmdlineErrorReports/too_long_line.sol new file mode 100644 index 00000000..7df1057a --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line.sol @@ -0,0 +1,4 @@ +contract C { + function ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { +} +} diff --git a/test/cmdlineErrorReports/too_long_line.sol.ref b/test/cmdlineErrorReports/too_long_line.sol.ref new file mode 100644 index 00000000..7cad93ee --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line.sol.ref @@ -0,0 +1,7 @@ + +too_long_line.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. + ... ffffffffffffffffffffffffffffffffff(announcementType Type, string Announcement, string ... + ^--------------^ diff --git a/test/cmdlineErrorReports/too_long_line_both_sides_short.sol b/test/cmdlineErrorReports/too_long_line_both_sides_short.sol new file mode 100644 index 00000000..062f0292 --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_both_sides_short.sol @@ -0,0 +1,5 @@ +contract C { + function f(announcementTypeXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type, + string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { +} +} diff --git a/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref b/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref new file mode 100644 index 00000000..f2ea427a --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_both_sides_short.sol.ref @@ -0,0 +1,7 @@ + +too_long_line_both_sides_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_both_sides_short.sol:2:15: Error: Identifier not found or not unique. + function f(announcementTypeXXXXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Type, + ^-------------------------------------------------------------------------^ diff --git a/test/cmdlineErrorReports/too_long_line_edge_in.sol b/test/cmdlineErrorReports/too_long_line_edge_in.sol new file mode 100644 index 00000000..6f181c83 --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_edge_in.sol @@ -0,0 +1,4 @@ +contract C { + function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external { +} +} diff --git a/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref b/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref new file mode 100644 index 00000000..b6699933 --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_edge_in.sol.ref @@ -0,0 +1,7 @@ + +too_long_line_edge_in.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. + function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external { + ^----------------------------------------------------------------------------------------------^ diff --git a/test/cmdlineErrorReports/too_long_line_edge_out.sol b/test/cmdlineErrorReports/too_long_line_edge_out.sol new file mode 100644 index 00000000..29d3cee6 --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_edge_out.sol @@ -0,0 +1,4 @@ +contract C { + function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external { +} +} diff --git a/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref b/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref new file mode 100644 index 00000000..76df589a --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_edge_out.sol.ref @@ -0,0 +1,7 @@ + +too_long_line_edge_out.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. + ... function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external ... + ^----------------------------------------------------------------------------------------------^ diff --git a/test/cmdlineErrorReports/too_long_line_left_short.sol b/test/cmdlineErrorReports/too_long_line_left_short.sol new file mode 100644 index 00000000..2accfcce --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_left_short.sol @@ -0,0 +1,4 @@ +contract C { + function f(announcementType Type, string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { +} +} diff --git a/test/cmdlineErrorReports/too_long_line_left_short.sol.ref b/test/cmdlineErrorReports/too_long_line_left_short.sol.ref new file mode 100644 index 00000000..efaa559d --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_left_short.sol.ref @@ -0,0 +1,7 @@ + +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 ... + ^--------------^ diff --git a/test/cmdlineErrorReports/too_long_line_right_short.sol b/test/cmdlineErrorReports/too_long_line_right_short.sol new file mode 100644 index 00000000..936b3961 --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_right_short.sol @@ -0,0 +1,5 @@ +contract C { + function ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff(announcementType Type, + string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { +} +} diff --git a/test/cmdlineErrorReports/too_long_line_right_short.sol.ref b/test/cmdlineErrorReports/too_long_line_right_short.sol.ref new file mode 100644 index 00000000..2b0c6d8c --- /dev/null +++ b/test/cmdlineErrorReports/too_long_line_right_short.sol.ref @@ -0,0 +1,7 @@ + +too_long_line_right_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_right_short.sol:2:164: Error: Identifier not found or not unique. + ... ffffffffffffffffffffffffffffffffff(announcementType Type, + ^--------------^ |