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

Go to the source code of this file.
Classes | |
| struct | Results |
| struct | TestCase |
Macros | |
| #define | _CHECK_FLOAT_RESULT_VALUE(entry, getfn, var_type, var_name, relationship, value, eps_factor) |
| #define | _CHECK_RESULT_VALUE(entry, getfn, var_type, var_name, relationship, value) |
| #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(entry, GetCounterAs, var_type, var_name, relationship, value) |
| #define | CHECK_FLOAT_COUNTER_VALUE(entry, var_name, relationship, value, eps_factor) _CHECK_FLOAT_RESULT_VALUE(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(entry, GetAs, double, var_name, relationship, value, eps_factor) |
| #define | CHECK_RESULT_VALUE(entry, var_type, var_name, relationship, value) _CHECK_RESULT_VALUE(entry, GetAs, 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 } |
| enum | TestCaseID { 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) |
| void | RunOutputTests (int argc, char *argv[]) |
| int | SetSubstitutions (std::initializer_list< std::pair< std::string, std::string >> il) |
| #define _CHECK_FLOAT_RESULT_VALUE | ( | entry, | |
| getfn, | |||
| var_type, | |||
| var_name, | |||
| relationship, | |||
| value, | |||
| eps_factor | |||
| ) |
Definition at line 162 of file output_test.h.
| #define _CHECK_RESULT_VALUE | ( | entry, | |
| getfn, | |||
| var_type, | |||
| var_name, | |||
| relationship, | |||
| value | |||
| ) |
Definition at line 151 of file output_test.h.
Definition at line 19 of file 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 75 of file output_test.h.
| #define CHECK_COUNTER_VALUE | ( | entry, | |
| var_type, | |||
| var_name, | |||
| relationship, | |||
| value | |||
| ) | _CHECK_RESULT_VALUE(entry, GetCounterAs, var_type, var_name, relationship, value) |
Definition at line 182 of file output_test.h.
| #define CHECK_FLOAT_COUNTER_VALUE | ( | entry, | |
| var_name, | |||
| relationship, | |||
| value, | |||
| eps_factor | |||
| ) | _CHECK_FLOAT_RESULT_VALUE(entry, GetCounterAs, double, var_name, relationship, value, eps_factor) |
Definition at line 188 of file output_test.h.
| #define CHECK_FLOAT_RESULT_VALUE | ( | entry, | |
| var_name, | |||
| relationship, | |||
| value, | |||
| eps_factor | |||
| ) | _CHECK_FLOAT_RESULT_VALUE(entry, GetAs, double, var_name, relationship, value, eps_factor) |
Definition at line 185 of file output_test.h.
| #define CHECK_RESULT_VALUE | ( | entry, | |
| var_type, | |||
| var_name, | |||
| relationship, | |||
| value | |||
| ) | _CHECK_RESULT_VALUE(entry, GetAs, var_type, var_name, relationship, value) |
Definition at line 179 of file output_test.h.
| #define SET_SUBSTITUTIONS | ( | ... | ) | int CONCAT(dummy, __LINE__) = ::SetSubstitutions(__VA_ARGS__) |
Definition at line 21 of file output_test.h.
| typedef std::function< void(Results const&) > ResultsCheckFn |
Definition at line 78 of file output_test.h.
| enum MatchRules |
| Enumerator | |
|---|---|
| MR_Default | |
| MR_Next | |
| MR_Not | |
Definition at line 24 of file output_test.h.
| enum TestCaseID |
| Enumerator | |
|---|---|
| TC_ConsoleOut | |
| TC_ConsoleErr | |
| TC_JSONOut | |
| TC_JSONErr | |
| TC_CSVOut | |
| TC_CSVErr | |
| TC_NumID | |
Definition at line 40 of file output_test.h.
| int AddCases | ( | TestCaseID | ID, |
| std::initializer_list< TestCase > | il | ||
| ) |
Definition at line 343 of file output_test_helper.cc.
| size_t AddChecker | ( | const char * | bm_name_pattern, |
| ResultsCheckFn | fn | ||
| ) |
Definition at line 287 of file output_test_helper.cc.
| void RunOutputTests | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 367 of file output_test_helper.cc.
| int SetSubstitutions | ( | std::initializer_list< std::pair< std::string, std::string >> | il | ) |
Definition at line 349 of file output_test_helper.cc.