aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-doc/test/fixtures/contracts/NatspecEverything.sol
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-09-18 05:14:23 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-09-18 07:31:23 +0800
commit3c7155afb07f17c62d7203c43bddeb4a3c5b7b01 (patch)
tree2b2b1879597f656572c5886845241f35e90214ca /packages/sol-doc/test/fixtures/contracts/NatspecEverything.sol
parenta75981da148c8a300544a559bc01be1770d443cf (diff)
downloaddexon-0x-contracts-3c7155afb07f17c62d7203c43bddeb4a3c5b7b01.tar.gz
dexon-0x-contracts-3c7155afb07f17c62d7203c43bddeb4a3c5b7b01.tar.zst
dexon-0x-contracts-3c7155afb07f17c62d7203c43bddeb4a3c5b7b01.zip
test all the natspec stuff we use in our contracts
Diffstat (limited to 'packages/sol-doc/test/fixtures/contracts/NatspecEverything.sol')
-rw-r--r--packages/sol-doc/test/fixtures/contracts/NatspecEverything.sol37
1 files changed, 37 insertions, 0 deletions
diff --git a/packages/sol-doc/test/fixtures/contracts/NatspecEverything.sol b/packages/sol-doc/test/fixtures/contracts/NatspecEverything.sol
new file mode 100644
index 000000000..3dea03c9a
--- /dev/null
+++ b/packages/sol-doc/test/fixtures/contracts/NatspecEverything.sol
@@ -0,0 +1,37 @@
+pragma solidity ^0.4.24;
+
+/// @title Contract Title
+/// @dev This is a very long documentation comment at the contract level.
+/// It actually spans multiple lines, too.
+contract NatspecEverything {
+ int d;
+
+ /// @dev Constructor @dev
+ /// @param p Constructor @param
+ constructor(int p) public { d = p; }
+
+ /// @notice publicMethod @notice
+ /// @dev publicMethod @dev
+ /// @param p publicMethod @param
+ /// @return publicMethod @return
+ function publicMethod(int p) public pure returns(int r) { return p; }
+
+ /// @notice externalMethod @notice
+ /// @dev externalMethod @dev
+ /// @param p externalMethod @param
+ /// @return externalMethod @return
+ function externalMethod(int p) external pure returns(int r) { return p; }
+
+ /// @dev Here is a really long developer documentation comment, which spans
+ /// multiple lines, for the purposes of making sure that broken lines are
+ /// consolidated into one devdoc comment.
+ function methodWithLongDevdoc(int p) public pure returns(int) { return p; }
+
+ /// @dev AnEvent @dev
+ /// @param p on this event is an integer.
+ event AnEvent(int p);
+
+ /// @dev methodWithSolhintDirective @dev
+ // solhint-disable no-empty-blocks
+ function methodWithSolhintDirective() public pure {}
+}