mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix false ////- and /***-natspec
This commit is contained in:
@@ -1146,6 +1146,74 @@ BOOST_AUTO_TEST_CASE(dev_constructor_and_function)
|
||||
checkNatspec(sourceCode, "test", natspec, false);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(slash4)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract test {
|
||||
//// @notice lorem ipsum
|
||||
function f() public { }
|
||||
}
|
||||
)";
|
||||
|
||||
char const* natspec = R"( { "methods": {} } )";
|
||||
|
||||
checkNatspec(sourceCode, "test", natspec, true);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(star3)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract test {
|
||||
/***
|
||||
* @notice lorem ipsum
|
||||
*/
|
||||
function f() public { }
|
||||
}
|
||||
)";
|
||||
|
||||
char const* natspec = R"( { "methods": {} } )";
|
||||
|
||||
checkNatspec(sourceCode, "test", natspec, true);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(slash3_slash3)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract test {
|
||||
/// @notice lorem
|
||||
/// ipsum
|
||||
function f() public { }
|
||||
}
|
||||
)";
|
||||
|
||||
char const* natspec = R"ABCDEF({
|
||||
"methods": {
|
||||
"f()": { "notice": "lorem ipsum" }
|
||||
}
|
||||
})ABCDEF";
|
||||
|
||||
checkNatspec(sourceCode, "test", natspec, true);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(slash3_slash4)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract test {
|
||||
/// @notice lorem
|
||||
//// ipsum
|
||||
function f() public { }
|
||||
}
|
||||
)";
|
||||
|
||||
char const* natspec = R"ABCDEF({
|
||||
"methods": {
|
||||
"f()": { "notice": "lorem" }
|
||||
}
|
||||
})ABCDEF";
|
||||
|
||||
checkNatspec(sourceCode, "test", natspec, true);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user