|
Boost Users : |
Subject: Re: [Boost-users] [utf] global fixture problem
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-06-07 11:14:07
AMDG
Olaf Peter wrote:
> utf_global_fixture.cpp: In member function void my_test1::test_method():
> utf_global_fixture.cpp:19: error: check was not declared in this scope
> utf_global_fixture.cpp:20: error: expected ; before do
>
> <snip>
>
> struct MyConfig {
> MyConfig() { std::cout << "global setup part1\n"; }
> ~MyConfig() { std::cout << "global teardown part1\n"; }
> bool check() const { return true;}
> };
>
> // structure MyConfig is used as a global fixture - it's invoked pre and
> post any testing is performed
> BOOST_GLOBAL_FIXTURE( MyConfig )
>
> BOOST_AUTO_TEST_CASE( my_test1 )
> {
> BOOST_REQUIRE( check() )
> BOOST_CHECK( true );
> }
>
>
> isn't the member access like the test case/module fixture (as I did read
> in the docs)?
>
Not for global fixtures. I don't know of any way to make it work.
In Christ,
Steven Watanabe
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