From 5a83710e371fe68a06e6e3876c6a2c8b820a8976 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sat, 20 Dec 2014 01:40:03 +0000 Subject: Move test into test/std subdirectory. llvm-svn: 224658 --- .../valarray.members/min.pass.cpp | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp (limited to 'libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp') diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp new file mode 100644 index 00000000000..dac59343715 --- /dev/null +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp @@ -0,0 +1,40 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// template class valarray; + +// value_type min() const; + +#include +#include + +int main() +{ + { + typedef double T; + T a1[] = {1.5, 2.5, -3, 4, 5.5}; + const unsigned N1 = sizeof(a1)/sizeof(a1[0]); + std::valarray v1(a1, N1); + assert(v1.min() == -3.0); + } + { + typedef double T; + std::valarray v1; + v1.min(); + } + { + typedef double T; + T a1[] = {1.5, 2.5, -3, 4, 5.5}; + const unsigned N1 = sizeof(a1)/sizeof(a1[0]); + std::valarray v1(a1, N1); + assert((2*v1).min() == -6.0); + } +} -- cgit v1.2.3