36 #ifndef CIPRA_TESTS_HPP
37 #define CIPRA_TESTS_HPP
43 #include <type_traits>
63 template <
typename T,
typename U>
75 static inline bool equals(
const T&,
const U&);
101 static inline std::ostream&
print(std::ostream&,
const T&);
129 struct skip_all_t {};
196 inline void plan(
int total);
206 inline void plan(skip_all_t,
207 std::string reason = std::string(
""));
227 void diag(std::string message);
237 void note(std::string message);
251 template <
typename T>
290 template<
typename funcT>
291 void ok(funcT expr, std::string name = std::string(
""));
315 template<
typename T,
typename U>
316 void is(T got, U expected, std::string name = std::string(
""));
339 template<
typename T,
typename U>
340 void isnt(T got, U expected, std::string name = std::string(
""));
361 template<
typename funcT>
362 void throws(funcT expr, std::string name = std::string(
""));
387 template<
typename exceptionT,
typename funcT>
388 void throws(funcT expr, std::string name = std::string(
""));
410 template<
typename funcT>
411 void nothrows(funcT expr, std::string name = std::string(
""));
436 template<
typename exceptionT,
typename funcT>
437 void nothrows(funcT expr, std::string name = std::string(
""));
463 #if _MSC_VER >= 1700 && _MSC_VER < 1800 // use implementation defined macros
464 #define NEW_OK(TEMPLATE_LIST, PADDING_LIST, LIST, COMMA, X1, X2, X3, X4) \
465 template<typename T COMMA LIST(_CLASS_TYPE)> \
466 T new_ok(LIST(_TYPE_REFREF_ARG));
468 _VARIADIC_EXPAND_0X(NEW_OK, , , , )
471 template<
typename T,
typename... argsT>
472 T
new_ok(argsT&&... args);
486 void pass(std::string name = std::string(
""));
499 void fail(std::string name = std::string(
""));
511 inline virtual void test();
532 inline std::string current_exception_name();
540 #endif // #ifdef CIPRA_TESTS_HPP