summaryrefslogtreecommitdiff
path: root/erts/emulator/test/beam_literals_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2020-07-24 06:21:58 +0200
committerLukas Larsson <lukas@erlang.org>2020-09-22 07:51:41 +0200
commit69bc8457f9a4b62164dbc22bbd54d9f760347507 (patch)
treebf4e9f8b12f0ac595bdd6c368b5e5b2a54d8f5d7 /erts/emulator/test/beam_literals_SUITE.erl
parentb3de21a9c694fb299e612b44a4c58979f890264f (diff)
downloaderlang-69bc8457f9a4b62164dbc22bbd54d9f760347507.tar.gz
jit: Further polish and optimize BEAMASM
Co-authored-by: Lukas Larsson <lukas@erlang.org> Co-authored-by: John Högberg <john@erlang.org> Co-authored-by: Dan Gudmundsson <dgud@erlang.org>
Diffstat (limited to 'erts/emulator/test/beam_literals_SUITE.erl')
-rw-r--r--erts/emulator/test/beam_literals_SUITE.erl59
1 files changed, 58 insertions, 1 deletions
diff --git a/erts/emulator/test/beam_literals_SUITE.erl b/erts/emulator/test/beam_literals_SUITE.erl
index 655a64b26b..7b49a99a60 100644
--- a/erts/emulator/test/beam_literals_SUITE.erl
+++ b/erts/emulator/test/beam_literals_SUITE.erl
@@ -143,7 +143,38 @@ matching_bigs_and_smalls(Config) when is_list(Config) ->
e = matching3(42),
f = matching3(-4533),
other = matching3(77),
- other = matching3(39274120984379249874219748).
+ other = matching3(39274120984379249874219748),
+
+ a = matching4(1),
+ b = matching4(5),
+ c = matching4(10),
+ d = matching4(15),
+ e = matching4(20),
+ f = matching4(25),
+ big = matching4(79379377983497837983789333),
+ g = matching4(30),
+ h = matching4(35),
+ i = matching4(40),
+ j = matching4(45),
+ k = matching4(50),
+ other = matching4(a),
+ other = matching4(383793474329747922),
+
+ x = matching5(1),
+ y = matching5(2),
+ z = matching5(3),
+ xx = matching5(4),
+ yy = matching5(5),
+ zz = matching5(6),
+ xxx = matching5(7),
+ yyy = matching5(8),
+ zzz = matching5(9),
+ big = matching5(1 bsl 128),
+ other = matching5(0),
+ other = matching5(10),
+ other = matching5(-1111111111111111111111111111111111111),
+
+ ok.
%% Mixed small and big.
@@ -155,6 +186,32 @@ matching3(42) -> e;
matching3(-4533) -> f;
matching3(_) -> other.
+matching4(1) -> a;
+matching4(5) -> b;
+matching4(10) -> c;
+matching4(15) -> d;
+matching4(20) -> e;
+matching4(25) -> f;
+matching4(79379377983497837983789333) -> big;
+matching4(30) -> g;
+matching4(35) -> h;
+matching4(40) -> i;
+matching4(45) -> j;
+matching4(50) -> k;
+matching4(_) -> other.
+
+matching5(1) -> x;
+matching5(2) -> y;
+matching5(3) -> z;
+matching5(4) -> xx;
+matching5(5) -> yy;
+matching5(6) -> zz;
+matching5(7) -> xxx;
+matching5(8) -> yyy;
+matching5(9) -> zzz;
+matching5(1 bsl 128) -> big;
+matching5(_) -> other.
+
%% Test literal badmatches with big number and floats.
badmatch(Config) when is_list(Config) ->
%% We are satisfied if we can load this module and run it.