diff options
Diffstat (limited to 'libs/gui/tests/StreamSplitter_test.cpp')
-rw-r--r-- | libs/gui/tests/StreamSplitter_test.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/gui/tests/StreamSplitter_test.cpp b/libs/gui/tests/StreamSplitter_test.cpp index 767c7c6..00cc39d 100644 --- a/libs/gui/tests/StreamSplitter_test.cpp +++ b/libs/gui/tests/StreamSplitter_test.cpp @@ -76,6 +76,8 @@ private: int mAllocCount; }; +static const uint32_t TEST_DATA = 0x12345678u; + TEST_F(StreamSplitterTest, OneInputOneOutput) { sp<CountedAllocator> allocator(new CountedAllocator); @@ -108,7 +110,7 @@ TEST_F(StreamSplitterTest, OneInputOneOutput) { uint32_t* dataIn; ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN, reinterpret_cast<void**>(&dataIn))); - *dataIn = 0x12345678; + *dataIn = TEST_DATA; ASSERT_EQ(OK, buffer->unlock()); IGraphicBufferProducer::QueueBufferInput qbInput(0, false, @@ -123,7 +125,7 @@ TEST_F(StreamSplitterTest, OneInputOneOutput) { uint32_t* dataOut; ASSERT_EQ(OK, item.mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN, reinterpret_cast<void**>(&dataOut))); - ASSERT_EQ(*dataOut, 0x12345678); + ASSERT_EQ(*dataOut, TEST_DATA); ASSERT_EQ(OK, item.mGraphicBuffer->unlock()); ASSERT_EQ(OK, outputConsumer->releaseBuffer(item.mBuf, item.mFrameNumber, @@ -175,7 +177,7 @@ TEST_F(StreamSplitterTest, OneInputMultipleOutputs) { uint32_t* dataIn; ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN, reinterpret_cast<void**>(&dataIn))); - *dataIn = 0x12345678; + *dataIn = TEST_DATA; ASSERT_EQ(OK, buffer->unlock()); IGraphicBufferProducer::QueueBufferInput qbInput(0, false, @@ -191,7 +193,7 @@ TEST_F(StreamSplitterTest, OneInputMultipleOutputs) { uint32_t* dataOut; ASSERT_EQ(OK, item.mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN, reinterpret_cast<void**>(&dataOut))); - ASSERT_EQ(*dataOut, 0x12345678); + ASSERT_EQ(*dataOut, TEST_DATA); ASSERT_EQ(OK, item.mGraphicBuffer->unlock()); ASSERT_EQ(OK, outputConsumers[output]->releaseBuffer(item.mBuf, |