aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/functions/functions_library_1.sol
blob: 2ceb9e607d83b43ea716d053cb6092114ccaf28b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pragma experimental SMTChecker;

library L
{
    function add(uint x, uint y) internal pure returns (uint) {
        require(x < 1000);
        require(y < 1000);
        return x + y;
    }
}

contract C
{
    function f(uint x) public pure {
        uint y = L.add(x, 999);
        assert(y < 10000);
    }
}