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
js.compile.ignore=true
=====
>>> main.whiley
property update(int[] items, int x, int y) -> (int[] r):
   if x >= 0 && x < |items|:
      return items[x:=y]
   else:
      return items
    
public export method test():
   int[] xs = [1,2,3]
   assert update(xs,0,2) == [2,2,3]
   assert update(xs,1,4) == [1,4,3]
   assert update(xs,2,123) == [1,2,123]   
---