ProteoWizard
|
#include "Exception.hpp"
#include "DateTime.hpp"
#include "Filesystem.hpp"
#include "pwiz/utility/math/round.hpp"
#include <string>
#include <sstream>
#include <cmath>
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
#include "libraries/doctest.h"
Go to the source code of this file.
Namespaces | |
namespace | pwiz |
namespace | pwiz::util |
Macros | |
#define | unit_assert(x) (!(x) ? throw std::runtime_error(unit_assert_message(__FILE__, __LINE__, #x)) : 0) |
#define | unit_assert_to_stream(x, os) ((os) << (!(x) ? unit_assert_message(__FILE__, __LINE__, #x) + "\n" : "")) |
#define | unit_assert_operator_equal(expected, actual) (!((expected) == (actual)) ? throw std::runtime_error(unit_assert_equal_message(__FILE__, __LINE__, lexical_cast<string>(expected), lexical_cast<string>(actual), #actual)) : 0) |
#define | unit_assert_operator_equal_to_stream(expected, actual, os) ((os) << (!((expected) == (actual)) ? unit_assert_equal_message(__FILE__, __LINE__, lexical_cast<string>(expected), lexical_cast<string>(actual), #actual) + "\n" : "")) |
#define | unit_assert_equal(x, y, epsilon) (!(fabs((x)-(y)) <= (epsilon)) ? throw std::runtime_error(unit_assert_numeric_equal_message(__FILE__, __LINE__, (x), (y), (epsilon))) : 0) |
#define | unit_assert_equal_to_stream(x, y, epsilon, os) ((os) << (!(fabs((x)-(y)) <= (epsilon)) ? unit_assert_numeric_equal_message(__FILE__, __LINE__, (x), (y), (epsilon)) + "\n" : "")) |
#define | unit_assert_throws(x, exception) |
#define | unit_assert_throws_what(x, exception, whatStr) |
#define | unit_assert_matrices_equal(A, B, epsilon) unit_assert(boost::numeric::ublas::norm_frobenius((A)-(B)) < (epsilon)) |
#define | unit_assert_vectors_equal(A, B, epsilon) unit_assert(boost::numeric::ublas::norm_2((A)-(B)) < (epsilon)) |
#define | TEST_PROLOG_EX(argc, argv, suffix) |
#define | TEST_PROLOG(argc, argv) TEST_PROLOG_EX(argc, argv, "") |
#define | TEST_FAILED(x) |
#define | TEST_EPILOG |
#define | DOCTEST_CONFIG_DISABLE |
Functions | |
std::string | pwiz::util::unit_assert_message (const char *filename, int line, const char *expression) |
std::string | pwiz::util::unit_assert_equal_message (const char *filename, int line, const std::string &x, const std::string &y, const char *expression) |
std::string | pwiz::util::unit_assert_numeric_equal_message (const char *filename, int line, double x, double y, double epsilon) |
std::string | pwiz::util::unit_assert_exception_message (const char *filename, int line, const char *expression, const std::string &exception) |
std::string | pwiz::util::quote_string (const string &str) |
std::string | pwiz::util::escape_teamcity_string (const std::string &str) |
#define unit_assert_operator_equal | ( | expected, | |
actual | |||
) | (!((expected) == (actual)) ? throw std::runtime_error(unit_assert_equal_message(__FILE__, __LINE__, lexical_cast<string>(expected), lexical_cast<string>(actual), #actual)) : 0) |
#define unit_assert_operator_equal_to_stream | ( | expected, | |
actual, | |||
os | |||
) | ((os) << (!((expected) == (actual)) ? unit_assert_equal_message(__FILE__, __LINE__, lexical_cast<string>(expected), lexical_cast<string>(actual), #actual) + "\n" : "")) |
#define unit_assert_throws | ( | x, | |
exception | |||
) |
Definition at line 106 of file unit.hpp.
#define unit_assert_throws_what | ( | x, | |
exception, | |||
whatStr | |||
) |
Definition at line 119 of file unit.hpp.
#define TEST_PROLOG_EX | ( | argc, | |
argv, | |||
suffix | |||
) |
Definition at line 157 of file unit.hpp.
#define TEST_PROLOG | ( | argc, | |
argv | |||
) | TEST_PROLOG_EX(argc, argv, "") |
#define TEST_FAILED | ( | x | ) |
#define TEST_EPILOG |