[Insight-developers] REGISTER_TESTS

Miller, James V (Research) millerjv@crd.ge.com
Tue, 23 Apr 2002 08:42:50 -0400


I guess my problem was that I wanted each of the "repeated"
tests to show up in the text menu.  With only one REGISTER_TEST
call, the "test function" is listed only once in the text menu.

I guess is it really a difference between what is a "test" (Dart)
and what is a "test entry point" or "test function" (REGISTER_TEST).

I guess at a minimum it would be nice to be able to indicate whether
a test needs additional arguments and either (1) not list these tests 
in the text menu, or (2) once a test is selected from the test menu
it prompts for the additional arguments.



-----Original Message-----
From: William A. Hoffman [mailto:bill.hoffman@kitware.com]
Sent: Monday, April 22, 2002 9:54 PM
To: Miller, James V (Research); Insight-developers (E-mail)
Subject: Re: [Insight-developers] REGISTER_TESTS


At 03:51 PM 4/22/2002 -0400, Miller, James V (Research) wrote:
>I just ran into a "problem" with the REGISTER_TESTS macro.  Not sure how 
>to proceed.
>
><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" 
>/>REGISTER_TEST assumes the test name matches the test function.
>
>I just wanted to add a series of tests where in Dart I give the tests 
>different names and different
>arguments but they all map to the same function. REGISTER_TEST does not 
>support this.
>

The REGISTER_TEST and Dart are separate issues.

So if you had a function called test1, you would do this:
REGISTER_TEST(test1)

Then in the CMakeLists.txt file, you would connect to dart like this:

# create Dart test1, runs testDriver with the first arg as test1 and two args
ADD_TEST(test1 testDriver test1 test1_arg1 test1_arg2)
# create Dart test1, runs testDriver with the first arg as test2 and two args
ADD_TEST(test2 testDriver test1 test2_arg1 test2_arg2)
# create Dart test1, runs testDriver with the first arg as test3 and two args
ADD_TEST(test3 testDriver test1 test3_arg1  test3_arg3)

So, there are three tests with different dart test names that run the same 
function but pass
different arguments into each one.



>Furthermore, if you select the test from the "text menu" no input 
>parameters are passed
>to the tests.
>

This is true.   If you want to pass arguments to a test, you have to pass 
no arguments.
I guess we could change the logic, so that if the first argument is not the 
name of a test,
all arguments are passed on to the menu selection.


>
>
>Jim Miller
>_____________________________________
>Visualization & Computer Vision
>GE Research
>Bldg. KW, Room C218B
>P.O. Box 8, Schenectady NY 12301
>
><mailto:millerjv@research.ge.com>millerjv@research.ge.com
>
>james.miller@research.ge.com
>(518) 387-4005, Dial Comm: 8*833-4005,
>Cell: (518) 505-7065, Fax: (518) 387-6981
>
>
>