summaryrefslogtreecommitdiff
path: root/lib/compiler/test/beam_types_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/test/beam_types_SUITE.erl')
-rw-r--r--lib/compiler/test/beam_types_SUITE.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/compiler/test/beam_types_SUITE.erl b/lib/compiler/test/beam_types_SUITE.erl
index b3325d2b9d..c93c349cd9 100644
--- a/lib/compiler/test/beam_types_SUITE.erl
+++ b/lib/compiler/test/beam_types_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2019-2021. All Rights Reserved.
+%% Copyright Ericsson AB 2019-2023. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -101,6 +101,16 @@ binary_absorption(Config) when is_list(Config) ->
A = beam_types:meet(A, beam_types:join(A, B)),
A = beam_types:join(A, beam_types:meet(A, B)),
+ %% Tests that the appendable flag behaves as intended.
+ C = #t_bitstring{size_unit=4,appendable=true},
+ D = #t_bitstring{size_unit=6},
+
+ #t_bitstring{size_unit=12,appendable=true} = beam_types:meet(C, D),
+ #t_bitstring{size_unit=2,appendable=false} = beam_types:join(C, D),
+
+ C = beam_types:meet(C, beam_types:join(C, D)),
+ C = beam_types:join(C, beam_types:meet(C, D)),
+
ok.
integer_absorption(Config) when is_list(Config) ->