Add simple region overlap testcase

This commit is contained in:
Danny Robson 2012-05-11 12:21:47 +10:00
parent f4ab656ef1
commit 4dc7a3ca49
2 changed files with 19 additions and 0 deletions

View File

@ -18,6 +18,7 @@ TEST_BIN = \
matrix \
pool \
range \
region \
signal \
version
@ -56,6 +57,9 @@ pool_SOURCES = pool.cpp
range_LDADD = $(builddir)/../libutil.la
range_SOURCES = range.cpp
region_LDADD = $(builddir)/../libutil.la
region_SOURCES = region.cpp
signal_LDADD = $(builddir)/../libutil.la
signal_SOURCES = signal.cpp

15
test/region.cpp Normal file
View File

@ -0,0 +1,15 @@
#include "../region.hpp"
using util::region;
int
main (int, char **) {
{
region<double> a (32.7, -6.09703, 0.8, 2);
region<double> b (33.5, -4.5, 0.5, 0.5);
check_hard (!a.overlaps (b));
}
return 0;
}