Struct TestUtils

Struct Documentation

struct TestUtils

Public Static Functions

template<class T, class T2>
static inline void eq(T expected, T2 actual, const char *name)

Asserts that two values are equal.

Template Parameters:
  • T – The type of the expected value.

  • T2 – The type of the actual value.

Parameters:
  • expected – The expected value.

  • actual – The actual value.

  • name – The name of the value being tested.

template<class T, class T2>
static inline void ne(T expected, T2 actual, const char *name)

Asserts that two values are not equal.

Template Parameters:
  • T – The type of the not expected value.

  • T2 – The type of the actual value.

Parameters:
  • expected – The not expected value.

  • actual – The actual value.

  • name – The name of the value being tested.

static void eq(const char *expected, const char *actual, const char *name)

Asserts that two C-style strings are equal.

Parameters:
  • expected – The expected string.

  • actual – The actual string.

  • name – The name of the string being tested.

Throws:

ExpKitError – If the strings are not equal.

static void ne(const char *not_expected, const char *actual, const char *name)

Asserts that two C-style strings are not equal.

Parameters:
  • not_expected – The not expected string.

  • actual – The actual string.

  • name – The name of the string being tested.

Throws:

ExpKitError – If the strings are equal.

template<class T>
static inline void minmax(T min, T max, T actual, const char *name)

Asserts that a value is within a specified range.

Template Parameters:

T – The type of the values.

Parameters:
  • min – The minimum expected value.

  • max – The maximum expected value.