From f3f9aa54c1b9863fef0b2840deecd574f7c28aa6 Mon Sep 17 00:00:00 2001 From: Sebastian Porto Date: Tue, 28 Jun 2022 05:21:14 +1000 Subject: Change implementation of bit_string.concat (#314) --- test/gleam/bit_string_test.gleam | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') 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) -- cgit v1.2.3