whiley_test_file 0.6.2

An API for manipulating test files for the Whiley Programming Language.
Documentation
original.name="Ensures_Valid_6"
======
>>> main.whiley


type nat is (int x) where x >= 0

function abs(int x) -> (int|null r)
// if we return an int, it cannot be negative
ensures r is int ==> r >= 0:
    //
    if x >= 0:
        return x
    else:
        return null

public export method test():
    assume abs(1) == 1
    assume abs(-1) == null

---