25 #ifndef WDATASETSINGLE_TEST_H
26 #define WDATASETSINGLE_TEST_H
32 #include <cxxtest/TestSuite.h>
34 #include "../../common/WLogger.h"
35 #include "../WDataHandlerEnums.h"
36 #include "../WDataSetSingle.h"
38 #include "../WGridRegular3D.h"
39 #include "../WValueSet.h"
59 std::shared_ptr< std::vector< int8_t > > data(
new std::vector< int8_t >( 1, 1 ) );
76 std::shared_ptr< std::vector< double > > data(
new std::vector< double >( 1, 3.1415 ) );
77 std::shared_ptr< WValueSet< double > > other;
78 other = std::shared_ptr< WValueSet< double > >(
new WValueSet< double >( 0, 1, data, W_DT_DOUBLE ) );
80 TS_ASSERT_EQUALS( dataSetSingle.getValueSet(),
valueSetDummy );
81 TS_ASSERT_DIFFERS( dataSetSingle.getValueSet(), other );
89 std::shared_ptr< WGrid > other = std::shared_ptr< WGridRegular3D >(
new WGridRegular3D( 1, 1, 1 ) );
92 TS_ASSERT_DIFFERS( dataSetSingle.
getGrid(), other );
Test important functionality of WDataSetSingle class.
std::shared_ptr< WValueSetBase > valueSetDummy
Dummy value set used in the tests.
void testInstantiation(void)
During instantiation nothing should be thrown.
void setUp(void)
Constructs unit test environment.
void testGetGrid(void)
Retrieving a WGrid should always give the original pointer.
void testGetValueSet(void)
Retrieving a WValueSetBase should always give the original pointer.
std::shared_ptr< WGrid > gridDummy
Dummy grid used in the tests.
A data set consisting of a set of values based on a grid.
std::shared_ptr< WGrid > getGrid() const
A grid that has parallelepiped cells which all have the same proportion.
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.
Base Class for all value set types.