PR libstdc++/21772 part 3

2009-12-31  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/21772 part 3
	* include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE.
	* testsuite/util/testsuite_container_traits.h (traits<std::map>):
	Add has_insert.
	(traits<std::multimap>): Add has_insert.
	(traits<std::multiset>): Add has_size_type_constructor.
	* testsuite/23_containers/array/requirements/exception/
	generation_prohibited.cc: New.
	* testsuite/21_strings/basic_string/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/ext/vstring/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/unordered_map/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/multimap/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/set/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/unordered_multimap/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/forward_list/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/unordered_set/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/vector/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/deque/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/multiset/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/unordered_multiset/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.
	* testsuite/23_containers/map/requirements/exception/
	basic.cc: New.
	generation_prohibited.cc: New.
	propagation_consistent.cc: New.

From-SVN: r155545
This commit is contained in:
Benjamin Kosnik 2010-01-01 03:38:58 +00:00 committed by Benjamin Kosnik
parent c448a85e09
commit 3c0f2830ac
43 changed files with 1694 additions and 57 deletions

View File

@ -1,3 +1,66 @@
2009-12-31 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/21772 part 3
* include/ext/throw_allocator.h: Add _GLIBCXX_IS_AGGREGATE.
* testsuite/util/testsuite_container_traits.h (traits<std::map>):
Add has_insert.
(traits<std::multimap>): Add has_insert.
(traits<std::multiset>): Add has_size_type_constructor.
* testsuite/23_containers/array/requirements/exception/
generation_prohibited.cc: New.
* testsuite/21_strings/basic_string/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/ext/vstring/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/unordered_map/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/multimap/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/set/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/unordered_multimap/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/forward_list/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/unordered_set/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/vector/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/deque/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/multiset/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/unordered_multiset/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
* testsuite/23_containers/map/requirements/exception/
basic.cc: New.
generation_prohibited.cc: New.
propagation_consistent.cc: New.
2009-12-31 Benjamin Kosnik <bkoz@redhat.com>
* doc/xml/manual/intro.xml: Order TR's at the end of status.

View File

@ -457,16 +457,16 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
std::size_t _M_i;
#ifndef _GLIBCXX_IS_AGGREGATE
throw_value_base() : _M_i(0)
{ throw_conditionally(); }
throw_value_base(const throw_value_base& __v)
: _M_i(__v._M_i)
throw_value_base(const throw_value_base& __v) : _M_i(__v._M_i)
{ throw_conditionally(); }
explicit throw_value_base(const std::size_t __i)
: _M_i(__i)
explicit throw_value_base(const std::size_t __i) : _M_i(__i)
{ throw_conditionally(); }
#endif
throw_value_base&
operator=(const throw_value_base& __v)
@ -553,17 +553,20 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return __ret;
}
/// Type throwing via limit condition.
struct throw_value_limit : public throw_value_base<limit_condition>
{
typedef throw_value_base<limit_condition> base_type;
#ifndef _GLIBCXX_IS_AGGREGATE
throw_value_limit() { }
throw_value_limit(const throw_value_limit& __other)
: base_type(__other._M_i) { }
explicit throw_value_limit(const std::size_t __i) : base_type(__i) { }
#endif
};
/// Type throwing via random condition.
@ -571,6 +574,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{
typedef throw_value_base<random_condition> base_type;
#ifndef _GLIBCXX_IS_AGGREGATE
throw_value_random() { }
throw_value_random(const throw_value_random& __other)
@ -578,6 +582,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
explicit throw_value_random(const std::size_t __i) : base_type(__i) { }
#endif
};

View File

@ -0,0 +1,41 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-10 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <string>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type;
typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,54 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <string>
#include <exception/safety.h>
void
char_allocator()
{
typedef char value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type;
typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
}
void
wchar_allocator()
{
typedef wchar_t value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type;
typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
// throw_allocator
char_allocator();
wchar_allocator();
return 0;
}

View File

