mirror of
https://github.com/dlang/phobos.git
synced 2025-05-14 08:55:54 +03:00
Merge pull request #6265 from jmdavis/benchmark_race
Fix issue with benchmark unit test when compiling with optimizations. merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
This commit is contained in:
commit
3b50b5bf69
1 changed files with 1 additions and 1 deletions
|
@ -447,7 +447,7 @@ Duration[fun.length] benchmark(fun...)(uint n)
|
|||
void f0() nothrow {}
|
||||
void f1() nothrow { auto b = to!string(a); }
|
||||
auto r = benchmark!(f0, f1)(1000);
|
||||
assert(r[0] > Duration.zero);
|
||||
assert(r[0] >= Duration.zero);
|
||||
assert(r[1] > Duration.zero);
|
||||
assert(r[1] > r[0]);
|
||||
assert(r[0] < seconds(1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue