diff options
author | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-03-31 17:44:00 +0800 |
---|---|---|
committer | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-03-31 17:44:00 +0800 |
commit | 7fb437d0da0819c034b659f7a8ce4f35dd2a8b69 (patch) | |
tree | f2d75a61bc330b1c897d897e65251e9a0a4a9f5f /SolidityNatspecJSON.cpp | |
parent | f07089ffa390c02a81c1dd057329cd34797d5eec (diff) | |
parent | 8860f8d4c3590423f486559b11bf6c2db9bbab7a (diff) | |
download | dexon-solidity-7fb437d0da0819c034b659f7a8ce4f35dd2a8b69.tar dexon-solidity-7fb437d0da0819c034b659f7a8ce4f35dd2a8b69.tar.gz dexon-solidity-7fb437d0da0819c034b659f7a8ce4f35dd2a8b69.tar.bz2 dexon-solidity-7fb437d0da0819c034b659f7a8ce4f35dd2a8b69.tar.lz dexon-solidity-7fb437d0da0819c034b659f7a8ce4f35dd2a8b69.tar.xz dexon-solidity-7fb437d0da0819c034b659f7a8ce4f35dd2a8b69.tar.zst dexon-solidity-7fb437d0da0819c034b659f7a8ce4f35dd2a8b69.zip |
Merge remote-tracking branch 'upstream/develop' into evmjit
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) |