Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
d71c4036
Commit
d71c4036
authored
Oct 23, 2009
by
Alexander Wiebel
Browse files
[CHANGE
#54
] added function that yields the dimension of the values stored
parent
950fcc95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
src/dataHandler/WValueSetBase.h
src/dataHandler/WValueSetBase.h
+8
-0
src/dataHandler/test/WValueSetBase_test.h
src/dataHandler/test/WValueSetBase_test.h
+17
-1
No files found.
src/dataHandler/WValueSetBase.h
View file @
d71c4036
...
...
@@ -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
...
...
src/dataHandler/test/WValueSetBase_test.h
View file @
d71c4036
...
...
@@ -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
testInstan
z
iation
(
void
)
void
testInstan
t
iation
(
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment