From 59227f86968350abfb5b4d9a3d6cd36bc6f1d1ee Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Tue, 4 May 2021 15:58:47 -0500 Subject: [PATCH] tests: added tests for +tab --- pkg/arvo/tests/sys/zuse/ordered-map.hoon | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pkg/arvo/tests/sys/zuse/ordered-map.hoon b/pkg/arvo/tests/sys/zuse/ordered-map.hoon index 4191d3e7e..d0c7a8155 100644 --- a/pkg/arvo/tests/sys/zuse/ordered-map.hoon +++ b/pkg/arvo/tests/sys/zuse/ordered-map.hoon @@ -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)