clang-format

This commit is contained in:
Dominic Hamon 2024-08-07 16:47:41 +01:00
parent 3053d1bc83
commit a1c840fd5d
3 changed files with 34 additions and 31 deletions

View File

@ -108,21 +108,20 @@ void CheckCase(std::stringstream& remaining_output, TestCase const& TC,
for (const auto& NC : not_checks) {
BM_CHECK(!NC.regex->Match(line))
<< "Unexpected match for line \"" << line << "\" for MR_Not regex \""
<< NC.regex_str << "\""
<< "\n actual regex string \"" << TC.substituted_regex << "\""
<< NC.regex_str << "\"" << "\n actual regex string \""
<< TC.substituted_regex << "\""
<< "\n started matching near: " << first_line;
}
if (TC.regex->Match(line)) return;
BM_CHECK(TC.match_rule != MR_Next)
<< "Expected line \"" << line << "\" to match regex \"" << TC.regex_str
<< "\""
<< "\n actual regex string \"" << TC.substituted_regex << "\""
<< "\n started matching near: " << first_line;
<< "\"" << "\n actual regex string \"" << TC.substituted_regex
<< "\"" << "\n started matching near: " << first_line;
}
BM_CHECK(remaining_output.eof() == false)
<< "End of output reached before match for regex \"" << TC.regex_str
<< "\" was found"
<< "\n actual regex string \"" << TC.substituted_regex << "\""
<< "\" was found" << "\n actual regex string \""
<< TC.substituted_regex << "\""
<< "\n started matching near: " << first_line;
}

View File

@ -10,8 +10,10 @@
// ---------------------- Testing Prologue Output -------------------------- //
// ========================================================================= //
ADD_CASES(TC_ConsoleOut, {{"^[-]+$", MR_Next},
{"^Benchmark %s Time %s Per-Thread Time %s CPU %s Iterations$", MR_Next},
ADD_CASES(TC_ConsoleOut,
{{"^[-]+$", MR_Next},
{"^Benchmark %s Time %s Per-Thread Time %s CPU %s Iterations$",
MR_Next},
{"^[-]+$", MR_Next}});
static int AddContextCases() {
AddCases(TC_ConsoleErr,
@ -417,7 +419,8 @@ void BM_Complexity_O1(benchmark::State& state) {
BENCHMARK(BM_Complexity_O1)->Range(1, 1 << 18)->Complexity(benchmark::o1);
SET_SUBSTITUTIONS({{"%bigOStr", "[ ]* %float \\([0-9]+\\)"},
{"%RMS", "[ ]*[0-9]+ %"}});
ADD_CASES(TC_ConsoleOut, {{"^BM_Complexity_O1_BigO %bigOStr %bigOStr %bigOStr[ ]*$"},
ADD_CASES(TC_ConsoleOut,
{{"^BM_Complexity_O1_BigO %bigOStr %bigOStr %bigOStr[ ]*$"},
{"^BM_Complexity_O1_RMS %RMS %RMS %RMS[ ]*$"}});
// ========================================================================= //
@ -842,7 +845,8 @@ BENCHMARK(BM_UserStats)
// check that user-provided stats is calculated, and is after the default-ones
// empty string as name is intentional, it would sort before anything else
ADD_CASES(TC_ConsoleOut, {{"^BM_UserStats/iterations:5/repeats:3/manual_time [ "
ADD_CASES(TC_ConsoleOut,
{{"^BM_UserStats/iterations:5/repeats:3/manual_time [ "
"]*150 ns [ ]*150 ns [ ]*%time [ ]*5$"},
{"^BM_UserStats/iterations:5/repeats:3/manual_time [ "
"]*150 ns [ ]*150 ns %time [ ]*5$"},