5#include "../tunit_export.hpp"
6#define __XTD_TUNIT_INTERNAL__
9#define __XTD_TUNIT_INTERNAL__
18#include <xtd/diagnostics/stack_frame>
141 template<
class value_t>
146 template<
class value_t>
152 template<
class collection_t>
167 template<
class value_a_t,
class value_b_t>
168 static bool equals(
const value_a_t& value_a,
const value_b_t& value_b) {
169 return value_a == value_b;
175 template<
class char_t>
176 static bool equals(
const char_t* value_a,
const string& value_b) {
183 template<
class char_t>
184 static bool equals(
const string& value_a,
const char_t* value_b) {
191 static bool equals(
long double value_a,
long double value_b) {
192 return equals(value_a, value_b, 0.0001l);
198 static bool equals(
double value_a,
double value_b) {
199 return equals(value_a, value_b, 0.0001);
205 static bool equals(
float value_a,
float value_b) {
206 return equals(value_a, value_b, 0.0001f);
213 static bool equals(
double value_a,
double value_b,
double tolerance) {
221 static bool equals(
long double value_a,
long double value_b,
long double tolerance) {
229 static bool equals(
float value_a,
float value_b,
float tolerance) {
235 static bool is_debug() noexcept;
Contains std::basic_ostream<char_t, char_traits_t>& operator <<(std::basic_ostream<char_t,...
Contains__tunit_join__items functions.
Contains xtd::tunit::abort_error exception.
Contains xtd::tunit::assert_error exception.
Represents text as a sequence of character units.
Definition basic_string.hpp:71
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp:48
static stack_frame current(const xtd::diagnostics::source_location &value=xtd::diagnostics::source_location::current()) noexcept
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
static decimal abs(decimal value)
Returns the absolute value of a decimal number.
static xtd::byte max(xtd::byte a, xtd::byte b) noexcept
Returns the larger of two 8-bit unsigned integers.
The base class for assert.
Definition base_assert.hpp:30
static xtd::string join_items(const collection_t &collection)
Join specified collection into xtd::string.
Definition base_assert.hpp:153
static xtd::string join_items(const xtd::string &str)
Join specified string into xtd::string.
static void ignore(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Ignore current test. This is used by the other assert functions.
static void succeed(const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Generates a success with a generic message. This is used by the other assert functions.
static bool equals(double value_a, double value_b, double tolerance)
Determines if specified values are equal with tolerance.
Definition base_assert.hpp:213
static void fail(const xtd::string &actual, const xtd::string &expected, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
static bool equals(float value_a, float value_b, float tolerance)
Determines if specified values are equal with tolerance.
Definition base_assert.hpp:229
static void ignore(const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Ignore current test. This is used by the other assert functions.
static xtd::string to_string(const value_t *value)
Convert specified value to xtd::string.
Definition base_assert.hpp:147
static void error()
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
static void error(const xtd::string &message)
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
static void error(const xtd::string &actual, const xtd::string &expected, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
static void fail(const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
static void abort(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Abort current test. This is used by the other assert functions.
static void fail(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
static void succeed(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Generates a success with a generic message. This is used by the other assert functions.
static bool equals(const string &value_a, const char_t *value_b)
Determines if specified values are equal.
Definition base_assert.hpp:184
static bool equals(const value_a_t &value_a, const value_b_t &value_b)
Determines if specified values are equal.
Definition base_assert.hpp:168
static bool equals(double value_a, double value_b)
Determines if specified values are equal.
Definition base_assert.hpp:198
static xtd::string to_string(const value_t &value)
Convert specified value to xtd::string.
Definition base_assert.hpp:142
static void abort(const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Abort current test. This is used by the other assert functions.
static bool equals(const char_t *value_a, const string &value_b)
Determines if specified values are equal.
Definition base_assert.hpp:176
static bool equals(float value_a, float value_b)
Determines if specified values are equal.
Definition base_assert.hpp:205
static bool equals(long double value_a, long double value_b, long double tolerance)
Determines if specified values are equal with tolerance.
Definition base_assert.hpp:221
static bool equals(long double value_a, long double value_b)
Determines if specified values are equal.
Definition base_assert.hpp:191
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
#define tunit_export_
Define shared library export.
Definition tunit_export.hpp:13
Contains xtd::tunit::ignore_error exception.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10