Defines
hayai.hpp File Reference
#include "hayai/hayai_benchmarker.hpp"
#include "hayai/hayai_test.hpp"
#include "hayai/hayai_default_test_factory.hpp"
#include "hayai/hayai_fixture.hpp"
#include "hayai/hayai_console_outputter.hpp"
#include "hayai/hayai_json_outputter.hpp"
#include "hayai/hayai_junit_xml_outputter.hpp"
Include dependency graph for hayai.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BENCHMARK(fixture_name,benchmark_name,runs,iterations)
#define BENCHMARK_(fixture_name,benchmark_name,fixture_class_name,runs,iterations)
#define BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)   fixture_name ## _ ## benchmark_name ## _Benchmark
#define BENCHMARK_F(fixture_name,benchmark_name,runs,iterations)
#define BENCHMARK_P(fixture_name,benchmark_name,runs,iterations,arguments)
#define BENCHMARK_P_(fixture_name,benchmark_name,fixture_class_name,runs,iterations,arguments)
#define BENCHMARK_P_CLASS_NAME_(fixture_name, benchmark_name, id)   fixture_name ## _ ## benchmark_name ## _Benchmark_ ## id
#define BENCHMARK_P_F(fixture_name, benchmark_name, runs, iterations, arguments)   BENCHMARK_P_(fixture_name, benchmark_name, fixture_name, runs, iterations, arguments)
#define BENCHMARK_P_ID_   __LINE__
#define BENCHMARK_P_INSTANCE(fixture_name, benchmark_name, arguments)   BENCHMARK_P_INSTANCE1(fixture_name, benchmark_name, arguments, BENCHMARK_P_ID_)
#define BENCHMARK_P_INSTANCE1(fixture_name, benchmark_name, arguments, id)
#define HAYAI_VERSION   "1.0.1"

Define Documentation

#define BENCHMARK (   fixture_name,
  benchmark_name,
  runs,
  iterations 
)
Value:
BENCHMARK_(fixture_name,                             \
               benchmark_name,                           \
               ::hayai::Test,                            \
               runs,                                     \
               iterations)

Definition at line 62 of file hayai.hpp.

#define BENCHMARK_ (   fixture_name,
  benchmark_name,
  fixture_class_name,
  runs,
  iterations 
)
Value:
class BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)           \
        :   public fixture_class_name                                   \
    {                                                                   \
    public:                                                             \
        BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)()           \
        {                                                               \
                                                                        \
        }                                                               \
    protected:                                                          \
        virtual void TestBody();                                        \
    private:                                                            \
        static const ::hayai::TestDescriptor* _descriptor;              \
    };                                                                  \
                                                                        \
    const ::hayai::TestDescriptor*                                      \
    BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)::_descriptor =  \
        ::hayai::Benchmarker::Instance().RegisterTest(                  \
            #fixture_name,                                              \
            #benchmark_name,                                            \
            runs,                                                       \
            iterations,                                                 \
            new ::hayai::TestFactoryDefault<                            \
                BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)     \
            >(),                                                        \
            ::hayai::TestParametersDescriptor());                       \
                                                                        \
    void BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)::TestBody()

Definition at line 19 of file hayai.hpp.

#define BENCHMARK_CLASS_NAME_ (   fixture_name,
  benchmark_name 
)    fixture_name ## _ ## benchmark_name ## _Benchmark

Definition at line 16 of file hayai.hpp.

#define BENCHMARK_F (   fixture_name,
  benchmark_name,
  runs,
  iterations 
)
Value:
BENCHMARK_(fixture_name,                             \
               benchmark_name,                           \
               fixture_name,                             \
               runs,                                     \
               iterations)

Definition at line 52 of file hayai.hpp.

#define BENCHMARK_P (   fixture_name,
  benchmark_name,
  runs,
  iterations,
  arguments 
)
Value:
BENCHMARK_P_(fixture_name,                  \
                 benchmark_name,                \
                 hayai::Fixture,                \
                 runs,                          \
                 iterations,                    \
                 arguments)

Definition at line 92 of file hayai.hpp.

#define BENCHMARK_P_ (   fixture_name,
  benchmark_name,
  fixture_class_name,
  runs,
  iterations,
  arguments 
)
Value:
class BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)           \
        :   public fixture_class_name {                                 \
    public:                                                             \
        BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name) () {}       \
        virtual ~ BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name) () {} \
        static const std::size_t _runs = runs;                          \
        static const std::size_t _iterations = iterations;              \
        static const char* _argumentsDeclaration() { return #arguments;  } \
    protected:                                                          \
        inline void TestPayload arguments;                              \
    };                                                                  \
    void BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)::TestPayload arguments

Definition at line 73 of file hayai.hpp.

#define BENCHMARK_P_CLASS_NAME_ (   fixture_name,
  benchmark_name,
  id 
)    fixture_name ## _ ## benchmark_name ## _Benchmark_ ## id

Definition at line 107 of file hayai.hpp.

#define BENCHMARK_P_F (   fixture_name,
  benchmark_name,
  runs,
  iterations,
  arguments 
)    BENCHMARK_P_(fixture_name, benchmark_name, fixture_name, runs, iterations, arguments)

Definition at line 104 of file hayai.hpp.

#define BENCHMARK_P_ID_   __LINE__

Definition at line 129 of file hayai.hpp.

#define BENCHMARK_P_INSTANCE (   fixture_name,
  benchmark_name,
  arguments 
)    BENCHMARK_P_INSTANCE1(fixture_name, benchmark_name, arguments, BENCHMARK_P_ID_)

Definition at line 132 of file hayai.hpp.

#define BENCHMARK_P_INSTANCE1 (   fixture_name,
  benchmark_name,
  arguments,
  id 
)
Value:
class BENCHMARK_P_CLASS_NAME_(fixture_name, benchmark_name, id):    \
        public BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name) {    \
    protected:                                                          \
        virtual void TestBody() { this->TestPayload arguments; }        \
    private:                                                            \
        static const ::hayai::TestDescriptor* _descriptor;              \
    };                                                                  \
    const ::hayai::TestDescriptor* BENCHMARK_P_CLASS_NAME_(fixture_name, benchmark_name, id)::_descriptor = \
        ::hayai::Benchmarker::Instance().RegisterTest(                  \
            #fixture_name, #benchmark_name,                             \
            BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)::_runs, \
            BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)::_iterations, \
            new ::hayai::TestFactoryDefault< BENCHMARK_P_CLASS_NAME_(fixture_name, benchmark_name, id) >(), \
            ::hayai::TestParametersDescriptor(BENCHMARK_CLASS_NAME_(fixture_name, benchmark_name)::_argumentsDeclaration(), #arguments))

Definition at line 110 of file hayai.hpp.

#define HAYAI_VERSION   "1.0.1"

Definition at line 13 of file hayai.hpp.



hayai
Author(s): Nick Bruun
autogenerated on Thu Jun 6 2019 18:13:43