25 #ifndef WDATASETSINGLE_TEST_H
26 #define WDATASETSINGLE_TEST_H
31 #include <cxxtest/TestSuite.h>
33 #include "../WDataSetSingle.h"
34 #include "../WValueSet.h"
36 #include "../WGridRegular3D.h"
37 #include "../WDataHandlerEnums.h"
38 #include "../../common/WLogger.h"
58 boost::shared_ptr< std::vector< int8_t > > data(
new std::vector< int8_t >( 1, 1 ) );
75 boost::shared_ptr< std::vector< double > > data(
new std::vector< double >( 1, 3.1415 ) );
76 boost::shared_ptr< WValueSet< double > > other;
77 other = boost::shared_ptr< WValueSet< double > >(
new WValueSet< double >( 0, 1, data, W_DT_DOUBLE ) );
80 TS_ASSERT_DIFFERS( dataSetSingle.
getValueSet(), other );
88 boost::shared_ptr< WGrid > other = boost::shared_ptr< WGridRegular3D >(
new WGridRegular3D( 1, 1, 1 ) );
90 TS_ASSERT_EQUALS( dataSetSingle.getGrid(),
gridDummy );
91 TS_ASSERT_DIFFERS( dataSetSingle.getGrid(), other );
94 #endif // WDATASETSINGLE_TEST_H
A grid that has parallelepiped cells which all have the same proportion.
boost::shared_ptr< WValueSetBase > getValueSet() const
boost::shared_ptr< WValueSetBase > valueSetDummy
Dummy value set used in the tests.
Test important functionality of WDataSetSingle class.
void setUp(void)
Constructs unit test environment.
void testGetValueSet(void)
Retrieving a WValueSetBase should always give the original pointer.
static void startup(std::ostream &output=std::cout, LogLevel level=LL_DEBUG)
Create the first and only instance of the logger as it is a singleton.
void testInstantiation(void)
During instantiation nothing should be thrown.
A data set consisting of a set of values based on a grid.
boost::shared_ptr< WGrid > gridDummy
Dummy grid used in the tests.
Base Class for all value set types.
void testGetGrid(void)
Retrieving a WGrid should always give the original pointer.