aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/28_regex
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2013-11-19 23:22:26 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2013-11-19 23:22:26 +0000
commit3c8bceb13ee8dfe40fd4a6e286112cc3b7d96fce (patch)
treeee256d570a02c1fea73e89f92ae8b4bbad6be30b /libstdc++-v3/testsuite/28_regex
parent2d73cc4519cdf4a00eb7975e4429cf398456052e (diff)
downloadgcc-3c8bceb13ee8dfe40fd4a6e286112cc3b7d96fce.zip
gcc-3c8bceb13ee8dfe40fd4a6e286112cc3b7d96fce.tar.gz
gcc-3c8bceb13ee8dfe40fd4a6e286112cc3b7d96fce.tar.bz2
gnu.ver (_ZNSt11regex_errorC*): Export regex_error constructors.
* config/abi/pre/gnu.ver (_ZNSt11regex_errorC*): Export regex_error constructors. * testsuite/20_util/addressof/1.cc: Remove { dg-do compile }. * testsuite/20_util/allocator_traits/members/destroy.cc: Likewise. * testsuite/20_util/allocator_traits/members/select.cc: Likewise. Fix failure. * testsuite/28_regex/basic_regex/ctors/extended/cstring.cc: Likewise. * testsuite/28_regex/init-list.cc: Likewise. * testsuite/28_regex/regex_error/regex_error.cc: Likewise. * testsuite/28_regex/sub_match/length.cc: Likewise. Add main. * testsuite/28_regex/sub_match/cast_char.cc: Likewise. Fix test. * testsuite/28_regex/sub_match/cast_wchar_t.cc: Likewise. * testsuite/tr1/7_regular_expressions/regex/cons/char/ c_string_extended.cc: Delete. From-SVN: r205063
Diffstat (limited to 'libstdc++-v3/testsuite/28_regex')
-rw-r--r--libstdc++-v3/testsuite/28_regex/basic_regex/ctors/extended/cstring.cc3
-rw-r--r--libstdc++-v3/testsuite/28_regex/init-list.cc1
-rw-r--r--libstdc++-v3/testsuite/28_regex/regex_error/regex_error.cc1
-rw-r--r--libstdc++-v3/testsuite/28_regex/sub_match/cast_char.cc9
-rw-r--r--libstdc++-v3/testsuite/28_regex/sub_match/cast_wchar_t.cc9
-rw-r--r--libstdc++-v3/testsuite/28_regex/sub_match/length.cc6
6 files changed, 12 insertions, 17 deletions
diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/extended/cstring.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/extended/cstring.cc
index fa2e009..03c20a4 100644
--- a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/extended/cstring.cc
+++ b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/extended/cstring.cc
@@ -1,4 +1,3 @@
-// { dg-do compile }
// { dg-options "-std=c++0x" }
// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
@@ -33,7 +32,7 @@ test01()
std::regex re("(wee|week)(knights|night)", std::regex::extended);
VERIFY( re.flags() == std::regex::extended );
- VERIFY( re.mark_count() == 0 );
+ VERIFY( re.mark_count() == 2 );
}
int main()
diff --git a/libstdc++-v3/testsuite/28_regex/init-list.cc b/libstdc++-v3/testsuite/28_regex/init-list.cc
index ee71bb9..390e715 100644
--- a/libstdc++-v3/testsuite/28_regex/init-list.cc
+++ b/libstdc++-v3/testsuite/28_regex/init-list.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++0x" }
-// { dg-do compile }
// Copyright (C) 2008-2013 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/28_regex/regex_error/regex_error.cc b/libstdc++-v3/testsuite/28_regex/regex_error/regex_error.cc
index 9cb08f9..2537973 100644
--- a/libstdc++-v3/testsuite/28_regex/regex_error/regex_error.cc
+++ b/libstdc++-v3/testsuite/28_regex/regex_error/regex_error.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=c++0x" }
-// { dg-do compile }
//
// 2009-06-17 Stephen M. Webb <stephen.webb@xandros.com>
//
diff --git a/libstdc++-v3/testsuite/28_regex/sub_match/cast_char.cc b/libstdc++-v3/testsuite/28_regex/sub_match/cast_char.cc
index ac2f305..300757e 100644
--- a/libstdc++-v3/testsuite/28_regex/sub_match/cast_char.cc
+++ b/libstdc++-v3/testsuite/28_regex/sub_match/cast_char.cc
@@ -1,4 +1,3 @@
-// { dg-do compile }
// { dg-options "-std=c++0x" }
//
@@ -27,9 +26,7 @@
#include <string>
#include <testsuite_hooks.h>
-
-void
-test01()
+int main()
{
bool test __attribute__((unused)) = true;
@@ -39,8 +36,8 @@ test01()
value_type test_data[] = "cabbage";
sub_match_type sm;
- sm.first = test_data + 0;
- sm.second = test_data + sizeof(test_data)/sizeof(value_type);
+ sm.first = std::begin(test_data);
+ sm.second = std::end(test_data) - 1;
sm.matched = true;
string_type sm_string = sm;
diff --git a/libstdc++-v3/testsuite/28_regex/sub_match/cast_wchar_t.cc b/libstdc++-v3/testsuite/28_regex/sub_match/cast_wchar_t.cc
index b4cbe1a..2a5cd3f 100644
--- a/libstdc++-v3/testsuite/28_regex/sub_match/cast_wchar_t.cc
+++ b/libstdc++-v3/testsuite/28_regex/sub_match/cast_wchar_t.cc
@@ -1,4 +1,3 @@
-// { dg-do compile }
// { dg-options "-std=c++0x" }
//
@@ -27,9 +26,7 @@
#include <string>
#include <testsuite_hooks.h>
-
-void
-test01()
+int main()
{
bool test __attribute__((unused)) = true;
@@ -39,8 +36,8 @@ test01()
value_type test_data[] = L"cabbage";
sub_match_type sm;
- sm.first = test_data + 0;
- sm.second = test_data + sizeof(test_data)/sizeof(value_type);
+ sm.first = std::begin(test_data);
+ sm.second = std::end(test_data) - 1;
sm.matched = true;
string_type sm_string = sm;
diff --git a/libstdc++-v3/testsuite/28_regex/sub_match/length.cc b/libstdc++-v3/testsuite/28_regex/sub_match/length.cc
index e4acf71..7f073e4 100644
--- a/libstdc++-v3/testsuite/28_regex/sub_match/length.cc
+++ b/libstdc++-v3/testsuite/28_regex/sub_match/length.cc
@@ -1,4 +1,3 @@
-// { dg-do compile }
// { dg-options "-std=c++0x" }
//
@@ -47,3 +46,8 @@ test01()
VERIFY( sm1.length() == test_len );
VERIFY( sm2.length() == 0 );
}
+
+int main()
+{
+ test01();
+}