projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93048e5
)
Fix potential very rare test failure.
author
Carl Hetherington
<cth@carlh.net>
Wed, 26 May 2021 10:56:36 +0000
(12:56 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 26 May 2021 18:05:49 +0000
(20:05 +0200)
test/util_test.cc
patch
|
blob
|
history
diff --git
a/test/util_test.cc
b/test/util_test.cc
index 67c1a5265f03f4711800436945e63087e9b82bcc..b0abe04c9f47495261ede1985640aca0aedeb44c 100644
(file)
--- a/
test/util_test.cc
+++ b/
test/util_test.cc
@@
-139,7
+139,7
@@
progress (float p)
BOOST_AUTO_TEST_CASE (copy_in_bits_test)
{
for (int i = 0; i < 32; ++i) {
- make_random_file ("build/test/random.dat",
rand() % (256 * 1024 * 1024
));
+ make_random_file ("build/test/random.dat",
std::max(1, rand() % (256 * 1024 * 1024)
));
progress_values.clear ();
copy_in_bits ("build/test/random.dat", "build/test/random.dat2", boost::bind(&progress, _1));