diff options
author | Björn Gustavsson <[email protected]> | 2016-08-22 12:25:42 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-08-22 12:25:42 +0200 |
commit | be3cd8376767967f1bc7079ca4fa0d1c136247a8 (patch) | |
tree | 537cdbde4a21f09345b38bdf5b5c75624c4f12ea /lib/compiler/test/match_SUITE.erl | |
parent | 891d81174d43fb353bf3031f0c83d6f9af92bb0b (diff) | |
parent | a66a2e84ec4c6fb7c19affe43134570caabe8569 (diff) | |
download | otp-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.erl | 10 |
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; |