aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian Porto <s@porto5.com>2022-06-28 05:21:14 +1000
committerGitHub <noreply@github.com>2022-06-27 20:21:14 +0100
commitf3f9aa54c1b9863fef0b2840deecd574f7c28aa6 (patch)
tree2ea4946fbe40316e759d78168954d60d59007fdb /test
parent5abe5464d9a633d75949fa305485a5a876c866fd (diff)
downloadgleam_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.gleam16
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)