mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
SolidityNatspecJSON: Manual conversion of two test cases that would not be handled correctly by the script
- dev_multiple_params_mixed_whitespace has whitespace that is not completely preserved - dev_explicit_inherit_complex is a multi-file test
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
==== Source: Interfaces.sol ====
|
||||
interface ERC20 {
|
||||
/// Transfer ``amount`` from ``msg.sender`` to ``to``.
|
||||
/// @dev test
|
||||
/// @param to address to transfer to
|
||||
/// @param amount amount to transfer
|
||||
function transfer(address to, uint amount) external returns (bool);
|
||||
}
|
||||
|
||||
interface ERC21 {
|
||||
/// Transfer ``amount`` from ``msg.sender`` to ``to``.
|
||||
/// @dev test2
|
||||
/// @param to address to transfer to
|
||||
/// @param amount amount to transfer
|
||||
function transfer(address to, uint amount) external returns (bool);
|
||||
}
|
||||
|
||||
==== Source: Testfile.sol ====
|
||||
import "Interfaces.sol" as myInterfaces;
|
||||
|
||||
contract Token is myInterfaces.ERC20, myInterfaces.ERC21 {
|
||||
/// @inheritdoc myInterfaces.ERC20
|
||||
function transfer(address too, uint amount)
|
||||
override(myInterfaces.ERC20, myInterfaces.ERC21) external returns (bool) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// ----
|
||||
// Testfile.sol:Token devdoc
|
||||
// {
|
||||
// "methods":
|
||||
// {
|
||||
// "transfer(address,uint256)":
|
||||
// {
|
||||
// "details": "test",
|
||||
// "params":
|
||||
// {
|
||||
// "amount": "amount to transfer",
|
||||
// "to": "address to transfer to"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -0,0 +1,24 @@
|
||||
contract test {
|
||||
/// @dev Multiplies a number by 7 and adds second parameter
|
||||
/// @param a Documentation for the first parameter
|
||||
/// @param second Documentation for the second parameter
|
||||
function mul(uint a, uint second) public returns (uint d) { return a * 7 + second; }
|
||||
}
|
||||
|
||||
// ----
|
||||
// ----
|
||||
// :test devdoc
|
||||
// {
|
||||
// "methods":
|
||||
// {
|
||||
// "mul(uint256,uint256)":
|
||||
// {
|
||||
// "details": "Multiplies a number by 7 and adds second parameter",
|
||||
// "params":
|
||||
// {
|
||||
// "a": "Documentation for the first parameter",
|
||||
// "second": "Documentation for the second parameter"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user