diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/bit_array_test.gleam | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/gleam/bit_array_test.gleam b/test/gleam/bit_array_test.gleam index 903b0c8..ca94f1a 100644 --- a/test/gleam/bit_array_test.gleam +++ b/test/gleam/bit_array_test.gleam @@ -279,3 +279,25 @@ pub fn base16_decode_test() { bit_array.base16_decode("a1b2c3d4e5f67891") |> should.equal(Ok(<<161, 178, 195, 212, 229, 246, 120, 145>>)) } + +pub fn inspect_test() { + bit_array.inspect(<<>>) + |> should.equal("<<>>") + + bit_array.inspect(<<80>>) + |> should.equal("<<80>>") + + bit_array.inspect(<<0, 20, 0x20, 255>>) + |> should.equal("<<0, 20, 32, 255>>") +} + +pub fn inspect_base16_test() { + bit_array.inspect_base16(<<>>) + |> should.equal("<<>>") + + bit_array.inspect_base16(<<0x80>>) + |> should.equal("<<80>>") + + bit_array.inspect_base16(<<0, 20, 0x20, 255>>) + |> should.equal("<<00 14 20 FF>>") +} |