Merge lp:~charlesk/keeper/fix-speed-test into lp:keeper

Proposed by Charles Kerr
Status: Merged
Merged at revision: 91
Proposed branch: lp:~charlesk/keeper/fix-speed-test
Merge into: lp:keeper
Diff against target: 11 lines (+1/-1)
1 file modified
tests/unit/helper/speed-test.cpp (+1/-1)
To merge this branch: bzr merge lp:~charlesk/keeper/fix-speed-test
Reviewer Review Type Date Requested Status
Xavi Garcia (community) Approve
Review via email: mp+302764@code.launchpad.net

Commit message

Fix speed-test rounding error that caused i386 build failures.

Description of the change

Fix speed-test rounding error that caused i386 build failures by comparing ((int-int)/int) to (float)Fix speed-test rounding error that caused i386 build failures.

To post a comment you must log in.
Revision history for this message
Xavi Garcia (xavi-garcia-mena) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/unit/helper/speed-test.cpp'
2--- tests/unit/helper/speed-test.cpp 2016-07-21 04:43:41 +0000
3+++ tests/unit/helper/speed-test.cpp 2016-08-12 05:30:53 +0000
4@@ -37,7 +37,7 @@
5 {
6 helper.record_data_transferred(1);
7 --n_left;
8- EXPECT_EQ(int((10*(n_bytes-n_left)/n_bytes)), int(10*helper.percent_done()));
9+ EXPECT_EQ(int((10*(n_bytes-n_left)/double(n_bytes))), int(10*double(helper.percent_done())));
10 }
11 }
12

Subscribers

People subscribed via source and target branches

to all changes: