|
Boost Users : |
Subject: [Boost-users] [utf] global fixture problem
From: Olaf Peter (ope-devel_at_[hidden])
Date: 2010-06-07 07:43:54
Hi,
in the following snippet I get the compiler error:
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
// Boost.Test
#define BOOST_TEST_MODULE Unit_test_example_09
#include <boost/test/unit_test.hpp>
// STL
#include <iostream>
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)?
Thanks,
Olaf
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