aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-doc/test/fixtures/contracts/NatspecEverything.sol
blob: c6ad3db812a6ba075a90f37f636ef7132b6e6f1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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; }

    /// @dev Fallback @dev
    function () public {}

    /// @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 {}
}