From 117daae14c7779a35659589a842af331fe773d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 25 Feb 2016 15:28:25 +0100 Subject: Eliminate use of test_server:fail/0,1 --- lib/compiler/test/float_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compiler/test/float_SUITE.erl') diff --git a/lib/compiler/test/float_SUITE.erl b/lib/compiler/test/float_SUITE.erl index 60efe4f228..ec64ef6901 100644 --- a/lib/compiler/test/float_SUITE.erl +++ b/lib/compiler/test/float_SUITE.erl @@ -53,7 +53,7 @@ end_per_group(_GroupName, Config) -> pending(Config) when is_list(Config) -> ?line case catch float_mul(1, 1.1e300, 3.14e300) of {'EXIT',{badarith,_}} -> ok; - Other -> ?t:fail({expected_exception,Other}) + Other -> ct:fail({expected_exception,Other}) end, ?line 0.0 = float_sub(2.0). -- cgit v1.2.3 From fc3c64711400be9eae653350213630cb8cb257f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 25 Feb 2016 16:12:09 +0100 Subject: Remove ?line macros --- lib/compiler/test/float_SUITE.erl | 96 +++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'lib/compiler/test/float_SUITE.erl') diff --git a/lib/compiler/test/float_SUITE.erl b/lib/compiler/test/float_SUITE.erl index ec64ef6901..771016812b 100644 --- a/lib/compiler/test/float_SUITE.erl +++ b/lib/compiler/test/float_SUITE.erl @@ -51,11 +51,11 @@ end_per_group(_GroupName, Config) -> %% Shows the effect of pending exceptions on the x86. pending(Config) when is_list(Config) -> - ?line case catch float_mul(1, 1.1e300, 3.14e300) of - {'EXIT',{badarith,_}} -> ok; - Other -> ct:fail({expected_exception,Other}) - end, - ?line 0.0 = float_sub(2.0). + case catch float_mul(1, 1.1e300, 3.14e300) of + {'EXIT',{badarith,_}} -> ok; + Other -> ct:fail({expected_exception,Other}) + end, + 0.0 = float_sub(2.0). float_sub(A)-> catch A - 2.0. @@ -69,11 +69,11 @@ float_mul(Iter, A, B) when is_float(A), is_float(B) -> %% Thanks to Mikael Pettersson and Tobias Lindahl (HiPE). bif_calls(Config) when is_list(Config) -> - ?line {'EXIT',{badarith,_}} = (catch bad_arith(2.0, 1.7)), - ?line {'EXIT',{badarith,_}} = (catch bad_arith_again(2.0, [])), - ?line {'EXIT',{badarith,_}} = (catch bad_arith_xor(2.0, [])), - ?line {'EXIT',{badarith,_}} = (catch bad_arith_hd(2.0, [])), - ?line {'EXIT',{badarith,_}} = (catch bad_negate(2.0, 1.7)), + {'EXIT',{badarith,_}} = (catch bad_arith(2.0, 1.7)), + {'EXIT',{badarith,_}} = (catch bad_arith_again(2.0, [])), + {'EXIT',{badarith,_}} = (catch bad_arith_xor(2.0, [])), + {'EXIT',{badarith,_}} = (catch bad_arith_hd(2.0, [])), + {'EXIT',{badarith,_}} = (catch bad_negate(2.0, 1.7)), ok. bad_arith(X, Y) when is_float(X) -> @@ -114,51 +114,51 @@ bad_negate(X, Y) when is_float(X) -> math_functions(Config) when is_list(Config) -> %% Mostly silly coverage. - ?line 0.0 = math:tan(0), - ?line 0.0 = math:atan2(0, 1), - ?line 0.0 = math:sinh(0), - ?line 1.0 = math:cosh(0), - ?line 0.0 = math:tanh(0), + 0.0 = math:tan(0), + 0.0 = math:atan2(0, 1), + 0.0 = math:sinh(0), + 1.0 = math:cosh(0), + 0.0 = math:tanh(0), 1.0 = math:log2(2), - ?line 1.0 = math:log10(10), - ?line -1.0 = math:cos(math:pi()), - ?line 1.0 = math:exp(0), - ?line 1.0 = math:pow(math:pi(), 0), - ?line 0.0 = math:log(1), - ?line 0.0 = math:asin(0), - ?line 0.0 = math:acos(1), - ?line ?OPTIONAL(0.0, math:asinh(0)), - ?line ?OPTIONAL(0.0, math:acosh(1)), - ?line ?OPTIONAL(0.0, math:atanh(0)), - ?line ?OPTIONAL(0.0, math:erf(0)), - ?line ?OPTIONAL(1.0, math:erfc(0)), - - ?line 0.0 = math:tan(id(0)), - ?line 0.0 = math:atan2(id(0), 1), - ?line 0.0 = math:sinh(id(0)), - ?line 1.0 = math:cosh(id(0)), - ?line 0.0 = math:tanh(id(0)), + 1.0 = math:log10(10), + -1.0 = math:cos(math:pi()), + 1.0 = math:exp(0), + 1.0 = math:pow(math:pi(), 0), + 0.0 = math:log(1), + 0.0 = math:asin(0), + 0.0 = math:acos(1), + ?OPTIONAL(0.0, math:asinh(0)), + ?OPTIONAL(0.0, math:acosh(1)), + ?OPTIONAL(0.0, math:atanh(0)), + ?OPTIONAL(0.0, math:erf(0)), + ?OPTIONAL(1.0, math:erfc(0)), + + 0.0 = math:tan(id(0)), + 0.0 = math:atan2(id(0), 1), + 0.0 = math:sinh(id(0)), + 1.0 = math:cosh(id(0)), + 0.0 = math:tanh(id(0)), 1.0 = math:log2(id(2)), - ?line 1.0 = math:log10(id(10)), - ?line 1.0 = math:exp(id(0)), - ?line 0.0 = math:log(id(1)), - ?line 0.0 = math:asin(id(0)), - ?line 0.0 = math:acos(id(1)), - ?line ?OPTIONAL(0.0, math:asinh(id(0))), - ?line ?OPTIONAL(0.0, math:acosh(id(1))), - ?line ?OPTIONAL(0.0, math:atanh(id(0))), - ?line ?OPTIONAL(0.0, math:erf(id(0))), - ?line ?OPTIONAL(1.0, math:erfc(id(0))), + 1.0 = math:log10(id(10)), + 1.0 = math:exp(id(0)), + 0.0 = math:log(id(1)), + 0.0 = math:asin(id(0)), + 0.0 = math:acos(id(1)), + ?OPTIONAL(0.0, math:asinh(id(0))), + ?OPTIONAL(0.0, math:acosh(id(1))), + ?OPTIONAL(0.0, math:atanh(id(0))), + ?OPTIONAL(0.0, math:erf(id(0))), + ?OPTIONAL(1.0, math:erfc(id(0))), %% Only for coverage (of beam_type.erl). - ?line {'EXIT',{undef,_}} = (catch math:fnurfla(0)), - ?line {'EXIT',{undef,_}} = (catch math:fnurfla(0, 0)), - ?line {'EXIT',{badarg,_}} = (catch float(kalle)), - ?line {'EXIT',{badarith,_}} = (catch name/1), + {'EXIT',{undef,_}} = (catch math:fnurfla(0)), + {'EXIT',{undef,_}} = (catch math:fnurfla(0, 0)), + {'EXIT',{badarg,_}} = (catch float(kalle)), + {'EXIT',{badarith,_}} = (catch name/1), ok. mixed_float_and_int(Config) when is_list(Config) -> - ?line 129.0 = pc(77, 23, 5), + 129.0 = pc(77, 23, 5), ok. pc(Cov, NotCov, X) -> -- cgit v1.2.3