Commit 6f3b8891 by Jonathan Wakely Committed by Jonathan Wakely

Remove unused headers and variables from libstdc++ tests

	* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc: Remove
	unused header and variable from compile-only test.
	* testsuite/20_util/shared_ptr/assign/unique_ptr_rvalue.cc: Likewise.
	* testsuite/28_regex/basic_regex/assign/char/cstring.cc: Likewise.
	* testsuite/28_regex/basic_regex/ctors/string_wchar_t.cc: Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc:
	Likewise.

From-SVN: r238943
parent 2ab794eb
2016-08-01 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc: Remove
unused header and variable from compile-only test.
* testsuite/20_util/shared_ptr/assign/unique_ptr_rvalue.cc: Likewise.
* testsuite/28_regex/basic_regex/assign/char/cstring.cc: Likewise.
* testsuite/28_regex/basic_regex/ctors/string_wchar_t.cc: Likewise.
* testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc:
Likewise.
* testsuite/experimental/string_view/operations/rfind/char/2.cc:
Remove duplicate dg-options directive.
......
......@@ -21,7 +21,6 @@
// 20.7.12.2 Template class shared_ptr [util.smartptr.shared]
#include <memory>
#include <testsuite_hooks.h>
struct A { };
std::auto_ptr<A> source() { return std::auto_ptr<A>(); }
......@@ -29,27 +28,19 @@ std::auto_ptr<A> source() { return std::auto_ptr<A>(); }
// 20.7.12.2.3 shared_ptr assignment [util.smartptr.shared.assign]
// Assignment from rvalue auto_ptr
int
void
test01()
{
bool test __attribute__((unused)) = true;
std::shared_ptr<A> a;
a = source();
return 0;
}
int
void
test02()
{
bool test __attribute__((unused)) = true;
std::shared_ptr<A> a;
std::auto_ptr<A> au;
a = std::move(au);
return 0;
}
int
......
......@@ -21,7 +21,6 @@
// 20.7.12.2 Template class shared_ptr [util.smartptr.shared]
#include <memory>
#include <testsuite_hooks.h>
struct A { };
std::unique_ptr<A> source() { return std::unique_ptr<A>(); }
......@@ -29,27 +28,19 @@ std::unique_ptr<A> source() { return std::unique_ptr<A>(); }
// 20.7.12.2.3 shared_ptr assignment [util.smartptr.shared.assign]
// Assignment from rvalue unique_ptr
int
void
test01()
{
bool test __attribute__((unused)) = true;
std::shared_ptr<A> a;
a = source();
return 0;
}
int
void
test02()
{
bool test __attribute__((unused)) = true;
std::shared_ptr<A> a;
std::unique_ptr<A> u;
a = std::move(u);
return 0;
}
int
......
......@@ -22,13 +22,10 @@
// C++0X [28.8.3] class template basic_regex assign()
#include <regex>
#include <testsuite_hooks.h>
// Tests assign operation from a C-style null-terminated-string.
void test01()
{
bool test __attribute__((unused)) = true;
std::basic_regex<char> re;
const char* cs = "aab";
......
......@@ -24,7 +24,6 @@
#include <string>
#include <regex>
#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
// Tests C++ string constructor of the basic_regex class.
......@@ -39,7 +38,6 @@ void test01()
void test02()
{
bool test __attribute__((unused)) = true;
typedef std::basic_regex<wchar_t> test_type;
typedef __gnu_test::tracker_allocator<wchar_t> alloc_type;
......
......@@ -21,7 +21,6 @@
// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
#include <experimental/memory>
#include <testsuite_hooks.h>
struct A { virtual ~A() { } };
struct B : A { };
......@@ -34,8 +33,6 @@ struct B : A { };
void
test01()
{
bool test __attribute__((unused)) = true;
std::experimental::shared_ptr<A[3]> a;
a = std::experimental::shared_ptr<B[3]> (new B[3]); // { dg-error "no match " }
}
......@@ -43,8 +40,6 @@ test01()
void
test02()
{
bool test __attribute__((unused)) = true;
std::experimental::shared_ptr<A[]> a(new A[3]);
std::experimental::shared_ptr<A[2]> spa(a); // { dg-error "no matching" }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment