Changeset 3373

Show
Ignore:
Timestamp:
04/09/07 12:06:12 (6 years ago)
Author:
jgaeddert
Message:

adding testsuite for ComputeFilterBankIndex?() method

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • experimental/components/SymbolSyncPoly/autotest_sources/SymbolSyncPoly_testsuite.h

    r3371 r3373  
    4141 
    4242 
     43class SymbolSyncPoly_testsuite_ComputeFilterBankIndex : public CxxTest::TestSuite, 
     44    public SymbolSyncPolyDSP 
     45{ 
     46  public: 
     47    void testShift() { 
     48        // Normal operation 
     49        Npfb = 32; 
     50        b_soft = 11.0f; 
     51        ComputeFilterBankIndex(); 
     52        TS_ASSERT_EQUALS( b, 11 ); 
     53        TS_ASSERT_DELTA( b_soft, 11.0f, 0.0001f ); 
     54        TS_ASSERT_EQUALS( lc, SHIFT ); 
     55    } 
     56 
     57    void testStuff() { 
     58        // Filter bank overflow 
     59        Npfb = 32; 
     60        b_soft = 32.1f; 
     61        ComputeFilterBankIndex(); 
     62        TS_ASSERT_EQUALS( b, 0 ); 
     63        TS_ASSERT_DELTA( b_soft, 0.1f, 0.0001f ); 
     64        TS_ASSERT_EQUALS( lc, STUFF ); 
     65    } 
     66 
     67    void testSkip() { 
     68        // Filter bank underflow 
     69        Npfb = 32; 
     70        b_soft = -2.1f; 
     71        ComputeFilterBankIndex(); 
     72        TS_ASSERT_EQUALS( b, 30 ); 
     73        TS_ASSERT_DELTA( b_soft, 29.9f, 0.0001f ); 
     74        TS_ASSERT_EQUALS( lc, SKIP ); 
     75    } 
     76 
     77}; 
     78 
    4379class SymbolSyncPoly_testsuite2: public CxxTest::TestSuite 
    4480{ 
    4581public: 
    4682 
    47     void testBasicSynchronization() { 
     83    void xtestBasicSynchronization() { 
    4884        SymbolSyncPolyDSP symbolSync; 
    4985        TS_WARN("Test not implemented");