From b3cc530f47a38dd65d4dfeb3610fe34eb833fb1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 21 Apr 2016 06:40:54 +0200 Subject: 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. --- lib/compiler/test/compilation_SUITE.erl | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'lib/compiler/test/compilation_SUITE.erl') 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 - -bin_syntax_5(Config) when is_list(Config) -> - {<<45>>,<<>>} = split({int, 1}, <<1:16,45>>). - -split({int, N}, <>) -> - {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). -- cgit v1.2.3