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.
// 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>(); }
// 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
// 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>(); }
// 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
// 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";
#include <string>
#include <regex>
-#include <testsuite_hooks.h>
#include <testsuite_allocator.h>
// Tests C++ string constructor of the basic_regex class.
void test02()
{
- bool test __attribute__((unused)) = true;
typedef std::basic_regex<wchar_t> test_type;
typedef __gnu_test::tracker_allocator<wchar_t> alloc_type;
// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
#include <experimental/memory>
-#include <testsuite_hooks.h>
struct A { virtual ~A() { } };
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 " }
}
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" }
}