[Interest] How to use the ModelTest in my project?

Mark markg85 at gmail.com
Sun Mar 24 20:49:54 CET 2013


Hi,

I'm trying to include the modeltest in my project, but i seem to fail
quite badly doing that. Here is what i'm doing.

1. I'm following this "guide": http://qt-project.org/wiki/Model_Test
which btw is wrong. There is no "modeltest.pri" anymore. There is only
modeltest.pro..
2. i put all the modeltest files in my project.
3. then i add "include(modeltest.pro)" to my pro file
4. then in my main.cpp i add: "#include <modeltest.h>"
-- fine till here --

Now this is where i'm lost. I know that this modeltest is going to
fail because the modeltest itself uses qtest_main(...) or something
like that. My app also has a main so that will certainly cause a
compile error.

But that is the way i want to test it. I can't just "pull" my model
out and put it in the modeltest project. Besides that i don't know how
to run the modeltest that way (the guide is unclear), i also can't
just tear the model out since it is dependent on quite a few other
classes/files.

Any suggestions on how i should be testing my model would be greatly
appreciated.

Cheers,
Mark



More information about the Interest mailing list