xtd.tunit - Reference Guide  1.0.0
Modern c++17 unit testing framework on Windows, macOS, Linux, iOS and android.
xtd::tunit::string_assert Class Referencefinal

The string_assert class contains a collection of static methods that implement the most string assertions used in xtd::tUnit. More...

#include <string_assert.h>

Inheritance diagram for xtd::tunit::string_assert:
xtd::tunit::base_assert

Static Public Member Functions

static void are_equal_ignoring_case (const std::string &expected, const std::string &actual)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::string &expected, const std::string &actual, const xtd::tunit::line_info &line_info)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::string &expected, const std::string &actual, const std::string &message)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::string &expected, const std::string &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::u16string &expected, const std::u16string &actual)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::u16string &expected, const std::u16string &actual, const xtd::tunit::line_info &line_info)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::u16string &expected, const std::u16string &actual, const std::string &message)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::u16string &expected, const std::u16string &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::u32string &expected, const std::u32string &actual)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::u32string &expected, const std::u32string &actual, const xtd::tunit::line_info &line_info)
 Asserts that two type are equal. More...
 
static void are_equal_ignoring_case (const std::u32string &expected, const std::u32string &actual, const std::string &message)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::u32string &expected, const std::u32string &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that two type are equal. More...
 
static void are_equal_ignoring_case (const std::wstring &expected, const std::wstring &actual)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::wstring &expected, const std::wstring &actual, const xtd::tunit::line_info &line_info)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::wstring &expected, const std::wstring &actual, const std::string &message)
 Asserts that two type are equal ignoring case. More...
 
static void are_equal_ignoring_case (const std::wstring &expected, const std::wstring &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that two type are equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::string &expected, const std::string &actual)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::string &expected, const std::string &actual, const xtd::tunit::line_info &line_info)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::string &expected, const std::string &actual, const std::string &message)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::string &expected, const std::string &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::u16string &expected, const std::u16string &actual)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::u16string &expected, const std::u16string &actual, const xtd::tunit::line_info &line_info)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::u16string &expected, const std::u16string &actual, const std::string &message)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::u16string &expected, const std::u16string &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::u32string &expected, const std::u32string &actual)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::u32string &expected, const std::u32string &actual, const xtd::tunit::line_info &line_info)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::u32string &expected, const std::u32string &actual, const std::string &message)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::u32string &expected, const std::u32string &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::wstring &expected, const std::wstring &actual)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::wstring &expected, const std::wstring &actual, const xtd::tunit::line_info &line_info)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::wstring &expected, const std::wstring &actual, const std::string &message)
 Asserts that two type are not equal ignoring case. More...
 
static void are_not_equal_ignoring_case (const std::wstring &expected, const std::wstring &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that two type are not equal ignoring case. More...
 
static void contains (const std::string &item, const std::string &string)
 Asserts that string contains an item. More...
 
static void contains (const std::string &item, const std::string &string, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void contains (const std::string &item, const std::string &string, const std::string &message)
 Asserts that string contains an item. More...
 
static void contains (const std::string &item, const std::string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void contains (const std::u16string &item, const std::u16string &string)
 Asserts that string contains an item. More...
 
static void contains (const std::u16string &item, const std::u16string &string, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void contains (const std::u16string &item, const std::u16string &string, const std::string &message)
 Asserts that string contains an item. More...
 
static void contains (const std::u16string &item, const std::u16string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void contains (const std::u32string &item, const std::u32string &string)
 Asserts that string contains an item. More...
 
static void contains (const std::u32string &item, const std::u32string &string, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void contains (const std::u32string &item, const std::u32string &string, const std::string &message)
 Asserts that string contains an item. More...
 
static void contains (const std::u32string &item, const std::u32string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void contains (const std::wstring &item, const std::wstring &string)
 Asserts that string contains an item. More...
 
static void contains (const std::wstring &item, const std::wstring &string, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void contains (const std::wstring &item, const std::wstring &string, const std::string &message)
 Asserts that string contains an item. More...
 
static void contains (const std::wstring &item, const std::wstring &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::string &item, const std::string &string)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::string &item, const std::string &string, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::string &item, const std::string &string, const std::string &message)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::string &item, const std::string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::u16string &item, const std::u16string &string)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::u16string &item, const std::u16string &string, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::u16string &item, const std::u16string &string, const std::string &message)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::u16string &item, const std::u16string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::u32string &item, const std::u32string &string)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::u32string &item, const std::u32string &string, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::u32string &item, const std::u32string &string, const std::string &message)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::u32string &item, const std::u32string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::wstring &item, const std::wstring &string)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::wstring &item, const std::wstring &string, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::wstring &item, const std::wstring &string, const std::string &message)
 Asserts that string contains an item. More...
 
static void does_not_contain (const std::wstring &item, const std::wstring &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string contains an item. More...
 
static void does_not_end_with (const std::string &item, const std::string &string)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::string &item, const std::string &string, const xtd::tunit::line_info &line_info)
 Asserts that string starts with item. More...
 
static void does_not_end_with (const std::string &item, const std::string &string, const std::string &message)
 Asserts that string starts with item. More...
 
static void does_not_end_with (const std::string &item, const std::string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string starts with item. More...
 
static void does_not_end_with (const std::u16string &item, const std::u16string &string)
 Asserts that string starts with item. More...
 
static void does_not_end_with (const std::u16string &item, const std::u16string &string, const xtd::tunit::line_info &line_info)
 Asserts that srinbg start with item. More...
 
static void does_not_end_with (const std::u16string &item, const std::u16string &string, const std::string &message)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::u16string &item, const std::u16string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::u32string &item, const std::u32string &string)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::u32string &item, const std::u32string &string, const xtd::tunit::line_info &line_info)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::u32string &item, const std::u32string &string, const std::string &message)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::u32string &item, const std::u32string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::wstring &item, const std::wstring &string)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::wstring &item, const std::wstring &string, const xtd::tunit::line_info &line_info)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::wstring &item, const std::wstring &string, const std::string &message)
 Asserts that string does not end witdh item. More...
 
