More tests for linked-assocs

db4
James Cash 2008-11-11 02:04:40 -05:00
parent a5576bbb1d
commit da3399f31d
1 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,6 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences assocs tools.test linked-assocs ;
USING: kernel sequences assocs tools.test linked-assocs math ;
IN: linked-assocs.test
{ { 1 2 3 } } [
@ -47,3 +47,11 @@ IN: linked-assocs.test
3 "a" pick set-at
[ values ] bi@
] unit-test
{ 9 } [
<linked-hash>
{ [ 3 * ] [ 1- ] } "first" pick set-at
{ [ [ 1- ] bi@ ] [ 2 / ] } "second" pick set-at
4 6 pick values [ first call ] each
+ swap values <reversed> [ second call ] each
] unit-test