Mercurial > hg > may
diff yetilab/vector/test/test_vector.yeti @ 260:de770971a628
Rename and reorder args of at and slice functions in matrix and vector for consistency with std module equivalents
author | Chris Cannam |
---|---|
date | Wed, 22 May 2013 13:54:15 +0100 |
parents | 77c6a81c577f |
children | c7efd12c27c5 |
line wrap: on
line diff
--- a/yetilab/vector/test/test_vector.yeti Wed May 22 09:22:10 2013 +0100 +++ b/yetilab/vector/test/test_vector.yeti Wed May 22 13:54:15 2013 +0100 @@ -75,24 +75,11 @@ w'' = vec.ones 3; vec.equal v w and not vec.equal v w' and not vec.equal v w''; ), -/* -"copyOf-empty": \( - vec.equal (vec.fromList []) (vec.copyOf (vec.fromList [])) -), -"copyOf": \( +"slice": \( v = vec.fromList [1,2,3,4]; - w = vec.copyOf v; - vec.equal v w and ( - v[0] := 0; // check result is not aliasing inputs - not vec.equal v w - ); -), -*/ -"rangeOf": \( - v = vec.fromList [1,2,3,4]; - vec.equal (vec.rangeOf 0 4 v) v and ( - vec.equal (vec.rangeOf 2 2 v) (vec.fromList [3,4]) + vec.equal (vec.slice v 0 4) v and ( + vec.equal (vec.slice v 2 4) (vec.fromList [3,4]) ) ), @@ -109,9 +96,6 @@ x = vec.concat [v, w]; x' = vec.fromList [1,2,3,4,5,6]; vec.equal x x' and -/* (v[0] := 0; // check result is not aliasing inputs - w[0] := 0; - vec.equal x x') and */ vec.equal x' (vec.concat [x', vec.fromList []]) and vec.equal x' (vec.concat [vec.fromList [], x']) ),