aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/guard_SUITE.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-03-08 19:35:31 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-03-11 15:43:10 +0100
commitc062dfc485ad0d51d648701950f77ef8f51d4f35 (patch)
treebc504742a0bdaea8d5cfbe1cd34625b25c78023a /erts/emulator/test/guard_SUITE.erl
parent9042f9f26fc42fc108c3e3711cf3bfdae2d3312d (diff)
downloadotp-c062dfc485ad0d51d648701950f77ef8f51d4f35.tar.gz
otp-c062dfc485ad0d51d648701950f77ef8f51d4f35.tar.bz2
otp-c062dfc485ad0d51d648701950f77ef8f51d4f35.zip
Modernize use of timetraps
Diffstat (limited to 'erts/emulator/test/guard_SUITE.erl')
-rw-r--r--erts/emulator/test/guard_SUITE.erl23
1 files changed, 4 insertions, 19 deletions
diff --git a/erts/emulator/test/guard_SUITE.erl b/erts/emulator/test/guard_SUITE.erl
index 2e03983c4f..78c65c5157 100644
--- a/erts/emulator/test/guard_SUITE.erl
+++ b/erts/emulator/test/guard_SUITE.erl
@@ -20,8 +20,8 @@
-module(guard_SUITE).
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2, bad_arith/1, bad_tuple/1,
+-export([all/0, suite/0,
+ bad_arith/1, bad_tuple/1,
test_heap_guards/1, guard_bifs/1,
type_tests/1,guard_bif_binary_part/1]).
@@ -36,21 +36,6 @@ all() ->
[bad_arith, bad_tuple, test_heap_guards, guard_bifs,
type_tests, guard_bif_binary_part].
-groups() ->
- [].
-
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
bad_arith(doc) -> "Test that a bad arithmetic operation in a guard works correctly.";
bad_arith(Config) when is_list(Config) ->
@@ -81,7 +66,7 @@ bad_tuple1(_) ->
test_heap_guards(doc) -> "";
test_heap_guards(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:minutes(2)),
+ ct:timetrap({minutes, 2}),
?line process_flag(trap_exit, true),
?line Tuple = {a, tuple, is, built, here, xxx},
@@ -98,7 +83,7 @@ test_heap_guards(Config) when is_list(Config) ->
?line 'try'(fun receive_test/1, [Tuple], [Tuple]),
?line 'try'(fun receive_test/1, [List], [List, List]),
?line 'try'(fun receive_test/1, [a], [a]),
- ?line test_server:timetrap_cancel(Dog).
+ ok.
a_case(V) ->
case V of