#include <functional>#include <initializer_list>#include <memory>#include <sstream>#include <string>#include <utility>#include <vector>#include "../src/re.h"#include "benchmark/benchmark.h"

Go to the source code of this file.
Classes | |
| struct | Results |
| struct | TestCase< Proto > |
Macros | |
| #define | ADD_CASES(...) int CONCAT(dummy, __LINE__) = ::AddCases(__VA_ARGS__) |
| #define | CHECK_BENCHMARK_RESULTS(bm_name_pattern, checker_function) size_t CONCAT(dummy, __LINE__) = AddChecker(bm_name_pattern, checker_function) |
| #define | CHECK_COUNTER_VALUE(entry, var_type, var_name, relationship, value) CHECK_RESULT_VALUE_IMPL(entry, GetCounterAs, var_type, var_name, relationship, value) |
| #define | CHECK_FLOAT_COUNTER_VALUE(entry, var_name, relationship, value, eps_factor) CHECK_FLOAT_RESULT_VALUE_IMPL(entry, GetCounterAs, double, var_name, relationship, value, eps_factor) |
| #define | CHECK_FLOAT_RESULT_VALUE(entry, var_name, relationship, value, eps_factor) CHECK_FLOAT_RESULT_VALUE_IMPL(entry, GetAs, double, var_name, relationship, value, eps_factor) |
| #define | CHECK_FLOAT_RESULT_VALUE_IMPL(entry, getfn, var_type, var_name, relationship, value, eps_factor) |
| #define | CHECK_RESULT_VALUE(entry, var_type, var_name, relationship, value) CHECK_RESULT_VALUE_IMPL(entry, GetAs, var_type, var_name, relationship, value) |
| #define | CHECK_RESULT_VALUE_IMPL(entry, getfn, var_type, var_name, relationship, value) |
| #define | CONCAT(x, y) CONCAT2(x, y) |
| #define | CONCAT2(x, y) x##y |
| #define | SET_SUBSTITUTIONS(...) int CONCAT(dummy, __LINE__) = ::SetSubstitutions(__VA_ARGS__) |
Typedefs | |
| typedef std::function< void(Results const &)> | ResultsCheckFn |
Enumerations | |
| enum | MatchRules { MR_Default, MR_Next, MR_Not, MR_Default, MR_Next, MR_Not, MR_Default, MR_Next, MR_Not } |
| enum | TestCaseID { TC_ConsoleOut, TC_ConsoleErr, TC_JSONOut, TC_JSONErr, TC_CSVOut, TC_CSVErr, TC_NumID, TC_ConsoleOut, TC_ConsoleErr, TC_JSONOut, TC_JSONErr, TC_CSVOut, TC_CSVErr, TC_NumID, TC_ConsoleOut, TC_ConsoleErr, TC_JSONOut, TC_JSONErr, TC_CSVOut, TC_CSVErr, TC_NumID } |
Functions | |
| int | AddCases (TestCaseID ID, std::initializer_list< TestCase > il) |
| size_t | AddChecker (const char *bm_name_pattern, ResultsCheckFn fn) |
| std::string | GetFileReporterOutput (int argc, char *argv[]) |
| void | RunOutputTests (int argc, char *argv[]) |
| int | SetSubstitutions (std::initializer_list< std::pair< std::string, std::string >> il) |
| int | SubstrCnt (const std::string &haystack, const std::string &pat) |
Definition at line 19 of file benchmark/test/output_test.h.
| #define CHECK_BENCHMARK_RESULTS | ( | bm_name_pattern, | |
| checker_function | |||
| ) | size_t CONCAT(dummy, __LINE__) = AddChecker(bm_name_pattern, checker_function) |
Definition at line 82 of file benchmark/test/output_test.h.
| #define CHECK_COUNTER_VALUE | ( | entry, | |
| var_type, | |||
| var_name, | |||
| relationship, | |||
| value | |||
| ) | CHECK_RESULT_VALUE_IMPL(entry, GetCounterAs, var_type, var_name, relationship, value) |
Definition at line 192 of file benchmark/test/output_test.h.
| #define CHECK_FLOAT_COUNTER_VALUE | ( | entry, | |
| var_name, | |||
| relationship, | |||
| value, | |||
| eps_factor | |||
| ) | CHECK_FLOAT_RESULT_VALUE_IMPL(entry, GetCounterAs, double, var_name, relationship, value, eps_factor) |
Definition at line 198 of file benchmark/test/output_test.h.
| #define CHECK_FLOAT_RESULT_VALUE | ( | entry, | |
| var_name, | |||
| relationship, | |||
| value, | |||
| eps_factor | |||
| ) | CHECK_FLOAT_RESULT_VALUE_IMPL(entry, GetAs, double, var_name, relationship, value, eps_factor) |
Definition at line 195 of file benchmark/test/output_test.h.
| #define CHECK_FLOAT_RESULT_VALUE_IMPL | ( | entry, | |
| getfn, | |||
| var_type, | |||
| var_name, | |||
| relationship, | |||
| value, | |||
| eps_factor | |||
| ) |
Definition at line 172 of file benchmark/test/output_test.h.
| #define CHECK_RESULT_VALUE | ( | entry, | |
| var_type, | |||
| var_name, | |||
| relationship, | |||
| value | |||
| ) | CHECK_RESULT_VALUE_IMPL(entry, GetAs, var_type, var_name, relationship, value) |
Definition at line 189 of file benchmark/test/output_test.h.
| #define CHECK_RESULT_VALUE_IMPL | ( | entry, | |
| getfn, | |||
| var_type, | |||
| var_name, | |||
| relationship, | |||
| value | |||
| ) |
Definition at line 161 of file benchmark/test/output_test.h.
| #define SET_SUBSTITUTIONS | ( | ... | ) | int CONCAT(dummy, __LINE__) = ::SetSubstitutions(__VA_ARGS__) |
Definition at line 21 of file benchmark/test/output_test.h.
| typedef std::function<void(Results const&)> ResultsCheckFn |
Definition at line 85 of file benchmark/test/output_test.h.
| enum MatchRules |
| Enumerator | |
|---|---|
| MR_Default | |
| MR_Next | |
| MR_Not | |
| MR_Default | |
| MR_Next | |
| MR_Not | |
| MR_Default | |
| MR_Next | |
| MR_Not | |
Definition at line 24 of file benchmark/test/output_test.h.
| enum TestCaseID |
Definition at line 40 of file benchmark/test/output_test.h.
| int AddCases | ( | TestCaseID | ID, |
| std::initializer_list< TestCase > | il | ||
| ) |
Definition at line 361 of file benchmark/test/output_test_helper.cc.
| size_t AddChecker | ( | const char * | bm_name_pattern, |
| ResultsCheckFn | fn | ||
| ) |
Definition at line 302 of file benchmark/test/output_test_helper.cc.
| std::string GetFileReporterOutput | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 501 of file benchmark/test/output_test_helper.cc.
| void RunOutputTests | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 391 of file benchmark/test/output_test_helper.cc.
Definition at line 367 of file benchmark/test/output_test_helper.cc.
Definition at line 453 of file benchmark/test/output_test_helper.cc.