diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-04-02 17:06:56 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-04-02 17:06:56 +0800 |
commit | 125ca1d2702da04ff5b6e515d6193a832b80e1f2 (patch) | |
tree | 70f95d9fd8ce913550dc6415927551e684a6f868 /SolidityNatspecJSON.cpp | |
parent | 32d5c950401504e3591ad41ee93459730c1a9ad8 (diff) | |
parent | 9d734e03fd085a3cbd1a403bd63e51da19e165b5 (diff) | |
download | dexon-solidity-125ca1d2702da04ff5b6e515d6193a832b80e1f2.tar dexon-solidity-125ca1d2702da04ff5b6e515d6193a832b80e1f2.tar.gz dexon-solidity-125ca1d2702da04ff5b6e515d6193a832b80e1f2.tar.bz2 dexon-solidity-125ca1d2702da04ff5b6e515d6193a832b80e1f2.tar.lz dexon-solidity-125ca1d2702da04ff5b6e515d6193a832b80e1f2.tar.xz dexon-solidity-125ca1d2702da04ff5b6e515d6193a832b80e1f2.tar.zst dexon-solidity-125ca1d2702da04ff5b6e515d6193a832b80e1f2.zip |
Merge remote-tracking branch 'upstream/develop' into addTests
Conflicts:
test/ttTransactionTestFiller.json
Diffstat (limited to 'SolidityNatspecJSON.cpp')
-rw-r--r-- | SolidityNatspecJSON.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/SolidityNatspecJSON.cpp b/SolidityNatspecJSON.cpp index edfe8986..aeaad196 100644 --- a/SolidityNatspecJSON.cpp +++ b/SolidityNatspecJSON.cpp @@ -176,7 +176,6 @@ BOOST_AUTO_TEST_CASE(dev_and_user_no_doc) "}\n"; char const* devNatspec = "{\"methods\":{}}"; - char const* userNatspec = "{\"methods\":{}}"; checkNatspec(sourceCode, devNatspec, false); @@ -230,6 +229,18 @@ BOOST_AUTO_TEST_CASE(dev_multiple_params) checkNatspec(sourceCode, natspec, false); } +BOOST_AUTO_TEST_CASE(dev_documenting_nonexistant_param) +{ + char const* sourceCode = "contract test {\n" + " /// @dev Multiplies a number by 7 and adds second parameter\n" + " /// @param a Documentation for the first parameter\n" + " /// @param not_existing Documentation for the second parameter\n" + " function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }\n" + "}\n"; + + BOOST_CHECK_THROW(checkNatspec(sourceCode, "", false), DocstringParsingError); +} + BOOST_AUTO_TEST_CASE(dev_mutiline_param_description) { char const* sourceCode = "contract test {\n" @@ -487,17 +498,7 @@ BOOST_AUTO_TEST_CASE(dev_title_at_function_error) " function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }\n" "}\n"; - char const* natspec = "{" - " \"author\": \"Lefteris\"," - " \"title\": \"Just a test contract\"," - " \"methods\":{" - " \"mul(uint256,uint256)\":{ \n" - " \"details\": \"Mul function\"\n" - " }\n" - " }\n" - "}"; - - BOOST_CHECK_THROW(checkNatspec(sourceCode, natspec, false), DocstringParsingError); + BOOST_CHECK_THROW(checkNatspec(sourceCode, "", false), DocstringParsingError); } BOOST_AUTO_TEST_CASE(natspec_notice_without_tag) |