diff options
author | HÃ¥kan Mattsson <[email protected]> | 2012-06-12 13:25:01 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-11-19 10:39:46 +0100 |
commit | 61ec7e2dc50b15e2677771c72a372bf0daf00950 (patch) | |
tree | 2a2581f8adf374ec2061943ebbd5a56d0cd86d6a /lib/wx/test/wx_basic_SUITE.erl | |
parent | 5f3a7727464522da88d07a3012aa87b8703e3f3a (diff) | |
download | otp-61ec7e2dc50b15e2677771c72a372bf0daf00950.tar.gz otp-61ec7e2dc50b15e2677771c72a372bf0daf00950.tar.bz2 otp-61ec7e2dc50b15e2677771c72a372bf0daf00950.zip |
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.
Diffstat (limited to 'lib/wx/test/wx_basic_SUITE.erl')
-rw-r--r-- | lib/wx/test/wx_basic_SUITE.erl | 21 |
1 files changed, 20 insertions, 1 deletions
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) -> |