From c1d03aff7cb03ce6b430dfb9916df2c02940ab9b Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Mon, 3 Aug 2015 14:44:20 +0200 Subject: 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. --- lib/wx/test/wx_class_SUITE.erl | 13 +++++++++++-- 1 file 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) -> -- cgit v1.2.3