unit test

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

unit test

henaffp
Hello,

I can build and run the entire test suite
/usr/local/bin/quantlib-test-suite

I'm now trying to run a single unit test with
/usr/local/bin/quantlib-test-suite --run_test=xxx

What should xxx look like? If I take the example of the Quotetest suite (quotes.cpp), I see that
the suite is named "Quote tests"

but
/usr/local/bin/quantlib-test-suite --run_test="Quotes tests"
does not work, nor many variations on that theme.

Could anyone indicate how to do this?

Thanks in advance

Patrick Hénaff
Reply | Threaded
Open this post in threaded view
|

Re: unit test

Kim Kuen Tang

Hi Patrick,

henaffp schrieb:
> Hello,
>
> I can build and run the entire test suite
> /usr/local/bin/quantlib-test-suite
>
> I'm now trying to run a single unit test with
> /usr/local/bin/quantlib-test-suite --run_test=xxx
>  

test cases in quantlib are registered using free functions instead of
arguments. So i am afraid that this is not possible.
Take a look at test-suite\utilities.hpp on line 63. It uses
BOOST_TEST_CASE instead of BOOST_AUTO_TEST_CASE. A workaround would be u
just comment the tests out in file quantlibtestsuite.hpp that you dont
want to run.

HTH
-Kim

> What should xxx look like? If I take the example of the Quotetest suite
> (quotes.cpp), I see that
> the suite is named "Quote tests"
>
> but
> /usr/local/bin/quantlib-test-suite --run_test="Quotes tests"
> does not work, nor many variations on that theme.
>
> Could anyone indicate how to do this?
>
> Thanks in advance
>
> Patrick Hénaff
>  


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: unit test

Luigi Ballabio
On Fri, 2010-07-30 at 22:50 +0200, Kim Kuen Tang wrote:
> test cases in quantlib are registered using free functions instead of
> arguments. So i am afraid that this is not possible.
> Take a look at test-suite\utilities.hpp on line 63. It uses
> BOOST_TEST_CASE instead of BOOST_AUTO_TEST_CASE. A workaround would be u
> just comment the tests out in file quantlibtestsuite.hpp that you dont
> want to run.

Kim,
        it's been a while since I've looked at the Boost unit-test framework,
so I'm not familiar with the most recent stuff.  Would you suggest
switching to BOOST_AUTO_TEST_CASE?  If so, would you consider writing a
patch to do that?

Luigi


--

I have yet to see any problem, however complicated, which, when you
looked at it in the right way, did not become still more complicated.
-- Poul Anderson



------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: unit test

Kim Kuen Tang

Hi Luigi,

Luigi Ballabio schrieb:
> On Fri, 2010-07-30 at 22:50 +0200, Kim Kuen Tang wrote:
>  
> Kim,
> it's been a while since I've looked at the Boost unit-test framework,
> so I'm not familiar with the most recent stuff.  Would you suggest
> switching to BOOST_AUTO_TEST_CASE?  
to be honest, i wont suggest to move to the run-by-name version even the
change is straightforward.
The extra feature that you will gain seems not worth the effort.
Or i didnt need this feature in the past. That is why i am not motivated.

What is your opinion?

Kim
> If so, would you consider writing a
> patch to do that?
>
> Luigi
>
>
>  


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: unit test

Luigi Ballabio
On Thu, 2010-08-05 at 22:04 +0200, Kim Kuen Tang wrote:

> Luigi Ballabio schrieb:
> > On Fri, 2010-07-30 at 22:50 +0200, Kim Kuen Tang wrote:
> >  
> > Kim,
> > it's been a while since I've looked at the Boost unit-test framework,
> > so I'm not familiar with the most recent stuff.  Would you suggest
> > switching to BOOST_AUTO_TEST_CASE?  
> to be honest, i wont suggest to move to the run-by-name version even the
> change is straightforward.
> The extra feature that you will gain seems not worth the effort.

Ok, thanks.

Luigi


--

Anyone who says he can see through women is missing a lot.
-- Groucho Marx



------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev