aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/28_regex
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2014-01-21 19:54:03 +0000
committerTim Shen <timshen@gcc.gnu.org>2014-01-21 19:54:03 +0000
commit8f7082f5ea8da41cf909c6f06b036f01c4485b5a (patch)
treee10e5ddc41df84347c547d00a76777c63ab6e931 /libstdc++-v3/testsuite/28_regex
parent6ff956e3c2b0369d8312e9fb3f9fab0b67720b07 (diff)
downloadgcc-8f7082f5ea8da41cf909c6f06b036f01c4485b5a.zip
gcc-8f7082f5ea8da41cf909c6f06b036f01c4485b5a.tar.gz
gcc-8f7082f5ea8da41cf909c6f06b036f01c4485b5a.tar.bz2
regex.tcc: Remove incorrect `nosubs` handling.
2014-01-21 Tim Shen <timshen91@gmail.com> * include/bits/regex.tcc: Remove incorrect `nosubs` handling. * include/bits/regex_scanner.tcc: Handle `nosubs` correctly. * testsuite/28_regex/constants/syntax_option_type.cc: Add a test case. From-SVN: r206906
Diffstat (limited to 'libstdc++-v3/testsuite/28_regex')
-rw-r--r--libstdc++-v3/testsuite/28_regex/constants/syntax_option_type.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/28_regex/constants/syntax_option_type.cc b/libstdc++-v3/testsuite/28_regex/constants/syntax_option_type.cc
index 22559f5..2423775 100644
--- a/libstdc++-v3/testsuite/28_regex/constants/syntax_option_type.cc
+++ b/libstdc++-v3/testsuite/28_regex/constants/syntax_option_type.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=c++0x" }
-// { dg-do compile }
//
// 2009-06-17 Stephen M. Webb <stephen.webb@xandros.com>
//
@@ -23,6 +22,7 @@
// 28.5.1
#include <regex>
+#include <testsuite_hooks.h>
void
test01()
@@ -82,10 +82,21 @@ test04_constexpr()
constexpr auto a3 __attribute__((unused)) = ~grep;
}
+void
+test05()
+{
+ using namespace std;
+ using namespace regex_constants;
+ regex re("((a)(s))", nosubs | ECMAScript);
+ VERIFY(re.mark_count() == 0);
+}
+
int main()
{
test01();
test02();
test03();
+ test04_constexpr();
+ test05();
return 0;
}