QTest Error
Solved
General and Desktop
-
I am trying to learn unit testing but I have some troubles,
MyTest{
public:
constructorsand destructor;
private slots:
initTestCase()
init()
cleanup()
cleanupTestCase()
void mytest();
void mytest_data();
};
After I addded QTest::addColumn and newRow() in mytest_data() I am getting error : "Type is not registered, please use the Q_DECLARE_METATYPE macro to make it know to Qt's meta-object system" . So I added Q_DECLARE_METATYPE(MyTest) in the end of the header file and now I am getting Error : Code 1 Description moc (path..\bin\moc.exe). -
Hi,
Please show the complete code.
The is likely related to the types you are using in one or more of your columns. -
Again, please show the complete code.
You should also add the relevant build log.