forked from boostorg/regex
Up the warning level, and fix the resulting warnings with msvc, gcc and Intel.
Fix bug in docs and regenerate. [SVN r65208]
This commit is contained in:
@ -19,6 +19,14 @@
|
||||
|
||||
#ifndef BOOST_REGEX_REGRESS_TEST_HPP
|
||||
#define BOOST_REGEX_REGRESS_TEST_HPP
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#ifdef BOOST_INTEL
|
||||
// disable Intel's "remarks":
|
||||
#pragma warning(disable:1418 981 383 1419 7)
|
||||
#endif
|
||||
|
||||
#include <typeinfo>
|
||||
#include "test_not_regex.hpp"
|
||||
#include "test_regex_search.hpp"
|
||||
|
@ -342,13 +342,13 @@ void test_icu(const wchar_t&, const test_regex_search_tag& )
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Expression did not compile when it should have done: " << e.what(), UChar32);
|
||||
}
|
||||
catch(const std::runtime_error& r)
|
||||
catch(const std::runtime_error& e)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Received an unexpected std::runtime_error: " << r.what(), UChar32);
|
||||
BOOST_REGEX_TEST_ERROR("Received an unexpected std::runtime_error: " << e.what(), UChar32);
|
||||
}
|
||||
catch(const std::exception& r)
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Received an unexpected std::exception: " << r.what(), UChar32);
|
||||
BOOST_REGEX_TEST_ERROR("Received an unexpected std::exception: " << e.what(), UChar32);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
@ -418,15 +418,15 @@ void test_icu(const wchar_t&, const test_invalid_regex_tag&)
|
||||
{
|
||||
have_catch = true;
|
||||
}
|
||||
catch(const std::runtime_error& r)
|
||||
catch(const std::runtime_error& e)
|
||||
{
|
||||
have_catch = true;
|
||||
BOOST_REGEX_TEST_ERROR("Expected a bad_expression exception, but a std::runtime_error instead: " << r.what(), wchar_t);
|
||||
BOOST_REGEX_TEST_ERROR("Expected a bad_expression exception, but a std::runtime_error instead: " << e.what(), wchar_t);
|
||||
}
|
||||
catch(const std::exception& r)
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
have_catch = true;
|
||||
BOOST_REGEX_TEST_ERROR("Expected a bad_expression exception, but a std::exception instead: " << r.what(), wchar_t);
|
||||
BOOST_REGEX_TEST_ERROR("Expected a bad_expression exception, but a std::exception instead: " << e.what(), wchar_t);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
@ -624,13 +624,13 @@ void test_icu(const wchar_t&, const test_regex_replace_tag&)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Expression did not compile when it should have done: " << e.what(), UChar32);
|
||||
}
|
||||
catch(const std::runtime_error& r)
|
||||
catch(const std::runtime_error& e)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Received an unexpected std::runtime_error: " << r.what(), UChar32);
|
||||
BOOST_REGEX_TEST_ERROR("Received an unexpected std::runtime_error: " << e.what(), UChar32);
|
||||
}
|
||||
catch(const std::exception& r)
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Received an unexpected std::exception: " << r.what(), UChar32);
|
||||
BOOST_REGEX_TEST_ERROR("Received an unexpected std::exception: " << e.what(), UChar32);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
|
@ -476,5 +476,9 @@ void test_pocessive_repeats()
|
||||
TEST_REGEX_SEARCH("x{1,5}+\\w", perl, "xxxxxa", match_default, make_array(0, 6, -2, -2));
|
||||
TEST_REGEX_SEARCH("x{1,4}+\\w", perl, "xxxxxa", match_default, make_array(0, 5, -2, -2));
|
||||
TEST_REGEX_SEARCH("x{1,3}+\\w", perl, "xxxxxa", match_default, make_array(0, 4, -2, 4, 6, -2, -2));
|
||||
TEST_INVALID_REGEX("\\d+++", perl);
|
||||
TEST_INVALID_REGEX("\\d*++", perl);
|
||||
TEST_INVALID_REGEX("\\d?++", perl);
|
||||
TEST_INVALID_REGEX("\\d{1,2}++", perl);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user