aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/test/wx_test_lib.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2017-09-14 12:55:48 +0200
committerDan Gudmundsson <[email protected]>2017-09-14 12:55:48 +0200
commitfdc58a6b03fd238a6bd26403cac375f314a9383d (patch)
tree07b9b62aaac243ba84023f1444e2246baac8da8a /lib/wx/test/wx_test_lib.erl
parentdd46b3e151dd2da0a8339134647d69d8520fd922 (diff)
downloadotp-fdc58a6b03fd238a6bd26403cac375f314a9383d.tar.gz
otp-fdc58a6b03fd238a6bd26403cac375f314a9383d.tar.bz2
otp-fdc58a6b03fd238a6bd26403cac375f314a9383d.zip
wx: test remove export_all
Remove unnecessary warnings
Diffstat (limited to 'lib/wx/test/wx_test_lib.erl')
-rw-r--r--lib/wx/test/wx_test_lib.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/wx/test/wx_test_lib.erl b/lib/wx/test/wx_test_lib.erl
index 9f26b8cb9d..af508ff490 100644
--- a/lib/wx/test/wx_test_lib.erl
+++ b/lib/wx/test/wx_test_lib.erl
@@ -24,7 +24,10 @@
%%% Created : 30 Oct 2008 by Dan Gudmundsson <[email protected]>
%%%-------------------------------------------------------------------
-module(wx_test_lib).
--compile(export_all).
+-export([init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2]).
+-export([tc_info/1, log/2, log/4, verbose/4, error/4,
+ flush/0, pick_msg/0, user_available/1, wx_destroy/2, wx_close/2, wait_for_close/0,
+ run_test/2, run_test/3, test_case_evaluator/3]).
-include("wx_test_lib.hrl").
@@ -182,11 +185,15 @@ run_test([], _Config) -> [].
run_test(Module, all, Config) ->
All = [{Module, Test} || Test <- Module:all()],
run_test(All, Config);
+run_test(Module, {group, Group}, Config) ->
+ {_, _, TCs} = lists:keyfind(Group, 1, Module:groups()),
+ All = [{Module, Test} || Test <- TCs],
+ run_test(All, Config);
+
run_test(Module, TestCase, Config) ->
log("Eval test case: ~w~n", [{Module, TestCase}]),
Sec = timer:seconds(1) * 1000,
- {T, Res} =
- timer:tc(?MODULE, eval_test_case, [Module, TestCase, Config]),
+ {T, Res} = timer:tc(fun() -> eval_test_case(Module, TestCase, Config) end),
log("Tested ~w in ~w sec~n", [TestCase, T div Sec]),
{T div Sec, Res}.