whiley_test_file 0.6.2

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


type FileReader is &{int position}

type Reader is {
    FileReader thus,
    method read(FileReader, int) -> (int)
}

method read(FileReader _this, int amount) -> int:
    int r = amount + _this->position
    return r

method openReader() -> Reader:
    FileReader proc = new {position: 123}
    return {thus: proc, read: &read}

public export method test() :
    Reader reader = openReader()
    FileReader target = reader.thus
    int data = reader.read(target, 1)
    assume data == 124

---