[Insight-developers] Tests reworked
William A. Hoffman
bill.hoffman@kitware.com
Thu, 07 Mar 2002 09:30:38 -0500
Thanks.
I don't think this is all the new tests. I have added itkWin32Header.h to
itkMainTest.h, but
that only fixes the main test drivers. It must have been some other change
last night.
All I did was remove the main from each of these files.
-Bill
At 11:28 PM 3/6/2002 -0500, Luis Ibanez wrote:
>Bill,
>
>It looks very nice !,
>
>One minor thing: I'm getting a lot of warnings on VC++ maybe
>because "itkWin32Header.h" is not included on the way.
>
>These are the warning that are disable with pragmas. (e.g. 4876 )
>
>Could it be OK to include itkMacro.h in the .cxx that got all
>the tests ? or maybe directly in the itkMainTest.h ?
>
>Luis
>
>
>============================
>
>William A. Hoffman wrote:
>
>>I have changed all the tests to use the new TestDriver code.
>>
>>To add a new test, you should:
>>
>>1. edit RegisterTests() in the Tests.cxx file for the directory you are
>>working in (itk[Common|Numerics|IO|BasicFilters]Tests.cxx)
>>
>>Add a REGISTER_TEST macro call, with the name of your test:
>>
>>void RegisterTests()
>>{
>>REGISTER_TEST(itkModifiedTimeTest );
>>
>>2. instead of main for your test, you have a function with the same name as
>>the name used in REGISTER_TEST
>>
>>int itkModifiedTimeTest( int, char** )
>>{
>>....}
>>
>>3. Edit the CMakeLists.txt file
>>3.1 add the test file to the Tests source list:
>>SOURCE_FILES(BasicTests_SRCS
>>itkModifiedTimeTest
>>3.2. add the test with the ADD_TEST call in cmake, the test name should
>>be the same,
>>but the program that is run is the Tests program for the current directory:
>>
>>ADD_TEST(itkModifiedTimeTest itkCommonTests itkModifiedTimeTest)
>>
>>
>>That is all. Let me know if there are problems.
>>
>>ITK is now down from 240 to 24 projects in the microsoft workspace!
>>
>>-Bill
>>
>>
>>_______________________________________________
>>Insight-developers mailing list
>>Insight-developers@public.kitware.com
>>http://public.kitware.com/mailman/listinfo/insight-developers
>
>
>