Revision 722, 0.5 kB
(checked in by mido, 15 years ago)
|
astyler run over all test sources
general_suite added
cleanup of \test directory finished
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | #include "stat/discrete.h" |
---|
2 | #include "../mat_checks.h" |
---|
3 | #include "UnitTest++.h" |
---|
4 | |
---|
5 | const double epsilon = 0.00001; |
---|
6 | |
---|
7 | using namespace bdm; |
---|
8 | |
---|
9 | TEST ( rectangular_support_test ) { |
---|
10 | rectangular_support rs; |
---|
11 | CHECK_EQUAL ( rs.first_vec(), vec ( 0 ) ); |
---|
12 | |
---|
13 | Array<vec> range ( 2 ); |
---|
14 | range ( 0 ) = vec ( "0 1" ); |
---|
15 | range ( 1 ) = vec ( "-1 1" ); |
---|
16 | ivec gridsize ( 2 ); |
---|
17 | gridsize ( 0 ) = 10; |
---|
18 | gridsize ( 1 ) = 20; |
---|
19 | rs.set_parameters ( range, gridsize ); |
---|
20 | CHECK_EQUAL ( 200, rs.points() ); |
---|
21 | |
---|
22 | vec v = rs.get_vec ( ivec ( "1 2" ) ); |
---|
23 | CHECK_CLOSE ( vec ( "0.15 -0.75" ), v, epsilon ); |
---|
24 | } |
---|