aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/match_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-08-22 12:25:42 +0200
committerBjörn Gustavsson <[email protected]>2016-08-22 12:25:42 +0200
commitbe3cd8376767967f1bc7079ca4fa0d1c136247a8 (patch)
tree537cdbde4a21f09345b38bdf5b5c75624c4f12ea /lib/compiler/test/match_SUITE.erl
parent891d81174d43fb353bf3031f0c83d6f9af92bb0b (diff)
parenta66a2e84ec4c6fb7c19affe43134570caabe8569 (diff)
downloadotp-be3cd8376767967f1bc7079ca4fa0d1c136247a8.tar.gz
otp-be3cd8376767967f1bc7079ca4fa0d1c136247a8.tar.bz2
otp-be3cd8376767967f1bc7079ca4fa0d1c136247a8.zip
Merge branch 'bjorn/compiler/binary-literal-matching'
* bjorn/compiler/binary-literal-matching: Reinstate optimization of binary literal matching Strengthen test case added in 8b83bc0b
Diffstat (limited to 'lib/compiler/test/match_SUITE.erl')
-rw-r--r--lib/compiler/test/match_SUITE.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/compiler/test/match_SUITE.erl b/lib/compiler/test/match_SUITE.erl
index 127679ba69..52b2da05f7 100644
--- a/lib/compiler/test/match_SUITE.erl
+++ b/lib/compiler/test/match_SUITE.erl
@@ -576,7 +576,15 @@ grab_bag_remove_failure([{stretch,_,Mi}=Stretch | Specs], Unit, _MaxFailure) ->
%% Regression in 19.0, reported by Alexei Sholik
literal_binary(_Config) ->
- 3 = literal_binary_match(bar,<<"y">>),
+ 3 = literal_binary_match(bar, <<"y">>),
+
+ %% While we are at it, also test the remaining code paths
+ %% in literal_binary_match/2.
+ 1 = literal_binary_match(bar, <<"x">>),
+ 2 = literal_binary_match(foo, <<"x">>),
+ 3 = literal_binary_match(foo, <<"y">>),
+ fail = literal_binary_match(bar, <<"z">>),
+ fail = literal_binary_match(foo, <<"z">>),
ok.
literal_binary_match(bar, <<"x">>) -> 1;