1///////////////////////////////////////////////////////////////////////////////
2// test_dynamic.cpp
3//
4// Copyright 2008 Eric Niebler. Distributed under the Boost
5// Software License, Version 1.0. (See accompanying file
6// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8#include <boost/xpressive/xpressive_dynamic.hpp>
9#include <boost/test/unit_test.hpp>
10
11///////////////////////////////////////////////////////////////////////////////
12// test_main
13void test_main()
14{
15 using namespace boost::xpressive;
16
17 std::string str("bar");
18 sregex rx = sregex::compile(begin: "b.*ar");
19 smatch what;
20
21 if(!regex_match(rng&: str, what, re: rx))
22 {
23 BOOST_ERROR("oops");
24 }
25}
26
27using namespace boost::unit_test;
28
29///////////////////////////////////////////////////////////////////////////////
30// init_unit_test_suite
31//
32test_suite* init_unit_test_suite( int argc, char* argv[] )
33{
34 test_suite *test = BOOST_TEST_SUITE("test_dynamic");
35 test->add(BOOST_TEST_CASE(&test_main));
36 return test;
37}
38
39

source code of boost/libs/xpressive/test/test_dynamic.cpp