static void does_not_end_with (const std::wstring &item, const std::wstring &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string does not end witdh item. More...
 
static void does_not_match (const std::string &regex_pattern, const std::string &actual)
 Asserts that does not match regex patern. More...
 
static void does_not_match (const std::string &regex_pattern, const std::string &actual, const xtd::tunit::line_info &line_info)
 Asserts that does not match regex patern. More...
 
static void does_not_match (const std::string &regex_pattern, const std::string &actual, const std::string &message)
 Asserts that does not match regex patern. More...
 
static void does_not_match (const std::string &regex_pattern, const std::string &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that does not match regex patern. More...
 
static void does_not_match (const std::wstring &regex_pattern, const std::wstring &actual)
 Asserts that does not match regex patern. /. More...
 
static void does_not_match (const std::wstring &regex_pattern, const std::wstring &actual, const xtd::tunit::line_info &line_info)
 Asserts that does not match regex patern. More...
 
static void does_not_match (const std::wstring &regex_pattern, const std::wstring &actual, const std::string &message)
 Asserts that does not match regex patern. More...
 
static void does_not_match (const std::wstring &regex_pattern, const std::wstring &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that does not match regex patern. More...
 
static void does_not_start_with (const std::string &item, const std::string &string)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::string &item, const std::string &string, const xtd::tunit::line_info &line_info)
 Asserts that string starts with item. More...
 
static void does_not_start_with (const std::string &item, const std::string &string, const std::string &message)
 Asserts that string starts with item. More...
 
static void does_not_start_with (const std::string &item, const std::string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string starts with item. More...
 
static void does_not_start_with (const std::u16string &item, const std::u16string &string)
 Asserts that string starts with item. More...
 
static void does_not_start_with (const std::u16string &item, const std::u16string &string, const xtd::tunit::line_info &line_info)
 Asserts that srinbg start with item. More...
 
static void does_not_start_with (const std::u16string &item, const std::u16string &string, const std::string &message)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::u16string &item, const std::u16string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::u32string &item, const std::u32string &string)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::u32string &item, const std::u32string &string, const xtd::tunit::line_info &line_info)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::u32string &item, const std::u32string &string, const std::string &message)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::u32string &item, const std::u32string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::wstring &item, const std::wstring &string)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::wstring &item, const std::wstring &string, const xtd::tunit::line_info &line_info)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::wstring &item, const std::wstring &string, const std::string &message)
 Asserts that string does noy start witdh item. More...
 
static void does_not_start_with (const std::wstring &item, const std::wstring &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string does noy start witdh item. More...
 
static void ends_with (const std::string &item, const std::string &string)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::string &item, const std::string &string, const xtd::tunit::line_info &line_info)
 Asserts that string starts with item. More...
 
static void ends_with (const std::string &item, const std::string &string, const std::string &message)
 Asserts that string starts with item. More...
 
static void ends_with (const std::string &item, const std::string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string starts with item. More...
 
static void ends_with (const std::u16string &item, const std::u16string &string)
 Asserts that string starts with item. More...
 
static void ends_with (const std::u16string &item, const std::u16string &string, const xtd::tunit::line_info &line_info)
 Asserts that srinbg start with item. More...
 
static void ends_with (const std::u16string &item, const std::u16string &string, const std::string &message)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::u16string &item, const std::u16string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::u32string &item, const std::u32string &string)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::u32string &item, const std::u32string &string, const xtd::tunit::line_info &line_info)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::u32string &item, const std::u32string &string, const std::string &message)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::u32string &item, const std::u32string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::wstring &item, const std::wstring &string)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::wstring &item, const std::wstring &string, const xtd::tunit::line_info &line_info)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::wstring &item, const std::wstring &string, const std::string &message)
 Asserts that string ends witdh item. More...
 
static void ends_with (const std::wstring &item, const std::wstring &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string ends witdh item. More...
 
static void matches (const std::string &regex_pattern, const std::string &actual)
 Asserts that matches regex patern. More...
 
static void matches (const std::string &regex_pattern, const std::string &actual, const xtd::tunit::line_info &line_info)
 Asserts that matches regex patern. More...
 
static void matches (const std::string &regex_pattern, const std::string &actual, const std::string &message)
 Asserts that matches regex patern. More...
 
static void matches (const std::string &regex_pattern, const std::string &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that matches regex patern. More...
 
static void matches (const std::wstring &regex_pattern, const std::wstring &actual)
 Asserts that matches regex patern. /. More...
 
static void matches (const std::wstring &regex_pattern, const std::wstring &actual, const xtd::tunit::line_info &line_info)
 Asserts that matches regex patern. More...
 
static void matches (const std::wstring &regex_pattern, const std::wstring &actual, const std::string &message)
 Asserts that matches regex patern. More...
 
static void matches (const std::wstring &regex_pattern, const std::wstring &actual, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that matches regex patern. More...
 
static void starts_with (const std::string &item, const std::string &string)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::string &item, const std::string &string, const xtd::tunit::line_info &line_info)
 Asserts that string starts with item. More...
 
static void starts_with (const std::string &item, const std::string &string, const std::string &message)
 Asserts that string starts with item. More...
 
static void starts_with (const std::string &item, const std::string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string starts with item. More...
 
static void starts_with (const std::u16string &item, const std::u16string &string)
 Asserts that string starts with item. More...
 
static void starts_with (const std::u16string &item, const std::u16string &string, const xtd::tunit::line_info &line_info)
 Asserts that srinbg start with item. More...
 
static void starts_with (const std::u16string &item, const std::u16string &string, const std::string &message)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::u16string &item, const std::u16string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::u32string &item, const std::u32string &string)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::u32string &item, const std::u32string &string, const xtd::tunit::line_info &line_info)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::u32string &item, const std::u32string &string, const std::string &message)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::u32string &item, const std::u32string &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::wstring &item, const std::wstring &string)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::wstring &item, const std::wstring &string, const xtd::tunit::line_info &line_info)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::wstring &item, const std::wstring &string, const std::string &message)
 Asserts that string starts witdh item. More...
 
static void starts_with (const std::wstring &item, const std::wstring &string, const std::string &message, const xtd::tunit::line_info &line_info)
 Asserts that string starts witdh item. More...
 

Static Private Member Functions

static void abort ()
 Abort current test. More...
 
static void abort (const xtd::tunit::line_info &line_info)
 Abort current test. More...
 
static void abort (const std::string &message)
 Abort current test. More...
 
static void abort (const std::string &message, const xtd::tunit::line_info &line_info)
 Abort current test. More...
 
static void error ()
 
static void error (const std::string &actual, const std::string &expected, const std::string &message, const xtd::tunit::line_info &line_info)
 
static void fail ()
 Throws an xtd::tunit::assertion_error exception. More...
 
static void fail (const xtd::tunit::line_info &line_info)
 Throws an xtd::tunit::assertion_error exception. More...
 
