|
Boost Users : |
Subject: Re: [Boost-users] [Boost.Test] Test Ordering?
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2012-11-05 08:34:34
Hi!
On Sun, Nov 4, 2012 at 4:50 PM, John M. Dlugosz <mpbecey7gu_at_[hidden]>wrote:
> If I make unit*test*s in different source files, I need to declare a
> BOOST_AUTO_*TEST*_SUITEin each one, right?
>
No, you can have all test cases in the Master Test suite.
> At link time, these appear in some undetermined order. How can I cause
> them to be run in the desired order instead?
>
I can come up with two ways:
1. Manual registration:
http://www.boost.org/doc/libs/1_46_1/libs/test/doc/html/utf/user-guide/test-organization/manual-test-suite.html
2. Put all test suites in a single cpp file, they will appear in the order
they come in the cpp file. Thus you can write your tests in a header file
and include them in the right order in to the single cpp-file.
When dealing with manual registration you can also add dependencies to the
TCs or test suites. At least it was possible in the previous version of
Boost.Test (1.32 or so). Not sure if this is possible now.
Regards,
Ovanes
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net