@ -0,0 +1,42 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// { dg-do run { xfail *-*-* } }
// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <string>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type;
typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,34 @@
// { dg-options "-std=gnu++0x -D_GLIBCXX_IS_AGGREGATE" }
// { dg-require-cstdint "" }
// { dg-do run { xfail *-*-* } }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <array>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef std::array<value_type, 129> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,40 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <deque>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::deque<value_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,35 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// { dg-do run { xfail *-*-* } }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <deque>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::deque<value_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,35 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// { dg-do run { xfail *-*-* } }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <deque>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::deque<value_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,40 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <forward_list>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::forward_list<value_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,34 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <forward_list>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::forward_list<value_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,34 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <forward_list>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::forward_list<value_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,43 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <map>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit key_type;
typedef std::pair<const key_type, key_type> value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::less<key_type> compare_type;
typedef std::map<key_type, key_type, compare_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <map>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random key_type;
typedef std::pair<const key_type, key_type> value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::less<key_type> compare_type;
typedef std::map<key_type, key_type, compare_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <map>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit key_type;
typedef std::pair<const key_type, key_type> value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::less<key_type> compare_type;
typedef std::map<key_type, key_type, compare_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,43 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <map>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit key_type;
typedef std::pair<const key_type, key_type> value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::less<key_type> compare_type;
typedef std::multimap<key_type, key_type, compare_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <map>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random key_type;
typedef std::pair<const key_type, key_type> value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::less<key_type> compare_type;
typedef std::multimap<key_type, key_type, compare_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <map>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit key_type;
typedef std::pair<const key_type, key_type> value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::less<key_type> compare_type;
typedef std::multimap<key_type, key_type, compare_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,41 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <set>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::less<value_type> compare_type;
typedef std::multiset<value_type, compare_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,35 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <set>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::less<value_type> compare_type;
typedef std::multiset<value_type, compare_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,35 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <set>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::less<value_type> compare_type;
typedef std::multiset<value_type, compare_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,41 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <set>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::less<value_type> compare_type;
typedef std::set<value_type, compare_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,35 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <set>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::less<value_type> compare_type;
typedef std::set<value_type, compare_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,35 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <set>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::less<value_type> compare_type;
typedef std::set<value_type, compare_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,42 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_map>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_map<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_map>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_map<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x -O1" } // XXX -O1 via PR42346
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_map>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_map<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,42 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_map>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_multimap<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_map>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_multimap<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_map>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_multimap<value_type, value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,42 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_set>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_multiset<value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_set>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_multiset<value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_set>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_multiset<value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,42 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_set>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_set<value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_set>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_set<value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,36 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <unordered_set>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::hash<value_type> hash_type;
typedef std::equal_to<value_type> pred_type;
typedef std::unordered_set<value_type, hash_type, pred_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,40 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-30 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <vector>
#include <exception/safety.h>
void
value()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::vector<value_type, allocator_type> test_type;
__gnu_test::basic_safety<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,35 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// { dg-do run { xfail *-*-* } }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <vector>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_random value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::vector<value_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
return 0;
}

View File

@ -0,0 +1,34 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-09 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <vector>
#include <exception/safety.h>
// Container requirement testing, exceptional behavior
int main()
{
typedef __gnu_cxx::throw_value_limit value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::vector<value_type, allocator_type> test_type;
__gnu_test::propagation_consistent<test_type> test;
return 0;
}

View File

