]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/26_numerics/valarray/dr630-1.cc
1 // Copyright (C) 2009-2019 Free Software Foundation, Inc.
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3. If not see
16 // <http://www.gnu.org/licenses/>.
19 #include <testsuite_hooks.h>
27 const valarray
<int> v2(-1, 10000);
30 VERIFY( v1
.size() == v2
.size() );
31 VERIFY( (v1
== v2
).min() == true );
33 valarray
<int> v3(0, 10000);
34 const valarray
<int> v4
;
37 VERIFY( v3
.size() == v4
.size() );
38 VERIFY( v3
.size() == 0 );
40 valarray
<int> v5(0, 100);
41 const valarray
<int> v6(-1, 10000);
44 VERIFY( v5
.size() == v6
.size() );
45 VERIFY( (v5
== v6
).min() == true );
47 valarray
<int> v7(0, 10000);
48 const valarray
<int> v8(-1, 100);
51 VERIFY( v7
.size() == v8
.size() );
52 VERIFY( (v7
== v8
).min() == true );