tests: added tests for +tab

This commit is contained in:
Logan Allen 2021-05-04 15:58:47 -05:00
parent c86559071f
commit 59227f8696

View File

@ -9,6 +9,7 @@
(items-from-keys (gulf 0 6))
::
=/ atom-map ((ordered-map @ud @tas) lte)
=/ gte-atom-map ((ordered-map @ud @tas) gte)
::
|%
++ test-ordered-map-gas ^- tang
@ -27,6 +28,34 @@
!> test-items
!> (tap:atom-map a)
::
++ test-ordered-map-tab ^- tang
::
=/ a=(tree [@ud @tas]) (gas:gte-atom-map ~ test-items)
::
%+ expect-eq
!> test-items
!> (tab:gte-atom-map a ~ 7)
::
++ test-ordered-map-tab-starting-from ^- tang
::
=/ a=(tree [@ud @tas]) (gas:gte-atom-map ~ test-items)
=/ small-test-items=(list [@ud @tas])
(items-from-keys (gulf 3 6))
::
%+ expect-eq
!> small-test-items
!> (tab:gte-atom-map a [~ 2] 4)
::
++ test-ordered-map-tab-starting-from-and-count ^- tang
::
=/ a=(tree [@ud @tas]) (gas:gte-atom-map ~ test-items)
=/ small-test-items=(list [@ud @tas])
(items-from-keys (gulf 4 6))
::
%+ expect-eq
!> small-test-items
!> (tab:gte-atom-map a [~ 2] 3)
::
++ test-ordered-map-pop ^- tang
::
=/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items)