xtd 0.2.0
Loading...
Searching...
No Matches
xtd::tunit::constraints::is_not_value< actual_t > Class Template Reference
Inheritance diagram for xtd::tunit::constraints::is_not_value< actual_t >:
xtd::tunit::constraints::actual_value< actual_t >

Public Methods

auto empty (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Asserts that value is empty.
 
auto empty (const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Asserts that value is empty.
 
template<class expected_t>
auto equal_to (const expected_t &expected, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) const
 Asserts that value not is equal to specified expected.
 
template<class expected_t>
auto equal_to (const expected_t &expected, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) const
 Asserts that value is not equal to specified expected with specified user message.
 
template<class expected_t>
auto same_as (const expected_t &expected, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) const
 Asserts that value is not same as specified expected.
 
template<class expected_t>
auto same_as (const expected_t &expected, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) const
 Asserts that value is not same as specified expected with specified user message.
 

Protected Construtors

 is_not_value (actual_value< actual_t > &&v)
 
 is_not_value (const actual_value< actual_t > &v)
 

Additional Inherited Members

 actual_value (actual_value &&)=default
 
 actual_value (const actual_value &)=default
 
xtd::tunit::constraints::assert_type assert_type () const noexcept
 
actual_valuetype (xtd::tunit::constraints::assert_type assert_type) noexcept
 
auto is_assert () const noexcept
 
auto is_valid () const noexcept
 
auto is_assume () const noexcept
 
const actual_t & actual () const noexcept
 
actual_valueactual (const actual_t &actual) noexcept
 

Member Function Documentation

◆ empty() [1/2]

template<class actual_t>
auto xtd::tunit::constraints::is_not_value< actual_t >::empty ( const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current())
inline

Asserts that value is empty.

Parameters
stack_frameContains information about current file and current line.
Exceptions
xtd::tunit::assert_errorIf bad assertion.
Examples
auto v1 = xtd::array {0, 1, 2, 3};
auto v2 = xtd::array<int> {};
valid_that(v1).is().not_().empty(); // test ok.
assert_that(v2).is().not_().empty(); // test throws an assert_error exception.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64

◆ empty() [2/2]

template<class actual_t>
auto xtd::tunit::constraints::is_not_value< actual_t >::empty ( const xtd::string & message,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() )
inline

Asserts that value is empty.

Parameters
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
stack_frameContains information about current file and current line.
Exceptions
xtd::tunit::assert_errorIf bad assertion.
Examples
auto v1 = xtd::array {0, 1, 2, 3};
auto v2 = xtd::array<int> {};
valid_that(v1).is().not_().empty("User message..."); // test ok.
assert_that(v2).is().not_().empty("User message..."); // test throws an assert_error exception.

◆ equal_to() [1/2]

template<class actual_t>
template<class expected_t>
auto xtd::tunit::constraints::is_not_value< actual_t >::equal_to ( const expected_t & expected,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() ) const
inline

Asserts that value not is equal to specified expected.

Parameters
expectedthe expected value.
stack_frameContains information about current file and current line.
Exceptions
xtd::tunit::assert_errorIf bad assertion.
Examples
auto value = 24;
valid_that(value).is().not_().equal_to(23); // test ok.
assert_that(value).is().not_().equal_to(24); // test throws an assert_error exception.

◆ equal_to() [2/2]

template<class actual_t>
template<class expected_t>
auto xtd::tunit::constraints::is_not_value< actual_t >::equal_to ( const expected_t & expected,
const xtd::string & message,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() ) const
inline

Asserts that value is not equal to specified expected with specified user message.

Parameters
expectedthe expected value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
stack_frameContains information about current file and current line.
Exceptions
xtd::tunit::assert_errorIf bad assertion.
Examples
auto value = 24;
valid_that(value).is().not_().equal_to(23 "User message..."); // test ok.
assert_that(value).is().not_().equal_to(24, "User message..."); // test throws an assert_error exception.

◆ same_as() [1/2]

template<class actual_t>
template<class expected_t>
auto xtd::tunit::constraints::is_not_value< actual_t >::same_as ( const expected_t & expected,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() ) const
inline

Asserts that value is not same as specified expected.

Parameters
expectedthe expected value.
stack_frameContains information about current file and current line.
Exceptions
xtd::tunit::assert_errorIf bad assertion.
Examples
int a = 24;
int b = 24;
int& c = a;
valid_that(a).is().not_().same_as(b); // test ok.
assert_that(a).is().not_().same_as(c); // test throws an assert_error exception.
@ a
The A key.
Definition console_key.hpp:88
@ c
The C key.
Definition console_key.hpp:92
@ b
The B key.
Definition console_key.hpp:90

◆ same_as() [2/2]

template<class actual_t>
template<class expected_t>
auto xtd::tunit::constraints::is_not_value< actual_t >::same_as ( const expected_t & expected,
const xtd::string & message,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() ) const
inline

Asserts that value is not same as specified expected with specified user message.

Parameters
expectedthe expected value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
stack_frameContains information about current file and current line.
Exceptions
xtd::tunit::assert_errorIf bad assertion.
Examples
int a = 24;
int b = 24;
int& c = a;
valid_that(a).is().not_().same_as(b "User message..."); // test ok.
assert_that(a).is().not_().same_as(c, "User message..."); // test throws an assert_error exception.

The documentation for this class was generated from the following file: