fix inconsistency in OutputSlot protocol test
need to distinguish between nominal frame number and the sequence number in the output frame stream
This commit is contained in:
parent
d732e7e211
commit
24a1060ae9
2 changed files with 25 additions and 34 deletions
|
|
@ -404,38 +404,31 @@ namespace play {
|
|||
|
||||
|
||||
bool
|
||||
buffer_was_used (uint channel, FrameID frame)
|
||||
frame_was_allocated (uint channel, FrameID nominalFrame)
|
||||
{
|
||||
return accessSequence(channel)
|
||||
.wasAllocated(frame);
|
||||
.wasAllocated(nominalFrame);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
buffer_unused (uint channel, FrameID frame)
|
||||
{
|
||||
return !buffer_was_used(channel, frame);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
buffer_was_closed (uint channel, FrameID frame)
|
||||
output_was_emitted (uint channel, FrameID outputFrame)
|
||||
{
|
||||
diagn::Block const *block = accessSequence(channel)
|
||||
.accessEmittedBuffer(frame);
|
||||
return block
|
||||
&& block->was_closed();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
emitted (uint channel, FrameID frame)
|
||||
{
|
||||
diagn::Block const *block = accessSequence(channel)
|
||||
.accessEmittedBuffer(frame);
|
||||
.accessEmittedBuffer(outputFrame);
|
||||
return block
|
||||
&& block->was_used();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
output_was_closed (uint channel, FrameID outputFrame)
|
||||
{
|
||||
diagn::Block const *block = accessSequence(channel)
|
||||
.accessEmittedBuffer(outputFrame);
|
||||
return block
|
||||
&& block->was_closed();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -109,19 +109,19 @@ namespace test {
|
|||
|
||||
// Verify sane operation....
|
||||
DiagnosticOutputSlot& checker = DiagnosticOutputSlot::access(oSlot);
|
||||
CHECK (checker.buffer_was_used (0,0));
|
||||
CHECK (checker.buffer_unused (0,1));
|
||||
CHECK (checker.buffer_was_used (1,0));
|
||||
CHECK (checker.buffer_was_used (1,1));
|
||||
CHECK ( checker.frame_was_allocated (0,123));
|
||||
CHECK (!checker.frame_was_allocated (0,124));
|
||||
CHECK ( checker.frame_was_allocated (1,123));
|
||||
CHECK ( checker.frame_was_allocated (1,124));
|
||||
|
||||
CHECK (checker.buffer_was_closed (0,0));
|
||||
CHECK (checker.buffer_was_closed (1,0));
|
||||
CHECK (checker.buffer_was_closed (1,1));
|
||||
CHECK (checker.output_was_closed (0,0));
|
||||
CHECK (checker.output_was_closed (1,0));
|
||||
CHECK (checker.output_was_closed (1,1));
|
||||
|
||||
CHECK ( checker.emitted (0,0));
|
||||
CHECK (!checker.emitted (0,1));
|
||||
CHECK ( checker.emitted (1,0));
|
||||
CHECK ( checker.emitted (1,1));
|
||||
CHECK ( checker.output_was_emitted (0,0));
|
||||
CHECK (!checker.output_was_emitted (0,1));
|
||||
CHECK ( checker.output_was_emitted (1,0));
|
||||
CHECK ( checker.output_was_emitted (1,1));
|
||||
|
||||
DiagnosticOutputSlot::OutFrames stream0 = checker.getChannel(0);
|
||||
DiagnosticOutputSlot::OutFrames stream1 = checker.getChannel(1);
|
||||
|
|
@ -134,8 +134,6 @@ namespace test {
|
|||
CHECK (*stream1 == testData(1,0)); ++stream1;
|
||||
CHECK (*stream1 == testData(1,1)); ++stream1;
|
||||
CHECK (!stream1);
|
||||
#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #819
|
||||
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #819
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue