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
original.name="Array_Valid_11"
======
>>> main.whiley
function copy(int[] a) -> (int[][] b)
ensures |b| == |a|
ensures all {i in 0..|a| | b[i] == a}:
    int n = |a|
    return [a; n]

public export method test():
    assert copy([]) == []
    assert copy([1]) == [[1]]
    assert copy([1,2]) == [[1,2],[1,2]]
    assert copy([1,2,3]) == [[1,2,3], [1,2,3], [1,2,3]]

---