testsuite_api.h (diamond_derivation<>::test): Expect ambiguity together with the standard exception classes.

2008-08-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/util/testsuite_api.h (diamond_derivation<>::test):
	Expect ambiguity together with the standard exception classes.
	* testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc: Remove
	xfail.
	* testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc:
	Likewise.
	* testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc:
	Likewise.
	* testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc:
	Likewise.
	* testsuite/18_support/bad_alloc/cons_virtual_derivation.cc: Likewise.
	* testsuite/18_support/bad_cast/cons_virtual_derivation.cc: Likewise.
	* testsuite/18_support/bad_exception/cons_virtual_derivation.cc:
	Likewise.
	* testsuite/18_support/bad_typeid/cons_virtual_derivation.cc:
	Likewise.
	* testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc:
	Likewise.
	* testsuite/ext/forced_exception_error/cons_virtual_derivation.cc:
	Likewise.
	* testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc:
	Likewise.
	* testsuite/20_util/bad_function_call/cons_virtual_derivation.cc:
	Likewise.

From-SVN: r138737
This commit is contained in:
Paolo Carlini 2008-08-05 20:39:48 +00:00 committed by Paolo Carlini
parent 7352e27c3c
commit 6b3fb3441e
14 changed files with 58 additions and 33 deletions

View File

@ -1,3 +1,30 @@
2008-08-05 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/util/testsuite_api.h (diamond_derivation<>::test):
Expect ambiguity together with the standard exception classes.
* testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc: Remove
xfail.
* testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/18_support/bad_alloc/cons_virtual_derivation.cc: Likewise.
* testsuite/18_support/bad_cast/cons_virtual_derivation.cc: Likewise.
* testsuite/18_support/bad_exception/cons_virtual_derivation.cc:
Likewise.
* testsuite/18_support/bad_typeid/cons_virtual_derivation.cc:
Likewise.
* testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/ext/forced_exception_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/20_util/bad_function_call/cons_virtual_derivation.cc:
Likewise.
2008-08-04 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/postypes.h: Reinstate inclusion of <stdint.h>;

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,8 +1,7 @@
// { dg-options "-std=gnu++0x" }
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,8 +1,7 @@
// { dg-do run { xfail *-*-* } }
// { dg-options "-std=gnu++0x" }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,6 @@
// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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

View File

@ -1,7 +1,7 @@
// -*- C++ -*-
// Exception testing utils for the C++ library testsuite.
//
// Copyright (C) 2007 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008 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
@ -47,16 +47,19 @@ namespace __gnu_test
template<typename Exception>
struct diamond_derivation_base<Exception, true>
{
struct diamond_derivation_error: bad_non_virtual, Exception
struct diamond_derivation_error
: bad_non_virtual, Exception
{
diamond_derivation_error() : bad_non_virtual(), Exception() { }
diamond_derivation_error()
: bad_non_virtual(), Exception() { }
};
};
template<typename Exception>
struct diamond_derivation_base<Exception, false>
{
struct diamond_derivation_error: bad_non_virtual, Exception
struct diamond_derivation_error
: bad_non_virtual, Exception
{
diamond_derivation_error()
: bad_non_virtual(), Exception("construct diamond") { }
@ -64,18 +67,25 @@ namespace __gnu_test
};
template<typename Exception, bool DefaultCons>
struct diamond_derivation: diamond_derivation_base<Exception, DefaultCons>
struct diamond_derivation
: diamond_derivation_base<Exception, DefaultCons>
{
typedef diamond_derivation_base<Exception, DefaultCons> base_type;
typedef typename base_type::diamond_derivation_error error_type;
// NB: In the libstdc++-v3 testsuite, all the standard exception
// classes (+ a couple of extensions) are checked: since they
// all derive *non* virtually from std::exception, the expected
// behavior is ambiguity.
static void test()
{
bool test __attribute__((unused)) = true;
try { throw error_type(); }
catch (std::exception const& e) { }
catch (...)
try
{ throw error_type(); }
catch (std::exception const&)
{ VERIFY( false ); }
catch (...)
{ VERIFY( true ); }
}
};