aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/compilation_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-04-21 06:40:54 +0200
committerBjörn Gustavsson <[email protected]>2016-04-27 10:29:25 +0200
commitb3cc530f47a38dd65d4dfeb3610fe34eb833fb1a (patch)
tree129dcc8fc748e534e69af9117f67a3e88e3a2b4c /lib/compiler/test/compilation_SUITE.erl
parentc8385ccb0e9f57fcd6c2cf0c3a16b1eb4e2a2b9f (diff)
downloadotp-b3cc530f47a38dd65d4dfeb3610fe34eb833fb1a.tar.gz
otp-b3cc530f47a38dd65d4dfeb3610fe34eb833fb1a.tar.bz2
otp-b3cc530f47a38dd65d4dfeb3610fe34eb833fb1a.zip
Move bit syntax test cases from compilation_SUITE to bs_match_SUITE
We used to put code that would crash the compiler into compilation_SUITE_data. That way we would have a failing test case to remind us to fix a bug. Nowadays, we generally fix the bug and write the test case at the same time. Therefore it makes more sense to put the test code directly into a test suite. Move out bin_syntax_1 through bin_syntax_5 test cases. Scrap bin_syntax_6 because it does not longer seems to be relevant. While we are it, rename the fun_shadow/1 test to size_shadow/1. Also make sure that the code produces the correct result.
Diffstat (limited to 'lib/compiler/test/compilation_SUITE.erl')
-rw-r--r--lib/compiler/test/compilation_SUITE.erl32
1 files changed, 1 insertions, 31 deletions
diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl
index 1f64da96ff..6a29016337 100644
--- a/lib/compiler/test/compilation_SUITE.erl
+++ b/lib/compiler/test/compilation_SUITE.erl
@@ -44,9 +44,7 @@ groups() ->
beam_compiler_11,beam_compiler_12,
nested_tuples_in_case_expr,otp_2330,guards,
{group,vsn},otp_2380,otp_2173,otp_4790,
- const_list_256,bin_syntax_1,bin_syntax_2,
- bin_syntax_3,bin_syntax_4,bin_syntax_5,bin_syntax_6,
- live_var,convopts,
+ const_list_256,live_var,convopts,
catch_in_catch,redundant_case,long_string,otp_5076,
complex_guard,otp_5092,otp_5151,otp_5235,otp_5244,
trycatch_4,opt_crash,otp_5404,otp_5436,otp_5481,
@@ -107,13 +105,6 @@ end_per_group(_GroupName, Config) ->
?comp(const_list_256).
-?comp(bin_syntax_1).
-?comp(bin_syntax_2).
-?comp(bin_syntax_3).
-?comp(bin_syntax_4).
-
-?comp(bin_syntax_6).
-
?comp(otp_5076).
?comp(complex_guard).
@@ -121,27 +112,6 @@ end_per_group(_GroupName, Config) ->
?comp(otp_5092).
?comp(otp_5151).
-%%% By Per Gustafsson <[email protected]>
-
-bin_syntax_5(Config) when is_list(Config) ->
- {<<45>>,<<>>} = split({int, 1}, <<1:16,45>>).
-
-split({int, N}, <<N:16,B:N/binary,T/binary>>) ->
- {B,T}.
-
-%% This program works with the old version of the compiler
-%% but, the core erlang that it produces have the same variable appearing
-%% looks like this:
-%%
-%% split({int, N}, <<_core1:16, B:N/binary, T/binary>>) when _core1==N
-%%
-%% with my change it will look like this:
-%%
-%% split({int, N}, <<_core1:16, B:_core1/binary, T/binary>>) when _core1==N
-%%
-%% This means that everything worked fine as long as the pattern
-%% matching order was left-to-right but on core erlang any order should be possible
-
?comp(live_var).
?comp(trycatch_4).