From 467e9e092acbde5d08f9afc22bac3855ac9ee7b3 Mon Sep 17 00:00:00 2001 From: Stefan Eilemann Date: Tue, 18 Sep 2012 08:41:18 +0200 Subject: [PATCH] Eyescale/Equalizer#146: Fix dispatcher unit test --- tests/dispatcher.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/dispatcher.cpp b/tests/dispatcher.cpp index eac244790..4f2e39df9 100644 --- a/tests/dispatcher.cpp +++ b/tests/dispatcher.cpp @@ -116,7 +116,11 @@ int main( int argc, char **argv ) { co::BufferCache cache( 10 ); co::LocalNodePtr node = new co::LocalNode; - co::BufferPtr buffer = cache.alloc( co::OCommand::getSize( )); + + const uint64_t size = co::OCommand::getSize(); + co::BufferPtr buffer = cache.alloc( co::Buffer::getCacheSize( )); + buffer->resize( size ); + reinterpret_cast< uint64_t* >( buffer->getData( ))[ 0 ] = size; co::Command command( node, node, buffer, false ); command.setType( co::COMMANDTYPE_NODE );