]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / shared_ptr / comparison / cmp.cc
index 3e9db75802c667f4be5f2fe0d48e488dfe15cebe..22e5f3f57e6c47267dc367eab2bee4f9939fe98a 100644 (file)
@@ -1,6 +1,7 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
+// { dg-require-effective-target hosted }
 
-// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation
+// Copyright (C) 2005-2023 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
@@ -36,13 +37,13 @@ struct B : A
 int
 test01()
 {
-    // test empty shared_ptrs compare equivalent
-    std::shared_ptr<A> p1;
-    std::shared_ptr<B> p2;
-    VERIFY( p1 == p2 );
-    VERIFY( !(p1 != p2) );
-    VERIFY( !(p1 < p2) && !(p2 < p1) );
-    return 0;
+  // test empty shared_ptrs compare equivalent
+  std::shared_ptr<A> p1;
+  std::shared_ptr<B> p2;
+  VERIFY( p1 == p2 );
+  VERIFY( !(p1 != p2) );
+  VERIFY( !(p1 < p2) && !(p2 < p1) );
+  return 0;
 }
 
 
@@ -75,24 +76,10 @@ test02()
   return 0;
 }
 
-int
-test03()
-{
-  std::shared_ptr<A> p1;
-
-  // check other operators are defined
-  VERIFY( p1 <= p1 );
-  VERIFY( p1 >= p1 );
-  VERIFY( !(p1 > p1) );
-
-  return 0;
-}
-
 int 
 main()
 {
   test01();
   test02();
-  test03();
   return 0;
 }