The string_valid class contains a collection of static methods that implement the most string assertions used in xtd::tUnit.
- Namespace
- xtd::tunit
- Library
- xtd.tunit
- Examples
- This example show how to used some methods :
#include <xtd/xtd.tunit>
namespace unit_tests {
class test_class_(test) {
auto s =
"A string value";
string_valid::are_equal_ignoring_case("A STRING VALUE", s);
}
auto s =
"A string value";
string_valid::contains("item", s);
}
auto s =
"A string value";
string_valid::matches("item$", s);
}
};
}
auto main() -> int {
}
The console_unit_test class is console unit test interface.
Definition console_unit_test.h:23
int32 run() noexcept
Runs all tests in this unit_test object and prints the result.
#define test_method_(method_name)
Add test method to class test.
Definition test_method_attribute.h:89
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.h:16
The tunit namespace contains a unit test library.
Definition abort_error.h:10
|
static void | are_equal_ignoring_case (const xtd::string &expected, const xtd::string &actual) |
| Validates that two type are equal ignoring case.
|
|
static void | are_equal_ignoring_case (const xtd::string &expected, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that two type are equal ignoring case.
|
|
static void | are_equal_ignoring_case (const xtd::string &expected, const xtd::string &actual, const xtd::string &message) |
| Validates that two type are equal ignoring case.
|
|
static void | are_equal_ignoring_case (const xtd::string &expected, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that two type are equal ignoring case.
|
|
static void | are_not_equal_ignoring_case (const xtd::string &expected, const xtd::string &actual) |
| Validates that two type are not equal ignoring case.
|
|
static void | are_not_equal_ignoring_case (const xtd::string &expected, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that two type are not equal ignoring case.
|
|
static void | are_not_equal_ignoring_case (const xtd::string &expected, const xtd::string &actual, const xtd::string &message) |
| Validates that two type are not equal ignoring case.
|
|
static void | are_not_equal_ignoring_case (const xtd::string &expected, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that two type are not equal ignoring case.
|
|
static void | contains (const xtd::string &item, const xtd::string &string) |
| Validates that string contains an item.
|
|
static void | contains (const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string contains an item.
|
|
static void | contains (const xtd::string &item, const xtd::string &string, const xtd::string &message) |
| Validates that string contains an item.
|
|
static void | contains (const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string contains an item.
|
|
static void | does_not_contain (const xtd::string &item, const xtd::string &string) |
| Validates that string contains an item.
|
|
static void | does_not_contain (const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string contains an item.
|
|
static void | does_not_contain (const xtd::string &item, const xtd::string &string, const xtd::string &message) |
| Validates that string contains an item.
|
|
static void | does_not_contain (const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string contains an item.
|
|
static void | does_not_end_with (const xtd::string &item, const xtd::string &string) |
| Validates that string does not end with a specific item.
|
|
static void | does_not_end_with (const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string starts with item.
|
|
static void | does_not_end_with (const xtd::string &item, const xtd::string &string, const xtd::string &message) |
| Validates that string starts with item.
|
|
static void | does_not_end_with (const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string starts with item.
|
|
static void | does_not_match (const xtd::string ®ex_pattern, const xtd::string &actual) |
| Validates that does not match regex pattern.
|
|
static void | does_not_match (const xtd::string ®ex_pattern, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that does not match regex pattern.
|
|
static void | does_not_match (const xtd::string ®ex_pattern, const xtd::string &actual, const xtd::string &message) |
| Validates that does not match regex pattern.
|
|
static void | does_not_match (const xtd::string ®ex_pattern, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that does not match regex pattern.
|
|
static void | does_not_start_with (const xtd::string &item, const xtd::string &string) |
| Validates that string does not start with a specific item.
|
|
static void | does_not_start_with (const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string starts with item.
|
|
static void | does_not_start_with (const xtd::string &item, const xtd::string &string, const xtd::string &message) |
| Validates that string starts with item.
|
|
static void | does_not_start_with (const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string starts with item.
|
|
static void | ends_with (const xtd::string &item, const xtd::string &string) |
| Validates that string ends with a specific item.
|
|
static void | ends_with (const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string starts with item.
|
|
static void | ends_with (const xtd::string &item, const xtd::string &string, const xtd::string &message) |
| Validates that string starts with item.
|
|
static void | ends_with (const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string starts with item.
|
|
static void | matches (const xtd::string ®ex_pattern, const xtd::string &actual) |
| Validates that matches regex pattern.
|
|
static void | matches (const xtd::string ®ex_pattern, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that matches regex pattern.
|
|
static void | matches (const xtd::string ®ex_pattern, const xtd::string &actual, const xtd::string &message) |
| Validates that matches regex pattern.
|
|
static void | matches (const xtd::string ®ex_pattern, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that matches regex pattern.
|
|
static void | starts_with (const xtd::string &item, const xtd::string &string) |
| Validates that string starts with a specific item.
|
|
static void | starts_with (const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string starts with item.
|
|
static void | starts_with (const xtd::string &item, const xtd::string &string, const xtd::string &message) |
| Validates that string starts with item.
|
|
static void | starts_with (const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validates that string starts with item.
|
|