test_suite.hpp (1258B)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
/* Relacy Race Detector
* Copyright (c) 2008-2010, Dmitry S. Vyukov
* All rights reserved.
* This software is provided AS-IS with no warranty, either express or implied.
* This software is distributed under a license and may not be copied,
* modified or distributed except as expressly authorized under the
* terms of the license contained in the file LICENSE.TXT in this distribution.
*/
#ifndef RL_TEST_SUITE_HPP
#define RL_TEST_SUITE_HPP
#ifdef _MSC_VER
# pragma once
#endif
#include "base.hpp"
#include "test_result.hpp"
namespace rl
{
template<
typename derived_t,
thread_id_t static_thread_count_param,
test_result_e result = test_result_success>
struct test_suite : nocopy<>
{
static thread_id_t const dynamic_thread_count = 0;
struct params
{
static thread_id_t const static_thread_count = static_thread_count_param;
static thread_id_t const dynamic_thread_count = derived_t::dynamic_thread_count;
static thread_id_t const thread_count = static_thread_count + dynamic_thread_count;
static test_result_e const expected_result = result;
};
void invariant() {}
void before() {}
void after() {}
};
}
#endif
|