summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-11 17:25:23 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-11 17:25:23 +0000
commite375726f9c697a52cdb2a026dffeb2165937a830 (patch)
tree5e1581b4cbf051628f7453eee489702e591a173a /libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc
parente0b61fdb99c1d8584889b2f61b3a5e7960272154 (diff)
downloadgcc-e375726f9c697a52cdb2a026dffeb2165937a830.tar.gz
* include/tr1_impl/regex (basic_regex::basic_regex): Use range
constructor for _M_pattern. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/ string.cc: Test construction from different basic_string type. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/ string.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143275 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc')
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc
index c2fb2c7d51c..39cce6c6472 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc
@@ -25,6 +25,7 @@
#include <string>
#include <tr1/regex>
#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
// Tests C++ string constructor of the basic_regex class.
void test01()
@@ -35,9 +36,19 @@ void test01()
test_type re(s);
}
+void test02()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+ typedef __gnu_test::tracker_allocator<char> alloc_type;
+
+ std::basic_string<char, std::char_traits<char>, alloc_type> s("a*b");
+ test_type re(s);
+}
+
int
main()
{
test01();
+ test02();
return 0;
};