Patchwork regex issue

login
register
mail settings
Submitter Jonathan Wakely
Date March 25, 2011, 10:52 p.m.
Message ID <AANLkTimX95DNPsmDTObKUP8VYQcpRx5DyojcBkD_S+OP@mail.gmail.com>
Download mbox | patch
Permalink /patch/88446/
State New
Headers show

Comments

Jonathan Wakely - March 25, 2011, 10:52 p.m.
On 25 March 2011 22:38, Jonathan Wakely wrote:
> The tests are invalid. There were preconditions added to match_results
> member functions recently, which we now check in debug mode, and those
> tests violate them.
>
> I'll deal with it, thanks for testing it.
>

2011-03-25  Jonathan Wakely  <jwakely.gcc@gmail.com>

        * testsuite/28_regex/match_results/ctors/char/default.cc: Do not call
        members which require a fully established result state.
        * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.

Tested x86_64-linux.

Committed to trunk, will apply to 4.6 branch shortly as well.

Patch

Index: testsuite/28_regex/match_results/ctors/char/default.cc
===================================================================
--- testsuite/28_regex/match_results/ctors/char/default.cc	(revision 171367)
+++ testsuite/28_regex/match_results/ctors/char/default.cc	(working copy)
@@ -2,7 +2,7 @@ 
 
 // 2009-06-10  Stephen M. Webb  <stephen.webb@bregmasoft.com>
 //
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -29,18 +29,18 @@  void test01()
 {
   bool test __attribute__((unused)) = true;
 
-	std::cmatch cm;
+  std::cmatch cm;
   VERIFY( cm.size() == 0 );
-  VERIFY( cm.str() == std::cmatch::string_type() );
+  VERIFY( !cm.ready() );
 }
 
 void test02()
 {
   bool test __attribute__((unused)) = true;
 
-	std::smatch sm;
+  std::smatch sm;
   VERIFY( sm.size() == 0 );
-  VERIFY( sm.str() == std::smatch::string_type() );
+  VERIFY( !sm.ready() );
 }
 
 int
@@ -49,4 +49,4 @@  main()
   test01();
   test02();
   return 0;
-};
+}
Index: testsuite/28_regex/match_results/ctors/wchar_t/default.cc
===================================================================
--- testsuite/28_regex/match_results/ctors/wchar_t/default.cc	(revision 171367)
+++ testsuite/28_regex/match_results/ctors/wchar_t/default.cc	(working copy)
@@ -2,7 +2,7 @@ 
 
 // 2009-06-05  Stephen M. Webb  <stephen.webb@bregmasoft.com>
 //
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -29,18 +29,18 @@  void test01()
 {
   bool test __attribute__((unused)) = true;
 
-	std::wcmatch cm;
+  std::wcmatch cm;
   VERIFY( cm.size() == 0 );
-  VERIFY( cm.str() == std::wcmatch::string_type() );
+  VERIFY( !cm.ready() );
 }
 
 void test02()
 {
   bool test __attribute__((unused)) = true;
 
-	std::wsmatch sm;
+  std::wsmatch sm;
   VERIFY( sm.size() == 0 );
-  VERIFY( sm.str() == std::wsmatch::string_type() );
+  VERIFY( !sm.ready() );
 }
 
 int
@@ -49,4 +49,4 @@  main()
   test01();
   test02();
   return 0;
-};
+}