1 VectorTest
:= UnitTest
clone do(
3 assertEquals(1+2+3+4+5, vector(1,2,3,4,5) sum
)
7 assertEquals(1*2*3*4*5, vector(1,2,3,4,5) product
)
10 testRootMeanSquare
:= method(
11 assertEquals(list(1,2,3,4,5) map(**2) sum
/(5) sqrt
, vector(1,2,3,4,5) rootMeanSquare
)