HorizonDatabasePlugin  0.2.0
SOCI wrapper for UE4(beta)
Classes | Namespaces | Macros | Typedefs | Functions
common-tests.h File Reference
#include "soci/soci.h"
#include <algorithm>
#include <cassert>
#include <clocale>
#include <cstdlib>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <string>
#include <typeinfo>

Go to the source code of this file.

Classes

struct  PhonebookEntry
 
struct  PhonebookEntry2
 
class  PhonebookEntry3
 
class  MyInt
 
struct  soci::type_conversion< MyInt >
 
struct  soci::type_conversion< PhonebookEntry >
 
struct  soci::type_conversion< PhonebookEntry2 >
 
struct  soci::type_conversion< PhonebookEntry3 >
 
class  soci::tests::table_creator_base
 
class  soci::tests::procedure_creator_base
 
class  soci::tests::function_creator_base
 
class  soci::tests::test_context_base
 
class  soci::tests::common_tests
 

Namespaces

 soci
 
 soci::tests
 

Macros

#define CATCH_CONFIG_RUNNER
 
#define CHECK_EQUAL_PADDED(padded_str, expected_str)   CHECK_NOTHROW(checkEqualPadded(padded_str, expected_str));
 
#define ASSERT_EQUAL_APPROX(a, b)
 
#define ASSERT_EQUAL_EXACT(a, b)
 
#define ASSERT_EQUAL(a, b)
 

Typedefs

typedef std::auto_ptr< table_creator_base > soci::tests::auto_table_creator
 

Functions

void checkEqualPadded (const std::string &padded_str, const std::string &expected_str)
 
bool soci::tests::are_doubles_approx_equal (double const a, double const b)
 
bool soci::tests::are_doubles_exactly_equal (double a, double b)
 
bool soci::tests::are_doubles_equal (test_context_base const &tc, double a, double b)
 

Macro Definition Documentation

#define ASSERT_EQUAL (   a,
 
)
Value:
do { \
if (!are_doubles_equal(tc_, (a), (b))) { \
FAIL( "Equality check failed: " \
<< std::fixed \
<< std::setprecision(std::numeric_limits<double>::digits10 + 1) \
<< (a) << " != " << (b) ); \
} \
} while ( (void)0, 0 )
bool are_doubles_equal(test_context_base const &tc, double a, double b)
Definition: common-tests.h:436
#define ASSERT_EQUAL_APPROX (   a,
 
)
Value:
do { \
if (!are_doubles_approx_equal((a), (b))) { \
FAIL( "Approximate equality check failed: " \
<< std::fixed \
<< std::setprecision(std::numeric_limits<double>::digits10 + 1) \
<< (a) << " != " << (b) ); \
} \
} while ( (void)0, 0 )
bool are_doubles_approx_equal(double const a, double const b)
Definition: common-tests.h:384
#define ASSERT_EQUAL_EXACT (   a,
 
)
Value:
do { \
if (!are_doubles_exactly_equal((a), (b))) { \
FAIL( "Exact equality check failed: " \
<< std::fixed \
<< std::setprecision(std::numeric_limits<double>::digits10 + 1) \
<< (a) << " != " << (b) ); \
} \
} while ( (void)0, 0 )
bool are_doubles_exactly_equal(double a, double b)
Definition: common-tests.h:412
#define CATCH_CONFIG_RUNNER
#define CHECK_EQUAL_PADDED (   padded_str,
  expected_str 
)    CHECK_NOTHROW(checkEqualPadded(padded_str, expected_str));

Function Documentation

void checkEqualPadded ( const std::string &  padded_str,
const std::string &  expected_str 
)