According to the Git history, this didn't change. The function that is created 
is and always was TESTSUITE_NAME##Test. The test class that is used in this 
function is and always was TESTSUITE_NAME##TestSuite?. See [1] to understand 
the connection.


[1] 
https://github.com/MITK/MITK/blob/v2016.11/Modules/Core/TestingHelper/include/mitkTestingMacros.h#L288-L294


Best,

Stefan

________________________________
Von: Alex Valcourt Caron <[email protected]>
Gesendet: Donnerstag, 29. März 2018 02:48
An: Dinkelacker, Stefan; [email protected]
Betreff: RE: Problem build Test Suite


In fact, I think my problem could be reported as a bug in the 2017.7 version of 
the code.


The MITK_TEST_SUITE_RESITRATION macro has probably been touched ,because in my 
case, the function created by it was name TESTSUITE_NAME##Test instead of 
TESTSUITE_NAME##TestSuite. In the generated test driver however, the forward 
declaration of it is TESTSUITE_NAME##TestSuite.


Alex

________________________________
De : Dinkelacker, Stefan <[email protected]>
Envoyé : 28 mars 2018 15:39:42
À : Alex Valcourt Caron; [email protected]
Objet : AW: Problem build Test Suite


Hi,


see [1] for a compact example of a working test. You usually don't write 
constructors manually in test suites, just your test methods, setUp(), and 
tearDown(). Take attention to the CPPUNIT_TEST_SUITE, MITK_TEST, and 
CPPUNIT_TEST_SUITE_END macros. Probably you forgot MITK_TEST_SUITE_REGISTRATION 
(see last line in [1]).


[1] 
https://github.com/MITK/MITK/blob/master/Modules/Core/test/mitkNodePredicateFunctionTest.cpp?


Best,

Stefan

________________________________
Von: Alex Valcourt Caron <[email protected]>
Gesendet: Mittwoch, 28. März 2018 20:59
An: [email protected]
Betreff: [mitk-users] Problem build Test Suite


Hello,


I am presently writing tests for a module and I have written the suite as 
defined in the documentation.


However, when comes the time to build the driver, I have an undefined reference 
error on the parametric constructor of the suite taking an int and a char** as 
parameters.


Example :


CMakeFiles/VoxsimLibTestDriver.dir/VoxsimLibTestDriver_main.cpp.o:(.rodata+0x18):
 undefined reference to `VoxsimDrawObjectFactoryReadTestSuite(int, char**)'


I tried defining the constructor in the public scope of my class, to no avail.


Can somebody help me ?


Thanks,

Alex
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to