summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/tr1
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/tr1')
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc11
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/string.cc11
2 files changed, 22 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;
};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/string.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/string.cc
index bcedd4966da..9e6a9adc9a2 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/string.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/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<wchar_t> test_type;
+ typedef __gnu_test::tracker_allocator<wchar_t> alloc_type;
+
+ std::basic_string<wchar_t, std::char_traits<wchar_t>, alloc_type> s(L"a*b");
+ test_type re(s);
+}
+
int
main()
{
test01();
+ test02();
return 0;
};