| Line | |
|---|
| 1 | #ifndef __SYMBOLSYNCPOLYDSPTEST_H |
|---|
| 2 | #define __SYMBOLSYNCPOLYDSPTEST_H |
|---|
| 3 | |
|---|
| 4 | #include <cxxtest/TestSuite.h> |
|---|
| 5 | #include "../SymbolSyncPolyDSP.h" |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | // |
|---|
| 9 | // A simple test suite: Just inherit CxxTest::TestSuite and write tests! |
|---|
| 10 | // |
|---|
| 11 | |
|---|
| 12 | class SymbolSyncPoly_testsuite_GenerateErrorSignalMethod : |
|---|
| 13 | public CxxTest::TestSuite, |
|---|
| 14 | public SymbolSyncPolyDSP |
|---|
| 15 | { |
|---|
| 16 | public: |
|---|
| 17 | |
|---|
| 18 | void test1() { |
|---|
| 19 | // initialize variables |
|---|
| 20 | mf_i = -10; |
|---|
| 21 | dmf_i = 10; |
|---|
| 22 | mf_q = 10; |
|---|
| 23 | dmf_q = 10; |
|---|
| 24 | GenerateErrorSignal(); |
|---|
| 25 | TS_ASSERT_DELTA( q, 0.0f, 1e-6f ); |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | void test2() { |
|---|
| 29 | // initialize variables |
|---|
| 30 | mf_i = 30; |
|---|
| 31 | dmf_i = 5; |
|---|
| 32 | mf_q = 20; |
|---|
| 33 | dmf_q = 1; |
|---|
| 34 | GenerateErrorSignal(); |
|---|
| 35 | TS_ASSERT_DELTA( q, -85.0f, 1e-6f ); |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | }; |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | class SymbolSyncPoly_testsuite2: public CxxTest::TestSuite |
|---|
| 42 | { |
|---|
| 43 | public: |
|---|
| 44 | |
|---|
| 45 | void testBasicSynchronization() { |
|---|
| 46 | SymbolSyncPolyDSP symbolSync; |
|---|
| 47 | TS_WARN("Test not implemented"); |
|---|
| 48 | } |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | }; |
|---|
| 52 | |
|---|
| 53 | #endif |
|---|
| 54 | |
|---|