[Qt-interest] QTest and QScript
ivan demakov
ivan.demakov at gmail.com
Fri Aug 27 18:38:04 CEST 2010
On Thursday 26 of August 2010 05:01:52 Mcgovern Rohan wrote:
> ivan demakov said:
> > On Wednesday 25 of August 2010 12:33:46 Rohan McGovern wrote:
> > > Maybe you have a QScriptEngine somewhere which is being statically
> > > initialized (i.e. constructed before main()) ?
> >
> > No.
> > I initialize QScriptEngine in "void Test1::initTestCase()".
> > And linux version of my test works good.
> > But windows version does not.
>
> Maybe you can run your test in a debugger and get a backtrace?
>
more about my project:
1) I has the library that uses Qt Xml and Qt Script.
The dedicated library function reads the config file (in xml format) and
creates zero or more QScriptEngine()'s.
2) I has the application that uses the library.
Both the linux and the windows version of the application works, say, the
same.
3) I has the test application (with Qt Test infrastructure), that tests the
library, and very much helps me to fix the bugs in the library. But the
development in linux environment.
4) After a fixing of the library and the application, I compiled the both in a
windows environment. And noticed the following:
a) the normal gui application works fine.
b) the test application (no use for this, but) does not work.
The total log of the test application looks like this:
********* Start testing of Test1 *********
Config: Using QTest library 4.6.3, Qt 4.6.3
QDEBUG : Test1::initTestCase() new maksi::Maksi()
QDEBUG : Test1::initTestCase() maksi->init("test1.xml")
QScriptEngine: Must construct a Q(Core)Application before a QScriptEngine
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
So, you can see that my test application starts,
and calls the initTestCase() function.
I think, the expression
QTEST_MAIN(Test1)
should create the Q(Core)Application,
and, after that, call the initTestCase() function.
And more, the linux version of the test works as i expect.
And I am sorry, but I can not run the test app in a debuger right now.
Maybe a week after.
--
А шило в мешке ногам покоя не дает
More information about the Qt-interest-old
mailing list