diff options
author | Robin Gareus <robin@gareus.org> | 2015-10-05 16:17:49 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-10-05 16:17:49 +0200 |
commit | 22b07e0233a29d9633ffa825a79503befaf2e16e (patch) | |
tree | 1d8b06056f8e12197158f5d906319767d3dedda5 /libs/audiographer/tests/general/chunker_test.cc | |
parent | e11ba7b79d68bc1070b170236c22123966d7bcc3 (diff) |
NOOP, remove trailing tabs/whitespace.
Diffstat (limited to 'libs/audiographer/tests/general/chunker_test.cc')
-rw-r--r-- | libs/audiographer/tests/general/chunker_test.cc | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/libs/audiographer/tests/general/chunker_test.cc b/libs/audiographer/tests/general/chunker_test.cc index d3adab3691..12b5da5dbc 100644 --- a/libs/audiographer/tests/general/chunker_test.cc +++ b/libs/audiographer/tests/general/chunker_test.cc @@ -35,52 +35,52 @@ class ChunkerTest : public CppUnit::TestFixture { chunker->add_output (sink); framecnt_t frames_output = 0; - + ProcessContext<float> const context (random_data, frames, 1); - + chunker->process (context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output); - + chunker->process (context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL (2 * frames, frames_output); CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink->get_array(), frames)); CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[frames], frames)); - + sink->reset(); - + chunker->process (context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output); - + chunker->process (context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL (2 * frames, frames_output); CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink->get_array(), frames)); CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[frames], frames)); } - + void testAsynchronousProcess() { assert (frames % 2 == 0); - + chunker->add_output (sink); framecnt_t frames_output = 0; - + ProcessContext<float> const half_context (random_data, frames / 2, 1); ProcessContext<float> const context (random_data, frames, 1); - + // 0.5 chunker->process (half_context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output); - + // 1.5 chunker->process (context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output); - + // 2.5 chunker->process (context); frames_output = sink->get_data().size(); @@ -88,14 +88,14 @@ class ChunkerTest : public CppUnit::TestFixture CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink->get_array(), frames / 2)); CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[frames / 2], frames)); CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[ 3 * frames / 2], frames / 2)); - + sink->reset(); - + // 3.5 chunker->process (context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output); - + // 4.0 chunker->process (half_context); frames_output = sink->get_data().size(); @@ -104,30 +104,30 @@ class ChunkerTest : public CppUnit::TestFixture CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[frames / 2], frames)); CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[ 3 * frames / 2], frames / 2)); } - + void testChoppingProcess() { sink.reset (new AppendingVectorSink<float>()); - + assert (frames % 2 == 0); chunker.reset (new Chunker<float>(frames / 4)); - + chunker->add_output (sink); framecnt_t frames_output = 0; - + ProcessContext<float> const half_context (random_data, frames / 2, 1); ProcessContext<float> const context (random_data, frames, 1); - + // 0.5 chunker->process (half_context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL ((framecnt_t) frames / 2, frames_output); - + // 1.5 chunker->process (context); frames_output = sink->get_data().size(); CPPUNIT_ASSERT_EQUAL ((framecnt_t) frames / 2 * 3, frames_output); - + // 2.5 chunker->process (context); frames_output = sink->get_data().size(); @@ -140,15 +140,15 @@ class ChunkerTest : public CppUnit::TestFixture void testEndOfInputFlagHandling() { boost::shared_ptr<ProcessContextGrabber<float> > grabber(new ProcessContextGrabber<float>()); - + assert (frames % 2 == 0); chunker.reset (new Chunker<float>(frames)); chunker->add_output (grabber); - + ProcessContext<float> const half_context (random_data, frames / 2, 1); ProcessContext<float> const context (random_data, frames, 1); context.set_flag(ProcessContext<>::EndOfInput); - + // Process 0.5 then 1.0 chunker->process (half_context); chunker->process (context); |