|
Last change
on this file since 5a84ee was 5a84ee, checked in by Frederik Heber <heber@…>, 16 years ago |
|
Rewrite of average.cpp and added first UnitTest.
- average.cpp is now called averager.cpp and uses a function AverageColumns().
- new function AverageColumns(): takes an input streamd and a set of column indices for which averages shall be computed
- Introduced unit tests to Utils part of ESPACK:
- new unit test AverageColumnsUnitTest testing the above.
- Makefile generation introduced into configure.ac
- subdir forked in Makefile.am
|
-
Property mode
set to
100644
|
|
File size:
811 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * AveragerUnitTest.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Oct 29, 2009
|
|---|
| 5 | * Author: heber
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef AVERAGERUNITTEST_HPP_
|
|---|
| 9 | #define AVERAGERUNITTEST_HPP_
|
|---|
| 10 |
|
|---|
| 11 | #include <cppunit/extensions/HelperMacros.h>
|
|---|
| 12 |
|
|---|
| 13 | /********************************************** Test classes **************************************/
|
|---|
| 14 |
|
|---|
| 15 | class AverageColumnsTest : public CppUnit::TestFixture
|
|---|
| 16 | {
|
|---|
| 17 | CPPUNIT_TEST_SUITE( AverageColumnsTest) ;
|
|---|
| 18 | CPPUNIT_TEST ( CalculationsTest );
|
|---|
| 19 | CPPUNIT_TEST ( NoRowsTest );
|
|---|
| 20 | CPPUNIT_TEST ( MissingColumnsTest );
|
|---|
| 21 | CPPUNIT_TEST_SUITE_END();
|
|---|
| 22 |
|
|---|
| 23 | public:
|
|---|
| 24 | void setUp();
|
|---|
| 25 | void tearDown();
|
|---|
| 26 | void CalculationsTest();
|
|---|
| 27 | void MissingColumnsTest();
|
|---|
| 28 | void NoRowsTest();
|
|---|
| 29 |
|
|---|
| 30 | private:
|
|---|
| 31 | MeanErrorMap *Results;
|
|---|
| 32 | IndexSet Columns;
|
|---|
| 33 | istringstream input;
|
|---|
| 34 | };
|
|---|
| 35 |
|
|---|
| 36 | #endif /* AVERAGERUNITTEST_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.