summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorStephen M. Webb <stephen.webb@bregmasoft.com>2007-03-12 21:57:51 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-03-12 21:57:51 +0000
commita21856f76bb601b3dd4f1a180ff07c5420075756 (patch)
treeeaa89ab318e50e578425a151d300e369b806401d /libstdc++-v3/testsuite
parentfbb0d4f87836abb8c0fee3ac8308c80460ecef8c (diff)
downloadgcc-a21856f76bb601b3dd4f1a180ff07c5420075756.tar.gz
regex: Add "boilerplate" implementations.
2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com> * include/tr1/regex: Add "boilerplate" implementations. * testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ translate_nocase.cc: New. * testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ ctor.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex_traits/char/ translate_nocase.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex_traits/char/ ctor.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex/cons/char/ c_string_ecma.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex/cons/char/ default.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex/cons/char/ c_string_grep.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex/cons/char/ c_string_extended.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex/cons/char/ c_string_basic.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex/cons/char/ c_string_awk.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex/cons/char/ c_string_egrep.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/ string_op.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/ string.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/ pstring.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/ cstring_op.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/ cstring.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/ string_op.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/ string.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/ pstring.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/ cstring_op.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/ cstring.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/ default.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/ string.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/ pstring.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/ cstring.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/ default.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/ string.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/ pstring.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/ cstring.cc: Likewise. * testsuite/tr1/7_regular_expressions/match_results/ctors/char/ default.cc: Likewise. From-SVN: r122867
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/cstring.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/cstring_op.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/pstring.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/string.cc44
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/string_op.cc44
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/cstring.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/cstring_op.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/pstring.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/string.cc44
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/string_op.cc44
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/cstring.cc42
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/default.cc47
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/pstring.cc42
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc42
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/cstring.cc42
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/default.cc47
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/pstring.cc42
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc42
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/string.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/match_results/ctors/char/default.cc58
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_awk.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_basic.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_ecma.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_egrep.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_extended.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_grep.cc39
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/default.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/ctor.cc49
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/translate_nocase.cc42
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ctor.cc49
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/translate_nocase.cc42
34 files changed, 1459 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/cstring.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/cstring.cc
new file mode 100644
index 00000000000..6594b286adc
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/cstring.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests assign operation from a C-style null-terminated-string.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ const char* cs = "aab";
+ test_type re;
+ re.assign(cs);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/cstring_op.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/cstring_op.cc
new file mode 100644
index 00000000000..d8db3933b18
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/cstring_op.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests basic_regex assign operator from a C-style null-terminated-string.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ const char* cs = "aab";
+ test_type re;
+ re = cs;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/pstring.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/pstring.cc
new file mode 100644
index 00000000000..fd48a46623a
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/pstring.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests assign operation from a Pascal-style counted-string.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ const char cs[] = "aab";
+ test_type re;
+ re.assign(cs, sizeof(cs)-1, std::tr1::regex_constants::basic);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
new file mode 100644
index 00000000000..e96e169463c
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests range assign of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ char s[] = "a+b|c";
+ test_type re;
+ re.assign(s, s + sizeof(s));
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/string.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/string.cc
new file mode 100644
index 00000000000..57e9a6b1dfd
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/string.cc
@@ -0,0 +1,44 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <string>
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests C++ string assignment of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ std::string s("a*b");
+ test_type re;
+ re.assign(s);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/string_op.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/string_op.cc
new file mode 100644
index 00000000000..a653fbc6f53
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/string_op.cc
@@ -0,0 +1,44 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <string>
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests basic_regex assignment operator from a C++ string;
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ std::string s("a*b");
+ test_type re;
+ re = s;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/cstring.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/cstring.cc
new file mode 100644
index 00000000000..755434044fe
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/cstring.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests assign operation from a C-style null-terminated-string.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ const wchar_t* cs = L"aab";
+ test_type re;
+ re.assign(cs);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/cstring_op.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/cstring_op.cc
new file mode 100644
index 00000000000..f61dbcf22d7
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/cstring_op.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests basic_regex assign operator from a C-style null-terminated-string.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ const wchar_t* cs = L"aab";
+ test_type re;
+ re = cs;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/pstring.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/pstring.cc
new file mode 100644
index 00000000000..bf3de48e94a
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/pstring.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests assign operation from a Pascal-style counted-string.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ const wchar_t cs[] = L"aab";
+ test_type re;
+ re.assign(cs, sizeof(cs)-1, std::tr1::regex_constants::basic);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
new file mode 100644
index 00000000000..ca48cadf880
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests range assign of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ wchar_t s[] = L"a+b|c";
+ test_type re;
+ re.assign(s, s + sizeof(s));
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/string.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/string.cc
new file mode 100644
index 00000000000..a5303e267eb
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/string.cc
@@ -0,0 +1,44 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <string>
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests C++ string assignment of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ std::wstring s(L"a*b");
+ test_type re;
+ re.assign(s);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/string_op.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/string_op.cc
new file mode 100644
index 00000000000..78ac26d8dfe
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/string_op.cc
@@ -0,0 +1,44 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.3] class template basic_regex assign()
+
+#include <string>
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests basic_regex assignment operator from a C++ string;
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ std::wstring s(L"a*b");
+ test_type re;
+ re = s;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/cstring.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/cstring.cc
new file mode 100644
index 00000000000..a349acd8d20
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/cstring.cc
@@ -0,0 +1,42 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests C-style null-terminated-string constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ const char* cs = "aab";
+ test_type re(cs);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/default.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/default.cc
new file mode 100644
index 00000000000..b499a282b7e
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/default.cc
@@ -0,0 +1,47 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests default constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ // default constructor
+ test_type re;
+
+ // Check for required typedefs
+ typedef test_type::value_type value_type;
+ typedef test_type::flag_type flag_type;
+ typedef test_type::locale_type locale_type;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/pstring.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/pstring.cc
new file mode 100644
index 00000000000..827c8bf6af7
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/pstring.cc
@@ -0,0 +1,42 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests Pascal-style counted-string constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ const char* cs = "aab";
+ test_type re(cs, 3, std::tr1::regex_constants::basic);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
new file mode 100644
index 00000000000..53f1f4fc1c8
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
@@ -0,0 +1,42 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests range constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ char s[] = "a+b|c";
+ test_type re(s, s + sizeof(s));
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
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
new file mode 100644
index 00000000000..0924b1c2015
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/string.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <string>
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests C++ string constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<char> test_type;
+
+ std::string s("a*b");
+ test_type re(s);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/cstring.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/cstring.cc
new file mode 100644
index 00000000000..5e8e70347c3
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/cstring.cc
@@ -0,0 +1,42 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests C-style null-terminated-string constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ const wchar_t* cs = L"aab";
+ test_type re(cs);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/default.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/default.cc
new file mode 100644
index 00000000000..efdd81a6e14
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/default.cc
@@ -0,0 +1,47 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests default constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ // default constructor
+ test_type re;
+
+ // Check for required typedefs
+ typedef test_type::value_type value_type;
+ typedef test_type::flag_type flag_type;
+ typedef test_type::locale_type locale_type;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/pstring.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/pstring.cc
new file mode 100644
index 00000000000..f25dee605d8
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/pstring.cc
@@ -0,0 +1,42 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests Pascal-style counted-string constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ const wchar_t* cs = L"aab";
+ test_type re(cs, 3, std::tr1::regex_constants::basic);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
new file mode 100644
index 00000000000..eb9139a9038
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
@@ -0,0 +1,42 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests range constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ wchar_t s[] = L"a+b|c";
+ test_type re(s, s + sizeof(s));
+}
+
+int
+main()
+{
+ test01();
+ 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
new file mode 100644
index 00000000000..6379fecefc4
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/string.cc
@@ -0,0 +1,43 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.8.2] class template basic_regex constructor
+
+#include <string>
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests C++ string constructor of the basic_regex class.
+void test01()
+{
+ typedef std::tr1::basic_regex<wchar_t> test_type;
+
+ std::wstring s(L"a*b");
+ test_type re(s);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/match_results/ctors/char/default.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/match_results/ctors/char/default.cc
new file mode 100644
index 00000000000..124e7acde54
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/match_results/ctors/char/default.cc
@@ -0,0 +1,58 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.10.1] class template match_results constructor
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests default constructor of the match_result class.
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef std::tr1::match_results<char*> test_type;
+
+ // default constructor
+ test_type m;
+
+ // Check for required typedefs
+ typedef test_type::value_type value_type;
+ typedef test_type::const_reference const_reference;
+ typedef test_type::reference reference;
+ typedef test_type::const_iterator const_iterator;
+ typedef test_type::iterator iterator;
+ typedef test_type::difference_type difference_type;
+ typedef test_type::size_type size_type;
+ typedef test_type::allocator_type allocator_type;
+ typedef test_type::char_type char_type;
+ typedef test_type::string_type string_type;
+
+ VERIFY( m.size() == 0 );
+ VERIFY( m.str() == std::basic_string<char_type>() );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_awk.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_awk.cc
new file mode 100644
index 00000000000..0b90859f8dc
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_awk.cc
@@ -0,0 +1,37 @@
+// { dg-do compile }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 7.8.2 basic_regex constructors
+
+#include <tr1/regex>
+
+void
+test01()
+{
+ std::tr1::regex re("(a|b)*abb", std::tr1::regex::awk);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_basic.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_basic.cc
new file mode 100644
index 00000000000..7451f3bd351
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_basic.cc
@@ -0,0 +1,37 @@
+// { dg-do compile }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 7.8.2 basic_regex constructors
+
+#include <tr1/regex>
+
+void
+test01()
+{
+ std::tr1::regex re("(a|b)*abb", std::tr1::regex::basic);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_ecma.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_ecma.cc
new file mode 100644
index 00000000000..8713e64240f
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_ecma.cc
@@ -0,0 +1,37 @@
+// { dg-do compile }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 7.8.2 basic_regex constructors
+
+#include <tr1/regex>
+
+void
+test01()
+{
+ std::tr1::regex re("(a|b)*abb");
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_egrep.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_egrep.cc
new file mode 100644
index 00000000000..dd308cfd4a1
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_egrep.cc
@@ -0,0 +1,37 @@
+// { dg-do compile }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 7.8.2 basic_regex constructors
+
+#include <tr1/regex>
+
+void
+test01()
+{
+ std::tr1::regex re("(a|b)*abb", std::tr1::regex::egrep);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_extended.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_extended.cc
new file mode 100644
index 00000000000..68e7709722d
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_extended.cc
@@ -0,0 +1,43 @@
+// { dg-do run }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 7.8.2 basic_regex constructors
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::regex re("(wee|week)(knights|night)", std::tr1::regex::extended);
+
+ VERIFY( re.flags() == std::tr1::regex::extended );
+ VERIFY( re.mark_count() == 0 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_grep.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_grep.cc
new file mode 100644
index 00000000000..d49e31ce8b4
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/c_string_grep.cc
@@ -0,0 +1,39 @@
+// { dg-do compile }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 7.8.2 basic_regex constructors
+
+#include <tr1/regex>
+
+void
+test01()
+{
+ using std::tr1::regex;
+
+ regex re("(a|b)*abb", regex::grep);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/default.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/default.cc
new file mode 100644
index 00000000000..d2568119633
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex/cons/char/default.cc
@@ -0,0 +1,37 @@
+// { dg-do compile }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 7.8.2 basic_regex constructors
+
+#include <tr1/regex>
+
+void
+test01()
+{
+ std::tr1::regex re;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/ctor.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/ctor.cc
new file mode 100644
index 00000000000..1efb8676517
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/ctor.cc
@@ -0,0 +1,49 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.7] class template regex_traits
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests default constructor of the regex_traits class. There is only the
+// default constructor.
+void test01()
+{
+ typedef std::tr1::regex_traits<char> test_type;
+
+ // required default constructor
+ test_type t;
+
+ // Check for required typedefs
+ typedef test_type::char_type char_type;
+ typedef test_type::string_type string_type;
+ typedef test_type::locale_type locale_type;
+ typedef test_type::char_class_type char_class_type;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/translate_nocase.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/translate_nocase.cc
new file mode 100644
index 00000000000..14d99dd4588
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/translate_nocase.cc
@@ -0,0 +1,42 @@
+// { dg-do run }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.7] class template regex_traits (5) translate_nocase
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests default constructor of the regex_traits class. There is only the
+// default constructor.
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ std::tr1::regex_traits<char> t;
+ VERIFY( t.translate_nocase('A') == 'a' );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ctor.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ctor.cc
new file mode 100644
index 00000000000..4ba65c51185
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ctor.cc
@@ -0,0 +1,49 @@
+// { dg-do link }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.7] class template regex_traits
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests default constructor of the regex_traits class. There is only the
+// default constructor.
+void test01()
+{
+ typedef std::tr1::regex_traits<wchar_t> test_type;
+
+ // required default constructor
+ test_type t;
+
+ // Check for required typedefs
+ typedef test_type::char_type char_type;
+ typedef test_type::string_type string_type;
+ typedef test_type::locale_type locale_type;
+ typedef test_type::char_class_type char_class_type;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/translate_nocase.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/translate_nocase.cc
new file mode 100644
index 00000000000..cb6d9b8c5da
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/translate_nocase.cc
@@ -0,0 +1,42 @@
+// { dg-do run }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// tr1 [7.7] class template regex_traits (5) translate_nocase
+
+#include <tr1/regex>
+#include <testsuite_hooks.h>
+
+// Tests default constructor of the regex_traits class. There is only the
+// default constructor.
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ std::tr1::regex_traits<wchar_t> t;
+ VERIFY( t.translate_nocase(L'A') == L'a' );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};