OutputSlot : simulated usage protocol passes unit test

OutputSlotProtocol_test

Some parts are still missing
 - timings
 _ initialisation
This commit is contained in:
Fischlurch 2012-01-08 03:06:32 +01:00
parent 24a1060ae9
commit f5290a99a3
4 changed files with 6 additions and 15 deletions

View file

@ -162,6 +162,7 @@ namespace play {
OpenedSinks
getOpenedSinks()
{
//////////////////////////TICKET #878 not re-entrant, lifecycle isn't clear
REQUIRE (this->isActive());
return transform (eachElm(connections_), connectOutputSink);
}
@ -189,6 +190,7 @@ namespace play {
void
init() ///< derived classes need to invoke this to build the actual connections
{
//////////////////////////TICKET #878 really build all at once? or on demand?
connections_.populate_by (&ConnectionStateManager::buildConnection, this);
}

View file

@ -2,6 +2,6 @@ TESTING "Component Test Suite: Player and Output" ./test-components --group=play
PLANNED "Output Slot Protocol" OutputSlotProtocol_test <<END
TEST "Output Slot Protocol" OutputSlotProtocol_test <<END
return: 0
END

View file

@ -216,7 +216,7 @@ namespace play {
TestFrame const *
accessEmittedFrame (uint frameNr) const
{
if (frameNr <= buffProvider_.emittedCnt())
if (frameNr < buffProvider_.emittedCnt())
return & accessFrame(frameNr);
else
return 0; ////////////////////////////////TICKET #856
@ -225,7 +225,7 @@ namespace play {
diagn::Block const *
accessEmittedBuffer (uint bufferNr) const
{
if (bufferNr <= buffProvider_.emittedCnt())
if (bufferNr < buffProvider_.emittedCnt())
return & accessBlock(bufferNr);
else
return 0;

View file

@ -22,33 +22,22 @@
#include "lib/test/run.hpp"
//#include "lib/util.hpp"
#include "proc/play/diagnostic-output-slot.hpp"
#include "proc/engine/buffhandle.hpp"
#include "proc/engine/testframe.hpp"
//#include <boost/format.hpp>
//#include <iostream>
//using boost::format;
//using std::string;
//using std::cout;
namespace proc {
namespace play {
namespace test {
// using lib::AllocationCluster;
// using mobject::session::PEffect;
using proc::engine::BuffHandle;
using proc::engine::test::testData;
using proc::engine::test::TestFrame;
namespace { // Test fixture
}
/*******************************************************************