00001 // Copyright (C) 2007 Klaas Gadeyne <first dot last at gmail dot com> 00002 // 00003 // This program is free software; you can redistribute it and/or modify 00004 // it under the terms of the GNU General Public License as published by 00005 // the Free Software Foundation; either version 2 of the License, or 00006 // (at your option) any later version. 00007 // 00008 // This program is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 // GNU General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU General Public License 00014 // along with this program; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00016 // 00017 00018 #ifndef SAMPLE_TEST_HPP 00019 #define SAMPLE_TEST_HPP 00020 00021 #include <cppunit/extensions/HelperMacros.h> 00022 #include <sample/sample.h> 00023 #include <sample/weightedsample.h> 00024 #include <string> 00025 00026 using namespace std; 00027 using namespace BFL; 00028 using namespace MatrixWrapper; 00029 00030 class SampleTest : public CppUnit::TestFixture 00031 { 00032 CPPUNIT_TEST_SUITE( SampleTest ); 00033 CPPUNIT_TEST( testSampleValue ); 00034 CPPUNIT_TEST( testSampleDimension ); 00035 CPPUNIT_TEST( testWeightedSample ); 00036 CPPUNIT_TEST_SUITE_END(); 00037 00038 ColumnVector a; 00039 Sample<ColumnVector> a_sample_cv; 00040 Sample<ColumnVector> b_sample_cv; 00041 Sample<int> a_sample_int; 00042 Sample<double> a_sample_double; 00043 00044 WeightedSample<ColumnVector> a_weighted_sample_cv; 00045 WeightedSample<ColumnVector> b_weighted_sample_cv; 00046 00047 public: 00048 void setUp(); 00049 void tearDown(); 00050 00051 void testSampleValue(); 00052 void testSampleDimension(); 00053 void testWeightedSample(); 00054 00055 }; 00056 00057 #endif // SAMPLE_TEST_HPP