static void fail (const std::string &message)
 Throws an xtd::tunit::assertion_error exception. More...
 
static void fail (const std::string &message, const xtd::tunit::line_info &line_info)
 Throws an xtd::tunit::assertion_error exception. More...
 
static void fail (const std::string &actual, const std::string &expected, const std::string &message, const xtd::tunit::line_info &line_info)
 
static void ignore ()
 Ignore current test. More...
 
static void ignore (const xtd::tunit::line_info &line_info)
 Ignore current test. More...
 
static void ignore (const std::string &message)
 Ignore current test. More...
 
static void ignore (const std::string &message, const xtd::tunit::line_info &line_info)
 Ignore current test. More...
 
template<typename TCollection >
static std::string join_items (const TCollection &collection)
 
static std::string join_items (const std::string &str)
 
static void succeed ()
 Generates a success with a generic message. More...
 
static void succeed (const xtd::tunit::line_info &line_info)
 Generates a success with a generic message. More...
 
static void succeed (const std::string &message)
 Generates a success with a generic message. More...
 
static void succeed (const std::string &message, const xtd::tunit::line_info &line_info)
 Generates a success with a generic message. More...
 
template<typename TValue >
static std::string to_string (const TValue &value)
 
template<typename TValue >
static std::string to_string (const TValue *value)
 

Detailed Description

The string_assert class contains a collection of static methods that implement the most string assertions used in xtd::tUnit.

Examples
This example show how to used some methods :

Member Function Documentation

