OSDN Git Service

2010-02-21 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 21 Feb 2010 11:06:42 +0000 (11:06 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 21 Feb 2010 11:06:42 +0000 (11:06 +0000)
* testsuite/20_util/is_trivial/requirements/typedefs.cc: New.
* testsuite/20_util/is_trivial/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/is_pod/value.cc: Likewise.
* testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
* testsuite/20_util/is_pod/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/is_standard_layout/requiremenents/
typedefs.cc: Likewise.
* testsuite/20_util/is_standard_layout/requiremenents/
explicit_instantiation.cc: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156934 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/is_pod/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_pod/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_pod/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_standard_layout/requiremenents/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_standard_layout/requiremenents/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivial/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivial/requirements/typedefs.cc [new file with mode: 0644]

index cf7aa9e..a9ccd8a 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-21  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * testsuite/20_util/is_trivial/requirements/typedefs.cc: New.
+       * testsuite/20_util/is_trivial/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_pod/value.cc: Likewise.
+       * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
+       * testsuite/20_util/is_pod/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_standard_layout/requiremenents/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_standard_layout/requiremenents/
+       explicit_instantiation.cc: Likewise.
+
 2010-02-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
        PR c++/35669
diff --git a/libstdc++-v3/testsuite/20_util/is_pod/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_pod/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..241cff7
--- /dev/null
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2010-02-21  Paolo Carlini  <paolo.carlini@oracle.com>
+
+// Copyright (C) 2010 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/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_pod<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_pod/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_pod/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..9c02b99
--- /dev/null
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// 2010-02-21  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_pod<int>                    test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_pod/value.cc b/libstdc++-v3/testsuite/20_util/is_pod/value.cc
new file mode 100644 (file)
index 0000000..055a41c
--- /dev/null
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+// 2010-02-21  Paolo Carlini  <pcarlini@suse.de>
+//
+// Copyright (C) 2010 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 <type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+  bool test __attribute__((unused)) = true;
+  using std::is_pod;
+  using namespace __gnu_test;
+
+  VERIFY( (test_category<is_pod, int>(true)) );
+  VERIFY( (test_category<is_pod, float>(true)) );
+  VERIFY( (test_category<is_pod, EnumType>(true)) );
+  VERIFY( (test_category<is_pod, int*>(true)) );
+  VERIFY( (test_category<is_pod, int(*)(int)>(true)) );
+  VERIFY( (test_category<is_pod, int (ClassType::*)>(true)) );
+  VERIFY( (test_category<is_pod, int (ClassType::*) (int)>(true)) );
+  VERIFY( (test_category<is_pod, int[2]>(true)) );
+  VERIFY( (test_category<is_pod, float[][3]>(true)) );
+  VERIFY( (test_category<is_pod, EnumType[2][3][4]>(true)) );
+  VERIFY( (test_category<is_pod, int*[3]>(true)) );
+  VERIFY( (test_category<is_pod, int(*[][2])(int)>(true)) );
+  VERIFY( (test_category<is_pod, int (ClassType::*[2][3])>(true)) );
+  VERIFY( (test_category<is_pod, int (ClassType::*[][2][3]) (int)>(true)) );
+  VERIFY( (test_category<is_pod, ClassType>(true)) );
+
+  VERIFY( (test_category<is_pod, void>(false)) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_standard_layout/requiremenents/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_standard_layout/requiremenents/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..619dc3e
--- /dev/null
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2010-02-21  Paolo Carlini  <paolo.carlini@oracle.com>
+
+// Copyright (C) 2010 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/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_standard_layout<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_standard_layout/requiremenents/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_standard_layout/requiremenents/typedefs.cc
new file mode 100644 (file)
index 0000000..e209101
--- /dev/null
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// 2010-02-21  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_standard_layout<int>        test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivial/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivial/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..043d122
--- /dev/null
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2010-02-21  Paolo Carlini  <paolo.carlini@oracle.com>
+
+// Copyright (C) 2010 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/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivial<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivial/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivial/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..4b8047f
--- /dev/null
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// 2010-02-21  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivial<int>                test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}