[libcxx] r263451 - Add failing tests that I forgot to add to the last commit

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 14 10:58:55 PDT 2016


Author: marshall
Date: Mon Mar 14 12:58:54 2016
New Revision: 263451

URL: http://llvm.org/viewvc/llvm-project?rev=263451&view=rev
Log:
Add failing tests that I forgot to add to the last commit

Added:
    libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.fail.cpp
    libcxx/trunk/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp
    libcxx/trunk/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp

Added: libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.fail.cpp?rev=263451&view=auto
==============================================================================
--- libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.fail.cpp (added)
+++ libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.fail.cpp Mon Mar 14 12:58:54 2016
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <queue>
+
+// template <class T, class Container = vector<T>,
+//           class Compare = less<typename Container::value_type>>
+// class priority_queue
+// {
+// public:
+//     typedef Container                                container_type;
+//     typedef typename container_type::value_type      value_type;
+//     typedef typename container_type::reference       reference;
+//     typedef typename container_type::const_reference const_reference;
+//     typedef typename container_type::size_type       size_type;
+//
+// protected:
+//     container_type c;
+//     Compare comp;
+
+#include <queue>
+#include <cassert>
+#include <type_traits>
+
+int main()
+{
+//  LWG#2566 says that the first template param must match the second one's value type
+	std::priority_queue<double, std::deque<int>> t;
+}

Added: libcxx/trunk/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp?rev=263451&view=auto
==============================================================================
--- libcxx/trunk/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp (added)
+++ libcxx/trunk/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp Mon Mar 14 12:58:54 2016
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <queue>
+
+#include <queue>
+#include <cassert>
+#include <type_traits>
+
+int main()
+{
+//  LWG#2566 says that the first template param must match the second one's value type
+	std::queue<double, std::deque<int>> t;
+}

Added: libcxx/trunk/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp?rev=263451&view=auto
==============================================================================
--- libcxx/trunk/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp (added)
+++ libcxx/trunk/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp Mon Mar 14 12:58:54 2016
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <queue>
+
+// template <class T, class Container = vector<T>,
+//           class Compare = less<typename Container::value_type>>
+// class priority_queue
+// {
+// public:
+//     typedef Container                                container_type;
+//     typedef typename container_type::value_type      value_type;
+//     typedef typename container_type::reference       reference;
+//     typedef typename container_type::const_reference const_reference;
+//     typedef typename container_type::size_type       size_type;
+//
+// protected:
+//     container_type c;
+//     Compare comp;
+
+#include <stack>
+#include <cassert>
+#include <type_traits>
+
+int main()
+{
+//  LWG#2566 says that the first template param must match the second one's value type
+	std::stack<double, std::deque<int>> t;
+}




More information about the cfe-commits mailing list