edu.cmu.sphinx.frontend.test
Class DataBlockerTest

java.lang.Object
  extended by edu.cmu.sphinx.frontend.BaseDataProcessor
      extended by edu.cmu.sphinx.frontend.test.DataBlockerTest
All Implemented Interfaces:
DataProcessor, Configurable

public class DataBlockerTest
extends BaseDataProcessor

Some small tests which ensure that the DataBlocker works properly.


Constructor Summary
DataBlockerTest()
           
 
Method Summary
 java.util.List<Data> collectOutput(double blocSizeMs)
           
static java.util.List<DoubleData> createDataInput(int numSamples, int blockSize, int sampleRate, int offSet)
           
 Data getData()
          Returns the processed Data output.
static boolean hasIncreasingOrder(java.util.List<Data> output, int lastValue)
          Tests wether the samples of all Datas in the list are ordered in increasing order with +1 increments.
 void setUp()
           
 void skipLastSamples()
           
 void testLongInput()
           
 void testUsualInput()
           
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, initialize, newProperties, setPredecessor, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataBlockerTest

public DataBlockerTest()
Method Detail

setUp

public void setUp()

testLongInput

public void testLongInput()
                   throws DataProcessingException
Throws:
DataProcessingException

testUsualInput

public void testUsualInput()
                    throws DataProcessingException
Throws:
DataProcessingException

skipLastSamples

public void skipLastSamples()
                     throws DataProcessingException
Throws:
DataProcessingException

getData

public Data getData()
             throws DataProcessingException
Returns the processed Data output.

Specified by:
getData in interface DataProcessor
Specified by:
getData in class BaseDataProcessor
Returns:
an Data object that has been processed by this DataProcessor
Throws:
DataProcessingException - if a data processor error occurs

collectOutput

public java.util.List<Data> collectOutput(double blocSizeMs)
                                   throws DataProcessingException
Throws:
DataProcessingException

createDataInput

public static java.util.List<DoubleData> createDataInput(int numSamples,
                                                         int blockSize,
                                                         int sampleRate,
                                                         int offSet)

hasIncreasingOrder

public static boolean hasIncreasingOrder(java.util.List<Data> output,
                                         int lastValue)
Tests wether the samples of all Datas in the list are ordered in increasing order with +1 increments.