lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] BOOST_TEST needed for automated GUI testing?


From: Václav Slavík
Subject: Re: [lmi] BOOST_TEST needed for automated GUI testing?
Date: Mon, 17 Mar 2014 14:05:15 +0100

Hi,

On 16 Mar 2014, at 17:53, Greg Chicares <address@hidden> wrote:
> Is it really important to use lmi's BOOST_TEST macro in
> 'main_wx_test.cpp', or would any other condition-testing
> macro do as well?

It isn’t, I did it for consistency with other tests - it doesn’t make much 
sense to use two different test frameworks, does it?

Would it make sense to either

a) decouple test_tools.hpp from cpp_main.cpp, require the latter to be 
explicitly included and implement a similar, but not identical, version in 
main_wx_test.cpp; or

b) have some BOOST_TEST_ALLOW_UNRECOGNIZED_OPTIONS symbol, #define it in 
main_wx_test.cpp before including test_tools.hpp and modify cpp_main.cpp to 
report options errors only if this symbol is not defined

instead? Then the same set of macros could be used without this conflict.

> I run the commands above, this appears on the console:
>  C:\opt\lmi\lmi-20140316T1359Z\wx_test.exe: unrecognized option 
> '--data_path=/opt/lmi/data'
>  Unrecognized option '--data_path=/opt/lmi/data’.

Ah, I didn’t notice this in my testing because it scrolled off the window and 
the test executed.

> and this messagebox pops up:
>  wxWidgets Debug Alert
>  /opt/lmi/local/include/wx-3.0/wx/testing.h(268): \
>    assert "Assert failure" failed in ReportFailure(): \
>    Expected wxDialog dialog was not shown.
>  Do you want to stop the program?
>  You can also choose [Cancel] to suppress further warnings.
>  Yes   No   Cancel

This doesn’t happen here. This isn’t something that could be easily explained 
by compiler differences (and I tested with MinGW too when testing my makefile 
changes anyway), nor do I see any relevant changes in the SVN version of the 
patches.  I suspect it may be something in wx that was only fixed after 3.0 was 
released (I used a more recent snapshot) - I’ll rebuild with 3.0 and retest.

> As far as I can guess, the "unrecognized option" warning
> interferes with the GUI test, causing it to fail before
> expect_about_dialog::OnInvoked() is even called.

That would make some sense if the error was reported via wxLog(), but it isn’t.

Regards,
Vaclav


reply via email to

[Prev in Thread] Current Thread [Next in Thread]