aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNatspecJSON.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNatspecJSON.cpp b/test/libsolidity/SolidityNatspecJSON.cpp
index 42b989dd..ac55382b 100644
--- a/test/libsolidity/SolidityNatspecJSON.cpp
+++ b/test/libsolidity/SolidityNatspecJSON.cpp
@@ -635,6 +635,48 @@ BOOST_AUTO_TEST_CASE(dev_documenting_nonexistent_param)
expectNatspecError(sourceCode);
}
+BOOST_AUTO_TEST_CASE(dev_documenting_no_paramname)
+{
+ char const* sourceCode = R"(
+ contract test {
+ /// @dev Multiplies a number by 7 and adds second parameter
+ /// @param a Documentation for the first parameter
+ /// @param
+ function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }
+ }
+ )";
+
+ expectNatspecError(sourceCode);
+}
+
+BOOST_AUTO_TEST_CASE(dev_documenting_no_paramname_end)
+{
+ char const* sourceCode = R"(
+ contract test {
+ /// @dev Multiplies a number by 7 and adds second parameter
+ /// @param a Documentation for the first parameter
+ /// @param se
+ function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }
+ }
+ )";
+
+ expectNatspecError(sourceCode);
+}
+
+BOOST_AUTO_TEST_CASE(dev_documenting_no_param_description)
+{
+ char const* sourceCode = R"(
+ contract test {
+ /// @dev Multiplies a number by 7 and adds second parameter
+ /// @param a Documentation for the first parameter
+ /// @param second
+ function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }
+ }
+ )";
+
+ expectNatspecError(sourceCode);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}