From 5d82d67a37912bb4ee503a818aed54c37f6acc4f Mon Sep 17 00:00:00 2001 From: miampf Date: Sat, 30 Nov 2024 12:35:42 +0100 Subject: [PATCH] reintroduce tests --- test/glitzer_test.gleam | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/glitzer_test.gleam b/test/glitzer_test.gleam index fa54851..332d572 100644 --- a/test/glitzer_test.gleam +++ b/test/glitzer_test.gleam @@ -1,3 +1,4 @@ +import gleam/iterator import gleam/yielder import gleeunit @@ -149,6 +150,23 @@ pub fn progress_finish_test() { |> birdie.snap(title: "Test progresss.finish") } +pub fn progress_map_iterator_test() { + let bar = progress.new_bar() + iterator.empty() + |> progress.map_iterator(bar, fn(_, _) { progress.print_bar(bar) }) + |> pprint.format + |> birdie.snap(title: "Test progress.map_iterator") +} + +pub fn progress_map2_iterator_test() { + let bar = progress.new_bar() + let i1 = iterator.empty() + let i2 = iterator.empty() + progress.map2_iterator(i1, i2, bar, fn(_, _, _) { progress.print_bar(bar) }) + |> pprint.format + |> birdie.snap(title: "Test progress.map2_iterator") +} + pub fn progress_map_yielder_test() { let bar = progress.new_bar() yielder.empty()