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
16
17
original.name="Subtype_Valid_15"
======
>>> main.whiley
type Point is {int x, int y} where x < y

method mutate(&Point ptr):
    int x = ptr->x
    // preserve invariant
    ptr->x = ptr->y - 1

public export method test():
    &Point p = new {x:1,y:3}
    // Apply mutation
    mutate(p)
    // Check results
    assume (p->x == 2) && (p->y == 3)
---