#include <sstream>
#include <exception>
#include <iostream>
#include <stdexcept>
#include <limits>
#include <cmath>
#include "current_function.hpp"
#include "print_function.hpp"
Go to the source code of this file.
|
#define | ASSERT_DOUBLE_EQ(token, a, b) |
|
#define | ASSERT_EQ(a, b, token) |
|
#define | ASSERT_FALSE(condition, msg) |
|
#define | ASSERT_LT(a, b, msg) |
|
#define | ASSERT_NEQ(a, b, token) |
|
#define | ASSERT_TRUE(condition, msg) |
|
#define | EXPECT_EQ(a, b, token) |
|
#define | EXPECT_FALSE(condition, msg) |
|
#define | EXPECT_GT(a, b, token) |
|
#define | EXPECT_GTE(a, b, token) |
|
#define | EXPECT_LT(a, b, token) |
|
#define | EXPECT_LTE(a, b, token) |
|
#define | EXPECT_NEQ(a, b, token) |
|
#define | EXPECT_TRUE(condition, msg) |
|
#define | LOCATION(ss) |
|
#define ASSERT_DOUBLE_EQ |
( |
|
token, |
|
|
|
a, |
|
|
|
b |
|
) |
| |
Value:
assertStream <<
"Expected " << std::fixed << b <<
", received " << a << endl;
\
throw std::runtime_error( "float equality test failed" ); \
}
static ostringstream assertStream
bool doubleEq(double a, double b)
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 149 of file testing_macros.hpp.
Referenced by test_normal_dist().
#define ASSERT_EQ |
( |
|
a, |
|
|
|
b, |
|
|
|
token |
|
) |
| |
Value:
assertStream <<
"Expected " << a <<
", received " << b << endl;
\
}
static ostringstream assertStream
bool doubleEq(double a, double b)
Definition at line 139 of file testing_macros.hpp.
#define ASSERT_FALSE |
( |
|
condition, |
|
|
|
msg |
|
) |
| |
#define ASSERT_LT |
( |
|
a, |
|
|
|
b, |
|
|
|
msg |
|
) |
| |
Value:
static ostringstream assertStream
#define EXPECT_LT(a, b, token)
Definition at line 132 of file testing_macros.hpp.
#define ASSERT_NEQ |
( |
|
a, |
|
|
|
b, |
|
|
|
token |
|
) |
| |
#define ASSERT_TRUE |
( |
|
condition, |
|
|
|
msg |
|
) |
| |
#define EXPECT_EQ |
( |
|
a, |
|
|
|
b, |
|
|
|
token |
|
) |
| |
Value:
}
static ostringstream assertStream
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 61 of file testing_macros.hpp.
#define EXPECT_FALSE |
( |
|
condition, |
|
|
|
msg |
|
) |
| |
Value:
}
static ostringstream assertStream
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 53 of file testing_macros.hpp.
#define EXPECT_GT |
( |
|
a, |
|
|
|
b, |
|
|
|
token |
|
) |
| |
Value:
assertStream <<
"Expected greater than " << a <<
", received " << b << endl;
\
}
static ostringstream assertStream
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 79 of file testing_macros.hpp.
#define EXPECT_GTE |
( |
|
a, |
|
|
|
b, |
|
|
|
token |
|
) |
| |
Value:
<<
", received " << b << endl;
\
}
static ostringstream assertStream
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 88 of file testing_macros.hpp.
#define EXPECT_LT |
( |
|
a, |
|
|
|
b, |
|
|
|
token |
|
) |
| |
Value:
assertStream <<
"Expected less than " << a <<
", received " << b << endl;
\
}
static ostringstream assertStream
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 98 of file testing_macros.hpp.
#define EXPECT_LTE |
( |
|
a, |
|
|
|
b, |
|
|
|
token |
|
) |
| |
Value:
<<
", received " << b << endl;
\
}
static ostringstream assertStream
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 107 of file testing_macros.hpp.
#define EXPECT_NEQ |
( |
|
a, |
|
|
|
b, |
|
|
|
token |
|
) |
| |
Value:
}
static ostringstream assertStream
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 70 of file testing_macros.hpp.
#define EXPECT_TRUE |
( |
|
condition, |
|
|
|
msg |
|
) |
| |
Value:
}
static ostringstream assertStream
void __dump__(string msg, serverity_level_ type=debug, bool autoFormat=true)
Definition at line 45 of file testing_macros.hpp.
Value:
ss << " file: " << __FILE__ << ":" << __LINE__ << endl;
#define SIMPLE_CURRENT_FUNCTION
Definition at line 41 of file testing_macros.hpp.
bool doubleEq |
( |
double |
a, |
|
|
double |
b |
|
) |
| |
|
inline |
ostringstream assertStream |
|
static |