Last change
on this file since 127 was
127,
checked in by Peter, 19 years ago
|
test_vector added
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
376 bytes
|
Line | |
---|
1 | // $Id: test_vector.cc 127 2004-08-03 09:36:41Z peter $ |
---|
2 | |
---|
3 | // C++ tools include |
---|
4 | //////////////////// |
---|
5 | #include "vector.h" |
---|
6 | |
---|
7 | using namespace std; |
---|
8 | |
---|
9 | int main() |
---|
10 | |
---|
11 | { |
---|
12 | bool ok = true; |
---|
13 | theplu::gslapi::vector vec(10); |
---|
14 | for (unsigned int i=0; i<vec.size(); i++) |
---|
15 | vec(i)=i; |
---|
16 | double sum_before = vec.sum(); |
---|
17 | vec.shuffle(); |
---|
18 | double sum_after = vec.sum(); |
---|
19 | if (sum_after != sum_before) |
---|
20 | ok = false; |
---|
21 | |
---|
22 | if (ok) |
---|
23 | return 0; |
---|
24 | return -1; |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.