@ -0,0 +1,55 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-11-10 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <ext/vstring.h>
#include <exception/safety.h>
void
value()
{
#if 1
typedef char value_type;
#else
// XXX
// __gnu_cxx::__rc_string_base<>::_Rep::_M_align with constructor
// not allowed in union
// typedef __gnu_cxx::throw_value_limit value_type;
#endif
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type;
typedef __gnu_cxx::__versa_string<value_type, traits_type,
allocator_type, __gnu_cxx::__rc_string_base> test_type_rc;
typedef __gnu_cxx::__versa_string<value_type, traits_type,
allocator_type, __gnu_cxx::__sso_string_base> test_type_sso;
__gnu_test::basic_safety<test_type_rc> test_rc;
__gnu_test::basic_safety<test_type_sso> test_sso;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -0,0 +1,52 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <ext/vstring.h>
#include <exception/safety.h>
void
char_instance()
{
typedef char value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type;
typedef __gnu_cxx::__versa_string<value_type, traits_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
}
void
wchar_instance()
{
typedef wchar_t value_type;
typedef __gnu_cxx::throw_allocator_random<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type;
typedef __gnu_cxx::__versa_string<value_type, traits_type, allocator_type> test_type;
__gnu_test::generation_prohibited<test_type> test;
}
// Container requirement testing, exceptional behavior
int main()
{
char_instance();
wchar_instance();
return 0;
}

View File

@ -0,0 +1,55 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" }
// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 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 3, 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 COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <ext/vstring.h>
#include <exception/safety.h>
void
value()
{
#if 1
typedef char value_type;
#else
// XXX
// __gnu_cxx::__rc_string_base<>::_Rep::_M_align with constructor
// not allowed in union
// typedef __gnu_cxx::throw_value_limit value_type;
#endif
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type;
typedef __gnu_cxx::__versa_string<value_type, traits_type,
allocator_type, __gnu_cxx::__rc_string_base> test_type_rc;
typedef __gnu_cxx::__versa_string<value_type, traits_type,
allocator_type, __gnu_cxx::__sso_string_base> test_type_sso;
__gnu_test::propagation_consistent<test_type_rc> test_rc;
__gnu_test::propagation_consistent<test_type_sso> test_sso;
}
// Container requirement testing, exceptional behavior
int main()
{
value();
return 0;
}

View File

@ -99,6 +99,45 @@ namespace __gnu_test
typedef std::true_type has_size_type_constructor;
};
template<typename _Tp1, typename _Tp2>
struct traits<std::vector<_Tp1, _Tp2>> : public traits_base
{
typedef std::true_type is_container;
typedef std::true_type is_reversible;
typedef std::true_type is_allocator_aware;
typedef std::true_type is_pointer_aware;
typedef std::true_type has_erase;
typedef std::true_type has_insert;
typedef std::true_type has_size_type_constructor;
};
template<typename _Tp1, typename _Tp2, typename _Tp3>
struct traits<std::basic_string<_Tp1, _Tp2, _Tp3>> : public traits_base
{
typedef std::true_type is_container;
typedef std::true_type is_reversible;
typedef std::true_type is_allocator_aware;
typedef std::true_type is_pointer_aware;
typedef std::true_type has_erase;
typedef std::true_type has_insert;
};
template<typename _Tp1, typename _Tp2, typename _Tp3,
template <typename, typename, typename> class _Tp4>
struct traits<__gnu_cxx::__versa_string<_Tp1, _Tp2, _Tp3, _Tp4>>
: public traits_base
{
typedef std::true_type is_container;
typedef std::true_type is_reversible;
typedef std::true_type is_allocator_aware;
typedef std::true_type is_pointer_aware;
typedef std::true_type has_erase;
//typedef std::true_type has_insert; XXX no vstring<rc>::insert
};
template<typename _Tp1, typename _Tp2, typename _Tp3, typename _Tp4>
struct traits<std::map<_Tp1, _Tp2, _Tp3, _Tp4>> : public traits_base
{
@ -121,6 +160,20 @@ namespace __gnu_test
typedef std::true_type is_pointer_aware;
typedef std::true_type is_associative;
typedef std::true_type is_mapped;
typedef std::true_type has_insert;
};
template<typename _Tp1, typename _Tp2, typename _Tp3>
struct traits<std::set<_Tp1, _Tp2, _Tp3>> : public traits_base
{
typedef std::true_type is_container;
typedef std::true_type is_reversible;
typedef std::true_type is_allocator_aware;
typedef std::true_type is_pointer_aware;
typedef std::true_type is_associative;
typedef std::true_type has_insert;
};
template<typename _Tp1, typename _Tp2, typename _Tp3>
@ -147,18 +200,6 @@ namespace __gnu_test
typedef std::true_type is_adaptor;
};
template<typename _Tp1, typename _Tp2, typename _Tp3>
struct traits<std::set<_Tp1, _Tp2, _Tp3>> : public traits_base
{
typedef std::true_type is_container;
typedef std::true_type is_reversible;
typedef std::true_type is_allocator_aware;
typedef std::true_type is_pointer_aware;
typedef std::true_type is_associative;
typedef std::true_type has_insert;
};
template<typename _Tp1, typename _Tp2>
struct traits<std::stack<_Tp1, _Tp2> > : public traits_base
{
@ -203,6 +244,7 @@ namespace __gnu_test
typedef std::true_type is_pointer_aware;
typedef std::true_type is_unordered;
typedef std::true_type has_size_type_constructor;
typedef std::true_type has_insert;
};
@ -218,47 +260,6 @@ namespace __gnu_test
typedef std::true_type has_size_type_constructor;
typedef std::true_type has_insert;
};
template<typename _Tp1, typename _Tp2>
struct traits<std::vector<_Tp1, _Tp2>> : public traits_base
{
typedef std::true_type is_container;
typedef std::true_type is_reversible;
typedef std::true_type is_allocator_aware;
typedef std::true_type is_pointer_aware;
typedef std::true_type has_erase;
typedef std::true_type has_insert;
typedef std::true_type has_size_type_constructor;
};
template<typename _Tp1, typename _Tp2, typename _Tp3>
struct traits<std::basic_string<_Tp1, _Tp2, _Tp3>> : public traits_base
{
typedef std::true_type is_container;
typedef std::true_type is_reversible;
typedef std::true_type is_allocator_aware;
typedef std::true_type is_pointer_aware;
typedef std::true_type has_erase;
typedef std::true_type has_insert;
};
template<typename _Tp1, typename _Tp2, typename _Tp3,
template <typename, typename, typename> class _Tp4>
struct traits<__gnu_cxx::__versa_string<_Tp1, _Tp2, _Tp3, _Tp4>>
: public traits_base
{
typedef std::true_type is_container;
typedef std::true_type is_reversible;
typedef std::true_type is_allocator_aware;
typedef std::true_type is_pointer_aware;
typedef std::true_type has_erase;
// XXX no vstring<rc>::insert
// typedef std::true_type has_insert;
};
} // namespace __gnu_test
#endif