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
This commit is contained in:
parent
fbb0d4f878
commit
a21856f76b
@ -1,3 +1,75 @@
|
||||
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.
|
||||
|
||||
2007-03-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/bits/stl_algo.h (swap_ranges): Move...
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
@ -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;
|
||||
};
|
Loading…
Reference in New Issue
Block a user