Commit d71c4036 authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[CHANGE #54] added function that yields the dimension of the values stored

parent 950fcc95
......@@ -55,6 +55,14 @@ public:
*/
virtual size_t rawSize() const = 0;
/**
* \return Dimension of the values in this ValueSet
*/
virtual size_t dimension()
{
return m_dimension;
}
protected:
/**
* The order of the tensors for this ValueSet
......
......@@ -43,6 +43,11 @@ public:
{
}
explicit Dummy( char dimension )
: WValueSetBase( 0, dimension )
{
}
virtual ~Dummy()
{
}
......@@ -67,10 +72,21 @@ public:
/**
* Checks if the Dummy is instanceable.
*/
void testInstanziation( void )
void testInstantiation( void )
{
Dummy d;
}
/**
* Checks if the dimension using the dummy is right
*/
void testInstanziation( void )
{
Dummy d1;
TS_ASSERT_EQUALS( d1.dimension(), 1 );
Dummy d2( 2 );
TS_ASSERT_EQUALS( d2.dimension(), 2 );
}
};
#endif // WVALUESETBASE_TEST_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment