diff options
author | Sebastian Porto <s@porto5.com> | 2022-06-28 05:21:14 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-27 20:21:14 +0100 |
commit | f3f9aa54c1b9863fef0b2840deecd574f7c28aa6 (patch) | |
tree | 2ea4946fbe40316e759d78168954d60d59007fdb /test | |
parent | 5abe5464d9a633d75949fa305485a5a876c866fd (diff) | |
download | gleam_stdlib-f3f9aa54c1b9863fef0b2840deecd574f7c28aa6.tar.gz gleam_stdlib-f3f9aa54c1b9863fef0b2840deecd574f7c28aa6.zip |
Change implementation of bit_string.concat (#314)
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/bit_string_test.gleam | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/gleam/bit_string_test.gleam b/test/gleam/bit_string_test.gleam index a395672..48f66d6 100644 --- a/test/gleam/bit_string_test.gleam +++ b/test/gleam/bit_string_test.gleam @@ -23,6 +23,14 @@ pub fn append_test() { |> should.equal(<<1, 2, 3, 4>>) } +if erlang { + pub fn append_erlang_only_test() { + <<1, 2:4>> + |> bit_string.append(<<3>>) + |> should.equal(<<1, 2:4, 3>>) + } +} + pub fn concat_test() { [<<1, 2>>] |> bit_string.concat @@ -33,6 +41,14 @@ pub fn concat_test() { |> should.equal(<<1, 2, 3, 4>>) } +if erlang { + pub fn concat_erlang_only_test() { + [<<1, 2:4>>, <<3>>] + |> bit_string.concat + |> should.equal(<<1, 2:4, 3>>) + } +} + pub fn slice_test() { <<"hello":utf8>> |> bit_string.slice(0, 5) |