Commit 4fd1270c authored by George Zagaris's avatar George Zagaris
Browse files

ENH: Updated Serialization/Deserialization test

Call vtkAMRBox::GetBytesize( ) to query the expected
number of bytes in the serialized buffer instead of
hard-coding the expected size which changes as the
vtkAMRBox is evolving.
parent 034a4438
...@@ -288,7 +288,7 @@ int TestAMRBox(int , char *[]) ...@@ -288,7 +288,7 @@ int TestAMRBox(int , char *[])
std::cerr << "Failed serializing AMR box." << std::endl; std::cerr << "Failed serializing AMR box." << std::endl;
return 1; return 1;
} }
size_t expectedByteSize = sizeof( int )+( 6*sizeof(double) ); size_t expectedByteSize = vtkAMRBox::GetBytesize();
if( bytesize != expectedByteSize ) if( bytesize != expectedByteSize )
{ {
std::cerr << "Bytesize of buffer did not match expected size.\n"; std::cerr << "Bytesize of buffer did not match expected size.\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment