[Insight-developers] REGISTER_TESTS
William A. Hoffman
bill.hoffman@kitware.com
Mon, 22 Apr 2002 21:53:50 -0400
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
>
>
>