diff options
author | HJ <thechairman@thechairman.info> | 2024-02-03 15:10:00 -0500 |
---|---|---|
committer | HJ <thechairman@thechairman.info> | 2024-02-03 15:10:00 -0500 |
commit | 0c869b2782aeecb92dff232b46a499a3821f9f2c (patch) | |
tree | 8010032bf495ad120a4d586a7a96ebc9139e3f32 /aoc2023/build/packages/adglent/src/showtime/tests/test.gleam | |
parent | 96a3c5c179d8d3fff24eb2953e45f8dd15e2714c (diff) | |
download | gleam_aoc-0c869b2782aeecb92dff232b46a499a3821f9f2c.tar.gz gleam_aoc-0c869b2782aeecb92dff232b46a499a3821f9f2c.zip |
cleanup
Diffstat (limited to 'aoc2023/build/packages/adglent/src/showtime/tests/test.gleam')
-rw-r--r-- | aoc2023/build/packages/adglent/src/showtime/tests/test.gleam | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/aoc2023/build/packages/adglent/src/showtime/tests/test.gleam b/aoc2023/build/packages/adglent/src/showtime/tests/test.gleam deleted file mode 100644 index 730f943..0000000 --- a/aoc2023/build/packages/adglent/src/showtime/tests/test.gleam +++ /dev/null @@ -1,57 +0,0 @@ -import showtime/tests/should -import showtime/tests/meta.{type Meta} -import gleam/io - -pub type Test { - Test(meta: Meta, test_function: fn() -> Nil) -} - -pub type MetaShould(t) { - MetaShould(equal: fn(t, t) -> Nil, not_equal: fn(t, t) -> Nil) -} - -pub fn test(meta: Meta, test_function: fn(Meta) -> Nil) { - Test(meta, fn() { test_function(meta) }) -} - -pub fn with_meta(meta: Meta, test_function: fn(MetaShould(a)) -> Nil) { - Test( - meta, - fn() { - test_function(MetaShould( - fn(a, b) { equal(a, b, meta) }, - fn(a, b) { not_equal(a, b, meta) }, - )) - }, - ) -} - -pub fn equal(a: t, b: t, meta: Meta) { - io.debug(a) - io.debug(b) - should.equal_meta(a, b, meta) -} - -pub fn not_equal(a: t, b: t, meta: Meta) { - should.equal_meta(a, b, meta) -} - -pub fn be_ok(a: Result(o, e), meta: Meta) { - should.be_ok_meta(a, meta) -} - -pub fn be_error(a: Result(o, e), meta: Meta) { - should.be_error_meta(a, meta) -} - -pub fn fail(meta: Meta) { - should.fail_meta(meta) -} - -pub fn be_true(a: Bool, meta: Meta) { - should.be_true_meta(a, meta) -} - -pub fn be_false(a: Bool, meta: Meta) { - should.be_false_meta(a, meta) -} |