§ are_equal_ignoring_case() [1/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::string &  expected,
const std::string &  actual 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case("value", std::string("VALUE")); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case("key", std::string("VALUE")); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [2/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::string &  expected,
const std::string &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case("value", std::string("VALUE"), line_info_); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case("key", std::string("VALUE"), line_info_); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [3/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::string &  expected,
const std::string &  actual,
const std::string &  message 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case("value", std::string("VALUE"), "User message..."); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case("key", std::string("VALUE"), "User message..."); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [4/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::string &  expected,
const std::string &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case("value", std::string("VALUE"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case("key", std::string("VALUE"), "User message...", line_info_); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [5/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::u16string &  expected,
const std::u16string &  actual 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(u"value", std::u16string(u"VALUE")); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(u"key", std::u16string(u"VALUE")); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [6/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::u16string &  expected,
const std::u16string &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(u"value", std::u16string(u"VALUE"), line_info_); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(u"key", std::u16string(u"VALUE"), line_info_); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [7/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::u16string &  expected,
const std::u16string &  actual,
const std::string &  message 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(u"value", std::u16string(u"VALUE"), "User message..."); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(u"key", std::u16string(u"VALUE"), "User message..."); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [8/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::u16string &  expected,
const std::u16string &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(u"value", std::u16string(u"VALUE"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(u"key", std::u16string(u"VALUE"), "User message...", line_info_); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [9/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::u32string &  expected,
const std::u32string &  actual 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(U"value", std::u32string(U"VALUE")); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(U"key", std::u32string(U"VALUE")); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [10/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::u32string &  expected,
const std::u32string &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are equal.

Parameters
expectedthe expected value.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(U"value", std::u32string(U"VALUE"), line_info_); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(U"key", std::u32string(U"VALUE"), line_info_); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [11/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::u32string &  expected,
const std::u32string &  actual,
const std::string &  message 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(U"value", std::u32string(U"VALUE"), "User message..."); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(U"key", std::u32string(U"VALUE"), "User message..."); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [12/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::u32string &  expected,
const std::u32string &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are equal.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(U"value", std::u32string(U"VALUE"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(U"key", std::u32string(U"Value"), "User message...", line_info_); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [13/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::wstring &  expected,
const std::wstring &  actual 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(L"value", std::wstring(L"VALUE")); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(L"key", std::wstring(L"VALUE")); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [14/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::wstring &  expected,
const std::wstring &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(L"value", std::wstring(L"VALUE"), line_info_); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(L"key", std::wstring(L"VALUE"), line_info_); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [15/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::wstring &  expected,
const std::wstring &  actual,
const std::string &  message 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(L"value", std::wstring(L"VALUE"), "User message..."); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(L"key", std::wstring(L"VALUE"), "User message..."); // test throws an assertion_error exception.

§ are_equal_ignoring_case() [16/16]

static void xtd::tunit::string_assert::are_equal_ignoring_case ( const std::wstring &  expected,
const std::wstring &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_equal_ignoring_case(L"value", std::wstring(L"VALUE"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::are_equal_ignoring_case(L"key", std::wstring(L"VALUE"), "User message...", line_info_); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [1/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::string &  expected,
const std::string &  actual 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case("key", std::string("VALUE")); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case("value", std::string("VALUE")); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [2/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::string &  expected,
const std::string &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case("key", std::string("VALUE"), line_info_); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case("value", std::string("VALUE"), line_info_); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [3/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::string &  expected,
const std::string &  actual,
const std::string &  message 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case("key", std::string("VALUE"), "User message..."); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case("value", std::string("VALUE"), "User message..."); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [4/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::string &  expected,
const std::string &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case("key", std::string("VALUE"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case("value", std::string("VALUE"), "User message...", line_info_); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [5/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::u16string &  expected,
const std::u16string &  actual 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(u"key", std::u16string(u"VALUE")); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(u"value", std::u16string(u"VALUE")); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [6/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::u16string &  expected,
const std::u16string &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(u"key", std::u16string(u"VALUE"), line_info_); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(u"value", std::u16string(u"VALUE"), line_info_); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [7/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::u16string &  expected,
const std::u16string &  actual,
const std::string &  message 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(u"key", std::u16string(u"VALUE"), "User message..."); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(u"value", std::u16string(u"VALUE"), "User message..."); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [8/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::u16string &  expected,
const std::u16string &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(u"key", std::u16string(u"VALUE"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(u"value", std::u16string(u"VALUE"), "User message...", line_info_); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [9/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::u32string &  expected,
const std::u32string &  actual 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(U"key", std::u32string(U"VALUE")); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(U"value", std::u32string(U"VALUE")); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [10/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::u32string &  expected,
const std::u32string &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal(U"key", std::u32string(U"VALUE"), line_info_); // test ok.
xtd::tunit::string_assert::are_not_equal(U"value", std::u32string(U"VALUE"), line_info_); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [11/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::u32string &  expected,
const std::u32string &  actual,
const std::string &  message 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(U"key", std::u32string(U"VALUE"), "User message..."); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(U"value", std::u32string(U"VALUE"), "User message..."); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [12/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::u32string &  expected,
const std::u32string &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(U"key", std::u32string(U"vValuealue"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(U"value", std::u32string(U"Value"), "User message...", line_info_); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [13/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::wstring &  expected,
const std::wstring &  actual 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(L"key", std::wstring(L"VALUE")); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(L"value", std::wstring(L"VALUE")); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [14/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::wstring &  expected,
const std::wstring &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(L"key", std::wstring(L"VALUE"), line_info_); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(L"value", std::wstring(L"VALUE"), line_info_); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [15/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::wstring &  expected,
const std::wstring &  actual,
const std::string &  message 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(L"key", std::wstring(L"VALUE"), "User message..."); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(L"value", std::wstring(L"VALUE"), "User message..."); // test throws an assertion_error exception.

§ are_not_equal_ignoring_case() [16/16]

static void xtd::tunit::string_assert::are_not_equal_ignoring_case ( const std::wstring &  expected,
const std::wstring &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that two type are not equal ignoring case.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::are_not_equal_ignoring_case(L"key", std::wstring(L"VALUE"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::are_not_equal_ignoring_case(L"value", std::wstring(L"VALUE"), "User message...", line_info_); // test throws an assertion_error exception.

§ contains() [1/16]

static void xtd::tunit::string_assert::contains ( const std::string &  item,
const std::string &  string 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::contains("z", s); // test throws an assertion_error exception.

§ contains() [2/16]

static void xtd::tunit::string_assert::contains ( const std::string &  item,
const std::string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::contains("z", s, line_info_); // test throws an assertion_error exception.

§ contains() [3/16]

static void xtd::tunit::string_assert::contains ( const std::string &  item,
const std::string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::contains("a", s, "User message..."); // test ok.
xtd::tunit::string_assert::contains("z", s, "User message..."); // test throws an assertion_error exception.

§ contains() [4/16]

static void xtd::tunit::string_assert::contains ( const std::string &  item,
const std::string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::contains("a", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::contains("z", s, "User message...", line_info_); // test throws an assertion_error exception.

§ contains() [5/16]

static void xtd::tunit::string_assert::contains ( const std::u16string &  item,
const std::u16string &  string 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::contains(u"z", s); // test throws an assertion_error exception.

§ contains() [6/16]

static void xtd::tunit::string_assert::contains ( const std::u16string &  item,
const std::u16string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::contains(u"z", s, line_info_); // test throws an assertion_error exception.

§ contains() [7/16]

static void xtd::tunit::string_assert::contains ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::contains(u"a", s, "User message..."); // test ok.
xtd::tunit::string_assert::contains(u"z", s, "User message..."); // test throws an assertion_error exception.

§ contains() [8/16]

static void xtd::tunit::string_assert::contains ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::contains(u"a", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::contains(u"z", s, "User message...", line_info_); // test throws an assertion_error exception.

§ contains() [9/16]

static void xtd::tunit::string_assert::contains ( const std::u32string &  item,
const std::u32string &  string 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::contains(U"z", s); // test throws an assertion_error exception.

§ contains() [10/16]

static void xtd::tunit::string_assert::contains ( const std::u32string &  item,
const std::u32string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::contains(U"z", s, line_info_); // test throws an assertion_error exception.

§ contains() [11/16]

static void xtd::tunit::string_assert::contains ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::contains(U"a", s, "User message..."); // test ok.
xtd::tunit::string_assert::contains(U"z", s, "User message..."); // test throws an assertion_error exception.

§ contains() [12/16]

static void xtd::tunit::string_assert::contains ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::contains(U"a", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::contains(U"z", s, "User message...", line_info_); // test throws an assertion_error exception.

§ contains() [13/16]

static void xtd::tunit::string_assert::contains ( const std::wstring &  item,
const std::wstring &  string 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::contains(L"z", s); // test throws an assertion_error exception.

§ contains() [14/16]

static void xtd::tunit::string_assert::contains ( const std::wstring &  item,
const std::wstring &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::contains(L"z", s, line_info_); // test throws an assertion_error exception.

§ contains() [15/16]

static void xtd::tunit::string_assert::contains ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::contains(L"a", s, "User message..."); // test ok.
xtd::tunit::string_assert::contains(L"z", s, "User message..."); // test throws an assertion_error exception.

§ contains() [16/16]

static void xtd::tunit::string_assert::contains ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::contains(L"a", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::contains(L"z", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_contain() [1/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::string &  item,
const std::string &  string 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::contains("z", s); // test throws an assertion_error exception.

§ does_not_contain() [2/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::string &  item,
const std::string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::contains("z", s, line_info_); // test throws an assertion_error exception.

§ does_not_contain() [3/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::string &  item,
const std::string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::contains("a", s, "User message..."); // test ok.
xtd::tunit::string_assert::contains("z", s, "User message..."); // test throws an assertion_error exception.

§ does_not_contain() [4/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::string &  item,
const std::string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::contains("a", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::contains("z", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_contain() [5/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::u16string &  item,
const std::u16string &  string 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::contains(u"z", s); // test throws an assertion_error exception.

§ does_not_contain() [6/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::u16string &  item,
const std::u16string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::contains(u"z", s, line_info_); // test throws an assertion_error exception.

§ does_not_contain() [7/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::contains(u"a", s, "User message..."); // test ok.
xtd::tunit::string_assert::contains(u"z", s, "User message..."); // test throws an assertion_error exception.

§ does_not_contain() [8/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::contains(u"a", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::contains(u"z", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_contain() [9/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::u32string &  item,
const std::u32string &  string 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::contains(U"z", s); // test throws an assertion_error exception.

§ does_not_contain() [10/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::u32string &  item,
const std::u32string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::contains(U"z", s, line_info_); // test throws an assertion_error exception.

§ does_not_contain() [11/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::contains(U"a", s, "User message..."); // test ok.
xtd::tunit::string_assert::contains(U"z", s, "User message..."); // test throws an assertion_error exception.

§ does_not_contain() [12/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::contains(U"a", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::contains(U"z", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_contain() [13/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::wstring &  item,
const std::wstring &  string 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::contains(L"z", s); // test throws an assertion_error exception.

§ does_not_contain() [14/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::wstring &  item,
const std::wstring &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::contains(L"z", s, line_info_); // test throws an assertion_error exception.

§ does_not_contain() [15/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::contains(L"a", s, "User message..."); // test ok.
xtd::tunit::string_assert::contains(L"z", s, "User message..."); // test throws an assertion_error exception.

§ does_not_contain() [16/16]

static void xtd::tunit::string_assert::does_not_contain ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string contains an item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::contains(L"a", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::contains(L"z", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_end_with() [1/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::string &  item,
const std::string &  string 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::does_not_end_with("lue", s); // test throws an assertion_error exception.

§ does_not_end_with() [2/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::string &  item,
const std::string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::does_not_end_with("lue", s, line_info_); // test throws an assertion_error exception.

§ does_not_end_with() [3/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::string &  item,
const std::string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::does_not_end_with("law", s, "User message..."); // test ok.
xtd::tunit::string_assert::does_not_end_with("lue", s, "User message..."); // test throws an assertion_error exception.

§ does_not_end_with() [4/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::string &  item,
const std::string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::does_not_end_with("law", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_end_with("lue", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_end_with() [5/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::u16string &  item,
const std::u16string &  string 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::does_not_end_with(u"lue", s); // test throws an assertion_error exception.

§ does_not_end_with() [6/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::u16string &  item,
const std::u16string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that srinbg start with item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::does_not_end_with(u"lue", s, line_info_); // test throws an assertion_error exception.

§ does_not_end_with() [7/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::does_not_end_with(u"law", s, "User message..."); // test ok.
xtd::tunit::string_assert::does_not_end_with(u"lue", s, "User message..."); // test throws an assertion_error exception.

§ does_not_end_with() [8/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::does_not_end_with(u"law", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_end_with(u"lue", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_end_with() [9/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::u32string &  item,
const std::u32string &  string 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::does_not_end_with(U"lue", s); // test throws an assertion_error exception.

§ does_not_end_with() [10/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::u32string &  item,
const std::u32string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::does_not_end_with(U"lue", s, line_info_); // test throws an assertion_error exception.

§ does_not_end_with() [11/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::does_not_end_with(U"law", s, "User message..."); // test ok.
xtd::tunit::string_assert::does_not_end_with(U"lue", s, "User message..."); // test throws an assertion_error exception.

§ does_not_end_with() [12/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::does_not_end_with(U"law", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_end_with(U"lue", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_end_with() [13/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::wstring &  item,
const std::wstring &  string 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::does_not_end_with(L"lue", s); // test throws an assertion_error exception.

§ does_not_end_with() [14/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::wstring &  item,
const std::wstring &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::does_not_end_with(L"lue", s, line_info_); // test throws an assertion_error exception.

§ does_not_end_with() [15/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::does_not_end_with(L"law", s, "User message..."); // test ok.
xtd::tunit::string_assert::does_not_end_with(L"lue", s, "User message..."); // test throws an assertion_error exception.

§ does_not_end_with() [16/16]

static void xtd::tunit::string_assert::does_not_end_with ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does not end witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::does_not_end_with(L"law", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_end_with(L"lue", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_match() [1/8]

static void xtd::tunit::string_assert::does_not_match ( const std::string &  regex_pattern,
const std::string &  actual 
)
inlinestatic

Asserts that does not match regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::does_not_match("^Salut", std::string("Hello, World!")); // test ok.
xtd::tunit::string_assert::does_not_match("^Hello", std::string("Hello, World!")); // test throws an assertion_error exception.

§ does_not_match() [2/8]

static void xtd::tunit::string_assert::does_not_match ( const std::string &  regex_pattern,
const std::string &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that does not match regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::does_not_match("^Salut", std::string("Hello, World!"), line_info_); // test ok.
xtd::tunit::string_assert::does_not_match("^Hello", std::string("Hello, World!"), line_info_); // test throws an assertion_error exception.

§ does_not_match() [3/8]

static void xtd::tunit::string_assert::does_not_match ( const std::string &  regex_pattern,
const std::string &  actual,
const std::string &  message 
)
inlinestatic

Asserts that does not match regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::does_not_match("^Salut", std::string("Hello, World!"), "User message..."); // test ok.
xtd::tunit::string_assert::does_not_match("^Hello", std::string("Hello, World!"), "User message..."); // test throws an assertion_error exception.

§ does_not_match() [4/8]

static void xtd::tunit::string_assert::does_not_match ( const std::string &  regex_pattern,
const std::string &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that does not match regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::does_not_match("^Salut", "Hello, World!", std::string("User message..."), line_info_); // test ok.
xtd::tunit::string_assert::does_not_match("^Hello", "Hello, World!", std::string("User message..."), line_info_); // test throws an assertion_error exception.

§ does_not_match() [5/8]

static void xtd::tunit::string_assert::does_not_match ( const std::wstring &  regex_pattern,
const std::wstring &  actual 
)
inlinestatic

Asserts that does not match regex patern. /.

Todo:
: when std::regex ready: remove this comment.

/

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void does_not_match(const std::u16string& regex_pattern, const std::u16string& actual) {does_not_match(regex_pattern, actual, "", line_info());}

/Asserts that does not match regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
line_infoContains information about current file and current line. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void does_not_match(const std::u16string& regex_pattern, const std::u16string& actual, const xtd::tunit::line_info& line_info) {does_not_match(regex_pattern, actual, "", line_info);}

/Asserts that does not match regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
messageA user message to display if the assertion fails. This message can be seen in the unit test results. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void does_not_match(const std::u16string& regex_pattern, const std::u16string& actual, const std::string& message) {does_not_match(regex_pattern, actual, message, line_info());}

/Asserts that does not match regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
messageA user message to display if the assertion fails. This message can be seen in the unit test results. /
line_infoContains information about current file and current line. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void does_not_match(const std::u16string& regex_pattern, const std::u16string& actual, const std::string& message, const xtd::tunit::line_info& line_info) { std::u16regex r(regex_pattern); std::u16smatch m; std::basic_regex<char16_t> r(regex_pattern); std::match_results<std::u16string::const_iterator> m; if (std::regex_search(actual, m, r) == false) assert::succeed(message, line_info); else base_assert::fail("not string matching " + base_assert::to_string(regex_pattern), base_assert::to_string(actual), message, line_info); }

/Asserts that does not match regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void does_not_match(const std::u32string& regex_pattern, const std::u32string& actual) {does_not_match(regex_pattern, actual, "", line_info());}

/Asserts that does not match regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
line_infoContains information about current file and current line. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void does_not_match(const std::u32string& regex_pattern, const std::u32string& actual, const xtd::tunit::line_info& line_info) {does_not_match(regex_pattern, actual, "", line_info);}

/Asserts that does not match regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
messageA user message to display if the assertion fails. This message can be seen in the unit test results. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void does_not_match(const std::u32string& regex_pattern, const std::u32string& actual, const std::string& message) {does_not_match(regex_pattern, actual, message, line_info());}

/Asserts that does not match regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
messageA user message to display if the assertion fails. This message can be seen in the unit test results. /
line_infoContains information about current file and current line. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void does_not_match(const std::u32string& regex_pattern, const std::u32string& actual, const std::string& message, const xtd::tunit::line_info& line_info) { std::u32regex r(regex_pattern); std::u32smatch m; std::basic_regex<char32_t> r(regex_pattern); std::match_results<std::u32string::const_iterator> m; if (std::regex_search(actual, m, r) == false) assert::succeed(message, line_info); else base_assert::fail("not string matching " + base_assert::to_string(regex_pattern), base_assert::to_string(actual), message, line_info); }Asserts that does not match regex patern.
Parameters
regex_patternthe regex patern.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::does_not_match(L"^Salut", std::wstring(L"Hello, World!")); // test ok.
xtd::tunit::string_assert::does_not_match(L"^Hello", std::wstring(L"Hello, World!")); // test throws an assertion_error exception.

§ does_not_match() [6/8]

static void xtd::tunit::string_assert::does_not_match ( const std::wstring &  regex_pattern,
const std::wstring &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that does not match regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::does_not_match(L"^Salut", std::wstring(L"Hello, World!"), line_info_); // test ok.
xtd::tunit::string_assert::does_not_match(L"^Hello", std::wstring(L"Hello, World!"), line_info_); // test throws an assertion_error exception.

§ does_not_match() [7/8]

static void xtd::tunit::string_assert::does_not_match ( const std::wstring &  regex_pattern,
const std::wstring &  actual,
const std::string &  message 
)
inlinestatic

Asserts that does not match regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::does_not_match(L"^Salut", std::wstring(L"Hello, World!"), "User message..."); // test ok.
xtd::tunit::string_assert::does_not_match(L"^Hello", std::wstring(L"Hello, World!"), "User message..."); // test throws an assertion_error exception.

§ does_not_match() [8/8]

static void xtd::tunit::string_assert::does_not_match ( const std::wstring &  regex_pattern,
const std::wstring &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that does not match regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::does_not_match(L"^Salut", std::wstring(L"Hello, World!"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_match(L"^Hello", std::wstring(L"Hello, World!"), "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_start_with() [1/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::string &  item,
const std::string &  string 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::does_not_start_with("val", s); // test throws an assertion_error exception.

§ does_not_start_with() [2/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::string &  item,
const std::string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::does_not_start_with("val", s, line_info_); // test throws an assertion_error exception.

§ does_not_start_with() [3/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::string &  item,
const std::string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::does_not_start_with("zoe", s, "User message..."); // test ok.
xtd::tunit::string_assert::does_not_start_with("val", s, "User message..."); // test throws an assertion_error exception.

§ does_not_start_with() [4/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::string &  item,
const std::string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::does_not_start_with("zoe", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_start_with("val", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_start_with() [5/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::u16string &  item,
const std::u16string &  string 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::does_not_start_with(u"val", s); // test throws an assertion_error exception.

§ does_not_start_with() [6/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::u16string &  item,
const std::u16string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that srinbg start with item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::does_not_start_with(u"val", s, line_info_); // test throws an assertion_error exception.

§ does_not_start_with() [7/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::does_not_start_with(u"zoe", s, "User message..."); // test ok.
xtd::tunit::string_assert::does_not_start_with(u"val", s, "User message..."); // test throws an assertion_error exception.

§ does_not_start_with() [8/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::does_not_start_with(u"zoe", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_start_with(u"val", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_start_with() [9/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::u32string &  item,
const std::u32string &  string 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::does_not_start_with(U"val", s); // test throws an assertion_error exception.

§ does_not_start_with() [10/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::u32string &  item,
const std::u32string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::does_not_start_with(U"val", s, line_info_); // test throws an assertion_error exception.

§ does_not_start_with() [11/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::does_not_start_with(U"zoe", s, "User message..."); // test ok.
xtd::tunit::string_assert::does_not_start_with(U"val", s, "User message..."); // test throws an assertion_error exception.

§ does_not_start_with() [12/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::does_not_start_with(U"zoe", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_start_with(U"val", s, "User message...", line_info_); // test throws an assertion_error exception.

§ does_not_start_with() [13/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::wstring &  item,
const std::wstring &  string 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::does_not_start_with(L"val", s); // test throws an assertion_error exception.

§ does_not_start_with() [14/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::wstring &  item,
const std::wstring &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::does_not_start_with(L"val", s, line_info_); // test throws an assertion_error exception.

§ does_not_start_with() [15/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::does_not_start_with(L"zoe", s, "User message..."); // test ok.
xtd::tunit::string_assert::does_not_start_with(L"val", s, "User message..."); // test throws an assertion_error exception.

§ does_not_start_with() [16/16]

static void xtd::tunit::string_assert::does_not_start_with ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string does noy start witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::does_not_start_with(L"zoe", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::does_not_start_with(L"val", s, "User message...", line_info_); // test throws an assertion_error exception.

§ ends_with() [1/16]

static void xtd::tunit::string_assert::ends_with ( const std::string &  item,
const std::string &  string 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::ends_with("law", s); // test throws an assertion_error exception.

§ ends_with() [2/16]

static void xtd::tunit::string_assert::ends_with ( const std::string &  item,
const std::string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::ends_with("law", s, line_info_); // test throws an assertion_error exception.

§ ends_with() [3/16]

static void xtd::tunit::string_assert::ends_with ( const std::string &  item,
const std::string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::ends_with("val", s, "User message..."); // test ok.
xtd::tunit::string_assert::ends_with("law", s, "User message..."); // test throws an assertion_error exception.

§ ends_with() [4/16]

static void xtd::tunit::string_assert::ends_with ( const std::string &  item,
const std::string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::ends_with("lue", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::ends_with("law", s, "User message...", line_info_); // test throws an assertion_error exception.

§ ends_with() [5/16]

static void xtd::tunit::string_assert::ends_with ( const std::u16string &  item,
const std::u16string &  string 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::ends_with(u"lue", s); // test ok.
xtd::tunit::string_assert::ends_with(u"law", s); // test throws an assertion_error exception.

§ ends_with() [6/16]

static void xtd::tunit::string_assert::ends_with ( const std::u16string &  item,
const std::u16string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that srinbg start with item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::ends_with(u"law", s, line_info_); // test throws an assertion_error exception.

§ ends_with() [7/16]

static void xtd::tunit::string_assert::ends_with ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::ends_with(u"lue", s, "User message..."); // test ok.
xtd::tunit::string_assert::ends_with(u"law", s, "User message..."); // test throws an assertion_error exception.

§ ends_with() [8/16]

static void xtd::tunit::string_assert::ends_with ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::ends_with(u"lue", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::ends_with(u"law", s, "User message...", line_info_); // test throws an assertion_error exception.

§ ends_with() [9/16]

static void xtd::tunit::string_assert::ends_with ( const std::u32string &  item,
const std::u32string &  string 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::ends_with(U"lue", s); // test ok.
xtd::tunit::string_assert::ends_with(U"law", s); // test throws an assertion_error exception.

§ ends_with() [10/16]

static void xtd::tunit::string_assert::ends_with ( const std::u32string &  item,
const std::u32string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::ends_with(U"law", s, line_info_); // test throws an assertion_error exception.

§ ends_with() [11/16]

static void xtd::tunit::string_assert::ends_with ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::ends_with(U"lue", s, "User message..."); // test ok.
xtd::tunit::string_assert::ends_with(U"law", s, "User message..."); // test throws an assertion_error exception.

§ ends_with() [12/16]

static void xtd::tunit::string_assert::ends_with ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::ends_with(U"lue", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::ends_with(U"law", s, "User message...", line_info_); // test throws an assertion_error exception.

§ ends_with() [13/16]

static void xtd::tunit::string_assert::ends_with ( const std::wstring &  item,
const std::wstring &  string 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::ends_with(L"lue", s); // test ok.
xtd::tunit::string_assert::ends_with(L"law", s); // test throws an assertion_error exception.

§ ends_with() [14/16]

static void xtd::tunit::string_assert::ends_with ( const std::wstring &  item,
const std::wstring &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::ends_with(L"law", s, line_info_); // test throws an assertion_error exception.

§ ends_with() [15/16]

static void xtd::tunit::string_assert::ends_with ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::ends_with(L"lue", s, "User message..."); // test ok.
xtd::tunit::string_assert::ends_with(L"law", s, "User message..."); // test throws an assertion_error exception.

§ ends_with() [16/16]

static void xtd::tunit::string_assert::ends_with ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string ends witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::ends_with(L"lue", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::ends_with(L"law", s, "User message...", line_info_); // test throws an assertion_error exception.

§ matches() [1/8]

static void xtd::tunit::string_assert::matches ( const std::string &  regex_pattern,
const std::string &  actual 
)
inlinestatic

Asserts that matches regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::matches("^Hello", std::string("Hello, World!")); // test ok.
xtd::tunit::string_assert::matches("^Salut", std::string("Hello, World!")); // test throws an assertion_error exception.

§ matches() [2/8]

static void xtd::tunit::string_assert::matches ( const std::string &  regex_pattern,
const std::string &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that matches regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::matches("^Hello", std::string("Hello, World!"), line_info_); // test ok.
xtd::tunit::string_assert::matches("^Salut", std::string("Hello, World!"), line_info_); // test throws an assertion_error exception.

§ matches() [3/8]

static void xtd::tunit::string_assert::matches ( const std::string &  regex_pattern,
const std::string &  actual,
const std::string &  message 
)
inlinestatic

Asserts that matches regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::matches("^Hello", std::string("Hello, World!"), "User message..."); // test ok.
xtd::tunit::string_assert::matches("^Salut", std::string("Hello, World!"), "User message..."); // test throws an assertion_error exception.

§ matches() [4/8]

static void xtd::tunit::string_assert::matches ( const std::string &  regex_pattern,
const std::string &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that matches regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::matches("^Hello", "Hello, World!", std::string("User message..."), line_info_); // test ok.
xtd::tunit::string_assert::matches("^Salut", "Hello, World!", std::string("User message..."), line_info_); // test throws an assertion_error exception.

§ matches() [5/8]

static void xtd::tunit::string_assert::matches ( const std::wstring &  regex_pattern,
const std::wstring &  actual 
)
inlinestatic

Asserts that matches regex patern. /.

Todo:
: when std::regex ready: remove this comment.

/

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void matches(const std::u16string& regex_pattern, const std::u16string& actual) {matches(regex_pattern, actual, "", line_info());}

/Asserts that matches regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
line_infoContains information about current file and current line. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void matches(const std::u16string& regex_pattern, const std::u16string& actual, const xtd::tunit::line_info& line_info) {matches(regex_pattern, actual, "", line_info);}

/Asserts that matches regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
messageA user message to display if the assertion fails. This message can be seen in the unit test results. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void matches(const std::u16string& regex_pattern, const std::u16string& actual, const std::string& message) {matches(regex_pattern, actual, message, line_info());}

/Asserts that matches regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
messageA user message to display if the assertion fails. This message can be seen in the unit test results. /
line_infoContains information about current file and current line. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void matches(const std::u16string& regex_pattern, const std::u16string& actual, const std::string& message, const xtd::tunit::line_info& line_info) { std::u16regex r(regex_pattern); std::u16smatch m; std::basic_regex<char16_t> r(regex_pattern); std::match_results<std::u16string::const_iterator> m; if (std::regex_search(actual, m, r)) assert::succeed(message, line_info); else base_assert::fail("string matching " + base_assert::to_string(regex_pattern), base_assert::to_string(actual), message, line_info); }

/Asserts that matches regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void matches(const std::u32string& regex_pattern, const std::u32string& actual) {matches(regex_pattern, actual, "", line_info());}

/Asserts that matches regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
line_infoContains information about current file and current line. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void matches(const std::u32string& regex_pattern, const std::u32string& actual, const xtd::tunit::line_info& line_info) {matches(regex_pattern, actual, "", line_info);}

/Asserts that matches regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
messageA user message to display if the assertion fails. This message can be seen in the unit test results. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void matches(const std::u32string& regex_pattern, const std::u32string& actual, const std::string& message) {matches(regex_pattern, actual, message, line_info());}

/Asserts that matches regex patern. /

Parameters
regex_patternthe regex patern. /
actualthe actual value. /
messageA user message to display if the assertion fails. This message can be seen in the unit test results. /
line_infoContains information about current file and current line. /
Exceptions
xtd::tunit::assertion_errorIf bad assertion. /
Examples
/
///
static void matches(const std::u32string& regex_pattern, const std::u32string& actual, const std::string& message, const xtd::tunit::line_info& line_info) { std::u32regex r(regex_pattern); std::u32smatch m; std::basic_regex<char32_t> r(regex_pattern); std::match_results<std::u32string::const_iterator> m; if (std::regex_search(actual, m, r) == true) assert::succeed(message, line_info); else base_assert::fail("string matching " + base_assert::to_string(regex_pattern), base_assert::to_string(actual), message, line_info); }Asserts that matches regex patern.
Parameters
regex_patternthe regex patern.
actualthe actual value.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::matches(L"^Hello", std::wstring(L"Hello, World!")); // test ok.
xtd::tunit::string_assert::matches(L"^Salut", std::wstring(L"Hello, World!")); // test throws an assertion_error exception.

§ matches() [6/8]

static void xtd::tunit::string_assert::matches ( const std::wstring &  regex_pattern,
const std::wstring &  actual,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that matches regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::matches(L"^Hello", std::wstring(L"Hello, World!"), line_info_); // test ok.
xtd::tunit::string_assert::matches(L"^Salut", std::wstring(L"Hello, World!"), line_info_); // test throws an assertion_error exception.

§ matches() [7/8]

static void xtd::tunit::string_assert::matches ( const std::wstring &  regex_pattern,
const std::wstring &  actual,
const std::string &  message 
)
inlinestatic

Asserts that matches regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::matches(L"^Hello", std::wstring(L"Hello, World!"), "User message..."); // test ok.
xtd::tunit::string_assert::matches(L"^Salut", std::wstring(L"Hello, World!"), "User message..."); // test throws an assertion_error exception.

§ matches() [8/8]

static void xtd::tunit::string_assert::matches ( const std::wstring &  regex_pattern,
const std::wstring &  actual,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that matches regex patern.

Parameters
regex_patternthe regex patern.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
xtd::tunit::string_assert::matches(L"^Hello", std::wstring(L"Hello, World!"), "User message...", line_info_); // test ok.
xtd::tunit::string_assert::matches(L"^Salut", std::wstring(L"Hello, World!"), "User message...", line_info_); // test throws an assertion_error exception.

§ starts_with() [1/16]

static void xtd::tunit::string_assert::starts_with ( const std::string &  item,
const std::string &  string 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::starts_with("zoe", s); // test throws an assertion_error exception.

§ starts_with() [2/16]

static void xtd::tunit::string_assert::starts_with ( const std::string &  item,
const std::string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::starts_with("zoe", s, line_info_); // test throws an assertion_error exception.

§ starts_with() [3/16]

static void xtd::tunit::string_assert::starts_with ( const std::string &  item,
const std::string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::starts_with("val", s, "User message..."); // test ok.
xtd::tunit::string_assert::starts_with("zoe", s, "User message..."); // test throws an assertion_error exception.

§ starts_with() [4/16]

static void xtd::tunit::string_assert::starts_with ( const std::string &  item,
const std::string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s = "value";
xtd::tunit::string_assert::starts_with("val", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::starts_with("zoe", s, "User message...", line_info_); // test throws an assertion_error exception.

§ starts_with() [5/16]

static void xtd::tunit::string_assert::starts_with ( const std::u16string &  item,
const std::u16string &  string 
)
inlinestatic

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::starts_with(u"zoe", s); // test throws an assertion_error exception.

§ starts_with() [6/16]

static void xtd::tunit::string_assert::starts_with ( const std::u16string &  item,
const std::u16string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that srinbg start with item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::starts_with(u"zoe", s, line_info_); // test throws an assertion_error exception.

§ starts_with() [7/16]

static void xtd::tunit::string_assert::starts_with ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::starts_with(u"val", s, "User message..."); // test ok.
xtd::tunit::string_assert::starts_with(u"zoe", s, "User message..."); // test throws an assertion_error exception.

§ starts_with() [8/16]

static void xtd::tunit::string_assert::starts_with ( const std::u16string &  item,
const std::u16string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u16string s = u"value";
xtd::tunit::string_assert::starts_with(u"val", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::starts_with(u"zoe", s, "User message...", line_info_); // test throws an assertion_error exception.

§ starts_with() [9/16]

static void xtd::tunit::string_assert::starts_with ( const std::u32string &  item,
const std::u32string &  string 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::starts_with(U"zoe", s); // test throws an assertion_error exception.

§ starts_with() [10/16]

static void xtd::tunit::string_assert::starts_with ( const std::u32string &  item,
const std::u32string &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::starts_with(U"zoe", s, line_info_); // test throws an assertion_error exception.

§ starts_with() [11/16]

static void xtd::tunit::string_assert::starts_with ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::starts_with(U"val", s, "User message..."); // test ok.
xtd::tunit::string_assert::starts_with(U"zoe", s, "User message..."); // test throws an assertion_error exception.

§ starts_with() [12/16]

static void xtd::tunit::string_assert::starts_with ( const std::u32string &  item,
const std::u32string &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::u32string s = U"value";
xtd::tunit::string_assert::starts_with(U"val", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::starts_with(U"zoe", s, "User message...", line_info_); // test throws an assertion_error exception.

§ starts_with() [13/16]

static void xtd::tunit::string_assert::starts_with ( const std::wstring &  item,
const std::wstring &  string 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::starts_with(L"zoe", s); // test throws an assertion_error exception.

§ starts_with() [14/16]

static void xtd::tunit::string_assert::starts_with ( const std::wstring &  item,
const std::wstring &  string,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::starts_with(L"zoe", s, line_info_); // test throws an assertion_error exception.

§ starts_with() [15/16]

static void xtd::tunit::string_assert::starts_with ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::starts_with(L"val", s, "User message..."); // test ok.
xtd::tunit::string_assert::starts_with(L"zoe", s, "User message..."); // test throws an assertion_error exception.

§ starts_with() [16/16]

static void xtd::tunit::string_assert::starts_with ( const std::wstring &  item,
const std::wstring &  string,
const std::string &  message,
const xtd::tunit::line_info line_info 
)
inlinestatic

Asserts that string starts witdh item.

Parameters
itemobject to verify.
collectionthat contains object.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::wstring s = L"value";
xtd::tunit::string_assert::starts_with(L"val", s, "User message...", line_info_); // test ok.
xtd::tunit::string_assert::starts_with(L"zoe", s, "User message...", line_info_); // test throws an assertion_error exception.

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