1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-01-15 14:48:00 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Martin Hořeňovský
59d2d08c0f
Merge pull request #1794 from cericks0n/patch-1
Fix error when period of steady_clock is not nano
2019-11-03 18:22:56 +01:00
cericks0n
fa6d52e2a3
Fix error when period of steady_clock is not nano
On systems where std::chrono::steady_clock::period is not std::nano, benchmark tests fail to compile due to trying to convert analysis.samples from a vector of duration<double, clock::period> to a vector of std::chrono::duration<double, std::nano>.
2019-11-01 15:52:38 -05:00

View File

@ -79,7 +79,7 @@ namespace Catch {
});
auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());
BenchmarkStats<std::chrono::duration<double, std::nano>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
BenchmarkStats<FloatDuration<Clock>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
getResultCapture().benchmarkEnded(stats);
} CATCH_CATCH_ALL{