mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 19:05:48 +03:00
b3901ab42f
git-subtree-dir: pkg/arvo git-subtree-mainline:9c8f40bf6c
git-subtree-split:c20e2a185f
36 lines
659 B
Plaintext
36 lines
659 B
Plaintext
/+ *test
|
|
|%
|
|
++ test-set
|
|
;: weld
|
|
%+ expect-eq
|
|
!> (some (sy 1 2 ~))
|
|
!> ((soft (set)) [2 [1 ~ ~] ~])
|
|
::
|
|
%+ expect-eq
|
|
!> ~
|
|
!> ((soft (set)) [2 ~ [1 ~ ~]])
|
|
==
|
|
::
|
|
++ test-map
|
|
;: weld
|
|
%+ expect-eq
|
|
!> (some (my [1 2] [3 4] ~))
|
|
!> ((soft (map)) [[1 2] ~ [[3 4] ~ ~]])
|
|
::
|
|
%+ expect-eq
|
|
!> ~
|
|
!> ((soft (map)) [[1 2] [[3 4] ~ ~] ~])
|
|
==
|
|
::
|
|
++ test-qeu
|
|
;: weld
|
|
%+ expect-eq
|
|
!> (some (~(gas to *(qeu)) "abcd"))
|
|
!> ((soft (qeu)) [98 [100 ~ [99 ~ ~]] [97 ~ ~]])
|
|
::
|
|
%+ expect-eq
|
|
!> ~
|
|
!> ((soft (qeu)) [98 [97 ~ ~] [100 ~ [99 ~ ~]]])
|
|
==
|
|
--
|