From 97bd758eb8b2f99577c6f556292d7d331f3c512c Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sat, 2 Apr 2016 10:13:28 +0200 Subject: [PATCH] Fix test case on 32bit platform (caused by double inaccuracy) --- .../onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp index b5c6a4e4..586627fe 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp @@ -179,7 +179,7 @@ TEST_P(DataTreeTest_ResizeNumBytes_P, NumBytesIsCorrect) { TEST_P(DataTreeTest_ResizeNumBytes_P, DepthFlagsAreCorrect) { tree->resizeNumBytes(newSize); tree->flush(); - uint32_t depth = ceil(log(newNumberOfLeaves)/log(DataTreeTest_ResizeNumBytes::LAYOUT.maxChildrenPerInnerNode())); + uint32_t depth = ceil(log(newNumberOfLeaves)/log(DataTreeTest_ResizeNumBytes::LAYOUT.maxChildrenPerInnerNode()) - 0.00000000001); // The subtraction takes care of double inaccuracies if newNumberOfLeaves == maxChildrenPerInnerNode CHECK_DEPTH(depth, tree->key()); }