]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/26_numerics/valarray/dr630-1.cc
1 // Copyright (C) 2009-2013 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>
24 bool test
__attribute__((unused
)) = true;
28 const valarray
<int> v2(-1, 10000);
31 VERIFY( v1
.size() == v2
.size() );
32 VERIFY( (v1
== v2
).min() == true );
34 valarray
<int> v3(0, 10000);
35 const valarray
<int> v4
;
38 VERIFY( v3
.size() == v4
.size() );
39 VERIFY( v3
.size() == 0 );
41 valarray
<int> v5(0, 100);
42 const valarray
<int> v6(-1, 10000);
45 VERIFY( v5
.size() == v6
.size() );
46 VERIFY( (v5
== v6
).min() == true );
48 valarray
<int> v7(0, 10000);
49 const valarray
<int> v8(-1, 100);
52 VERIFY( v7
.size() == v8
.size() );
53 VERIFY( (v7
== v8
).min() == true );