From 61ec7e2dc50b15e2677771c72a372bf0daf00950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Mattsson?= Date: Tue, 12 Jun 2012 13:25:01 +0200 Subject: Enable silent start of wx Add {silent_start, boolean()} option to wx:new/1 in order to be able to suppress error messages during startup of wx. --- lib/wx/test/wx_basic_SUITE.erl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'lib/wx/test/wx_basic_SUITE.erl') diff --git a/lib/wx/test/wx_basic_SUITE.erl b/lib/wx/test/wx_basic_SUITE.erl index 46c72bb453..20115a41fb 100644 --- a/lib/wx/test/wx_basic_SUITE.erl +++ b/lib/wx/test/wx_basic_SUITE.erl @@ -47,7 +47,7 @@ end_per_testcase(Func,Config) -> suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> - [create_window, several_apps, wx_api, wx_misc, + [silent_start, create_window, several_apps, wx_api, wx_misc, data_types, wx_object]. groups() -> @@ -62,6 +62,25 @@ end_per_group(_GroupName, Config) -> %% The test cases +%% test silent start of wx +silent_start(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo); +silent_start(_Config) -> + ?mr(wx_ref, wx:new([])), + wx:destroy(), + + ?mr(wx_ref, wx:new([{silent_start, true}])), + wx:destroy(), + + ?mr(wx_ref, wx:new([{silent_start, true}, {debug, verbose}])), + wx:destroy(), + + ?mr(wx_ref, wx:new([{silent_start, false}])), + wx:destroy(), + + ?mr('EXIT', catch wx:new([{silent_start, foo}])), + + ok. + %% create and test creating a window create_window(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo); create_window(Config) -> -- cgit v1.2.3