]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/is_null_pointer/value.cc
Update copyright years in libstdc++-v3/
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / is_null_pointer / value.cc
index 2bee73a6a0b0baadf7b563d8d6108930e823dcff..1efe153bcb245c7a6f6c328d29997431257a8e66 100644 (file)
@@ -1,7 +1,9 @@
 // { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
 // 2013-05-02  Paolo Carlini  <pcarlini@suse.de>
 //
-// Copyright (C) 2013 Free Software Foundation, Inc.
+// Copyright (C) 2013-2014 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
 // <http://www.gnu.org/licenses/>.
 
 #include <type_traits>
-#include <testsuite_hooks.h>
 #include <testsuite_tr1.h>
 
 void test01()
 {
-  bool test __attribute__((unused)) = true;
   using std::is_null_pointer;
   using namespace __gnu_test;
 
-  VERIFY( (test_category<is_null_pointer, std::nullptr_t>(true)) );
-
-  VERIFY( (test_category<is_null_pointer, int>(false)) );
-  VERIFY( (test_category<is_null_pointer, float>(false)) );
-  VERIFY( (test_category<is_null_pointer, EnumType>(false)) );
-  VERIFY( (test_category<is_null_pointer, int*>(false)) );
-  VERIFY( (test_category<is_null_pointer, int(*)(int)>(false)) );
-  VERIFY( (test_category<is_null_pointer, int (ClassType::*)>(false)) );
-  VERIFY( (test_category<is_null_pointer, int (ClassType::*) (int)>(false)) );
-  VERIFY( (test_category<is_null_pointer, int[2]>(false)) );
-  VERIFY( (test_category<is_null_pointer, float[][3]>(false)) );
-  VERIFY( (test_category<is_null_pointer, EnumType[2][3][4]>(false)) );
-  VERIFY( (test_category<is_null_pointer, int*[3]>(false)) );
-  VERIFY( (test_category<is_null_pointer, int(*[][2])(int)>(false)) );
-  VERIFY( (test_category<is_null_pointer, int (ClassType::*[2][3])>(false)) );
-  VERIFY( (test_category<is_null_pointer,
-          int (ClassType::*[][2][3]) (int)>(false)) );
-  VERIFY( (test_category<is_null_pointer, ClassType>(false)) );
-  VERIFY( (test_category<is_null_pointer, PODType>(false)) );
-  VERIFY( (test_category<is_null_pointer, void>(false)) );
-  VERIFY( (test_category<is_null_pointer, NType>(false)) );
-  VERIFY( (test_category<is_null_pointer, TType>(false)) );
-  VERIFY( (test_category<is_null_pointer, SLType>(false)) );
-}
+  static_assert(test_category<is_null_pointer, std::nullptr_t>(true), "");
 
-int main()
-{
-  test01();
-  return 0;
+  static_assert(test_category<is_null_pointer, int>(false), "");
+  static_assert(test_category<is_null_pointer, float>(false), "");
+  static_assert(test_category<is_null_pointer, EnumType>(false), "");
+  static_assert(test_category<is_null_pointer, int*>(false), "");
+  static_assert(test_category<is_null_pointer, int(*)(int)>(false), "");
+  static_assert(test_category<is_null_pointer, int (ClassType::*)>(false), "");
+  static_assert(test_category<is_null_pointer,
+               int (ClassType::*) (int)>(false), "");
+  static_assert(test_category<is_null_pointer, int[2]>(false), "");
+  static_assert(test_category<is_null_pointer, float[][3]>(false), "");
+  static_assert(test_category<is_null_pointer, EnumType[2][3][4]>(false), "");
+  static_assert(test_category<is_null_pointer, int*[3]>(false), "");
+  static_assert(test_category<is_null_pointer, int(*[][2])(int)>(false), "");
+  static_assert(test_category<is_null_pointer,
+               int (ClassType::*[2][3])>(false), "");
+  static_assert(test_category<is_null_pointer,
+               int (ClassType::*[][2][3]) (int)>(false), "");
+  static_assert(test_category<is_null_pointer, ClassType>(false), "");
+  static_assert(test_category<is_null_pointer, PODType>(false), "");
+  static_assert(test_category<is_null_pointer, void>(false), "");
+  static_assert(test_category<is_null_pointer, NType>(false), "");
+  static_assert(test_category<is_null_pointer, TType>(false), "");
+  static_assert(test_category<is_null_pointer, SLType>(false), "");
 }