aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-08-03 14:44:20 +0200
committerDan Gudmundsson <[email protected]>2015-08-14 09:25:56 +0200
commitc1d03aff7cb03ce6b430dfb9916df2c02940ab9b (patch)
tree25819a6b5cc3982de2b90eb3b319fcafb6a961f3 /lib/wx
parent3461837363d82e6c908ac81f664da4372aa3a8b0 (diff)
downloadotp-c1d03aff7cb03ce6b430dfb9916df2c02940ab9b.tar.gz
otp-c1d03aff7cb03ce6b430dfb9916df2c02940ab9b.tar.bz2
otp-c1d03aff7cb03ce6b430dfb9916df2c02940ab9b.zip
wx: Fix assert log test
Did not work on windows, on windows getItem uses wxLogWindow instead of assert in case of out of range, so the test still caused a log window.
Diffstat (limited to 'lib/wx')
-rw-r--r--lib/wx/test/wx_class_SUITE.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 465299a649..93a4c24a84 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -387,9 +387,18 @@ listCtrlSort(Config) ->
Item = wxListItem:new(),
- %% Force an assert on (and debug compiled) which 3.0 is by default
+ %% Test that wx-asserts are sent to error logger
+ %% Force an assert on 3.0 (when debug compiled which it is by default)
wxListItem:setId(Item, 200),
- io:format("Got ~p ~n", [wxListCtrl:getItem(LC, Item)]),
+ case os:type() of
+ {win32, _} ->
+ wxListItem:setColumn(Item, 3),
+ io:format("Got ~p ~n", [wxListCtrl:insertItem(LC, Item)]),
+ wxListItem:setColumn(Item, 0);
+ _ -> %% Uses generic listctrl
+ %% we can't use the code above on linux with wx-2.8.8 because it segfaults.
+ io:format("Got ~p ~n", [wxListCtrl:getItem(LC, Item)])
+ end,
wxListItem:setMask(Item, ?wxLIST_MASK_TEXT),
_List = wx:map(fun(Int) ->