Check benchmark results in release builds

This commit is contained in:
John Keiser 2020-09-20 12:53:28 -07:00
parent c7c1372833
commit 3190ef0c1f
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ template<typename B, typename R> static void JsonBenchmark(benchmark::State &sta
{ {
R reference; R reference;
if (!reference.Run(json)) { state.SkipWithError("reference tweet reading failed"); return; } if (!reference.Run(json)) { state.SkipWithError("reference tweet reading failed"); return; }
assert(bench.Result() == reference.Result()); if (bench.Result() != reference.Result()) { state.SkipWithError("results are not the same"); return; }
} }
// Run the benchmark // Run the benchmark