whiley_test_file 0.6.2

An API for manipulating test files for the Whiley Programming Language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
original.name="Record_Valid_2"
======
>>> main.whiley
type Point is { int x, int y }
type Position is { int x, int y }

function fromXY(int x, int y) -> (Position r)
ensures r.x == x && r.y == y:
    return Point{x:x, y:y}

public export method test():
    Position p = fromXY(1,2)
    //
    assert p.x == 1 && p.y == 2
---