summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/numerics/numarray/class.slice
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/numerics/numarray/class.slice')
-rw-r--r--libcxx/test/std/numerics/numarray/class.slice/cons.slice/default.pass.cpp25
-rw-r--r--libcxx/test/std/numerics/numarray/class.slice/cons.slice/start_size_stride.pass.cpp25
-rw-r--r--libcxx/test/std/numerics/numarray/class.slice/nothing_to_do.pass.cpp12
-rw-r--r--libcxx/test/std/numerics/numarray/class.slice/slice.access/tested_elsewhere.pass.cpp12
4 files changed, 74 insertions, 0 deletions
diff --git a/libcxx/test/std/numerics/numarray/class.slice/cons.slice/default.pass.cpp b/libcxx/test/std/numerics/numarray/class.slice/cons.slice/default.pass.cpp
new file mode 100644
index 00000000000..d0a6cc0d28d
--- /dev/null
+++ b/libcxx/test/std/numerics/numarray/class.slice/cons.slice/default.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <valarray>
+
+// class slice;
+
+// slice();
+
+#include <valarray>
+#include <cassert>
+
+int main()
+{
+ std::slice s;
+ assert(s.start() == 0);
+ assert(s.size() == 0);
+ assert(s.stride() == 0);
+}
diff --git a/libcxx/test/std/numerics/numarray/class.slice/cons.slice/start_size_stride.pass.cpp b/libcxx/test/std/numerics/numarray/class.slice/cons.slice/start_size_stride.pass.cpp
new file mode 100644
index 00000000000..84f7ed6a18e
--- /dev/null
+++ b/libcxx/test/std/numerics/numarray/class.slice/cons.slice/start_size_stride.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <valarray>
+
+// class slice;
+
+// slice(size_t start, size_t size, size_t stride);
+
+#include <valarray>
+#include <cassert>
+
+int main()
+{
+ std::slice s(1, 3, 2);
+ assert(s.start() == 1);
+ assert(s.size() == 3);
+ assert(s.stride() == 2);
+}
diff --git a/libcxx/test/std/numerics/numarray/class.slice/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/numarray/class.slice/nothing_to_do.pass.cpp
new file mode 100644
index 00000000000..b58f5c55b64
--- /dev/null
+++ b/libcxx/test/std/numerics/numarray/class.slice/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+int main()
+{
+}
diff --git a/libcxx/test/std/numerics/numarray/class.slice/slice.access/tested_elsewhere.pass.cpp b/libcxx/test/std/numerics/numarray/class.slice/slice.access/tested_elsewhere.pass.cpp
new file mode 100644
index 00000000000..b58f5c55b64
--- /dev/null
+++ b/libcxx/test/std/numerics/numarray/class.slice/slice.access/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+int main()
+{
+}
OpenPOWER on IntegriCloud