The file_valid class contains a collection of static methods that implement the most file assertions used in xtd::tUnit.
- Namespace
- xtd::tunit
- Library
- xtd.tunit
- Examples
- This example show how to used some methods :
#include <xtd/xtd.tunit>
#include <stdexcept>
namespace unit_tests {
class test_class_(test) {
public:
void test_method_(test_case1) {
assert::is_true(true);
}
void test_method_(test_case2) {
assert::is_false(true);
}
void test_method_(test_case3) {
assert::does_not_throw([] {throw std::range_error("error");});
}
};
}
int main() {
}
The console_unit_test class is console unit test interface.
Definition console_unit_test.h:23
int run()
Runs all tests in this UnitTest object and prints the result.
Definition unit_test.h:44
The tunit namespace contains a unit test library.
Definition abort_error.h:11
|
template<typename Char > |
static void | are_equal (const std::basic_istream< Char > &expected, const std::basic_istream< Char > &actual) |
| Validate that two files are equal.
|
|
template<typename Char > |
static void | are_equal (const std::basic_istream< Char > &expected, const std::basic_istream< Char > &actual, const std::string &message) |
| Validate that two files are equal.
|
|
template<typename Char > |
static void | are_equal (const std::basic_istream< Char > &expected, const std::basic_istream< Char > &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that two files are equal.
|
|
template<typename Char > |
static void | are_equal (const std::basic_istream< Char > &expected, const std::basic_istream< Char > &actual, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that two files are equal.
|
|
template<typename Char > |
static void | are_equal (const std::basic_string< Char > &expected, const std::basic_string< Char > &actual) |
| Validate that two files are equal.
|
|
template<typename Char > |
static void | are_equal (const std::basic_string< Char > &expected, const std::basic_string< Char > &actual, const std::string &message) |
| Validate that two files are equal.
|
|
template<typename Char > |
static void | are_equal (const std::basic_string< Char > &expected, const std::basic_string< Char > &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that two files are equal.
|
|
template<typename Char > |
static void | are_equal (const std::basic_string< Char > &expected, const std::basic_string< Char > &actual, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that two files are equal.
|
|
template<typename Char > |
static void | are_not_equal (const std::basic_istream< Char > &expected, const std::basic_istream< Char > &actual) |
| Validate that two files are not equal.
|
|
template<typename Char > |
static void | are_not_equal (const std::basic_istream< Char > &expected, const std::basic_istream< Char > &actual, const std::string &message) |
| Validate that two files are not equal.
|
|
template<typename Char > |
static void | are_not_equal (const std::basic_istream< Char > &expected, const std::basic_istream< Char > &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that two files are not equal.
|
|
template<typename Char > |
static void | are_not_equal (const std::basic_istream< Char > &expected, const std::basic_istream< Char > &actual, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that two files are not equal.
|
|
template<typename Char > |
static void | are_not_equal (const std::basic_string< Char > &expected, const std::basic_string< Char > &actual) |
| Validate that two files are not equal.
|
|
template<typename Char > |
static void | are_not_equal (const std::basic_string< Char > &expected, const std::basic_string< Char > &actual, const std::string &message) |
| Validate that two files are not equal.
|
|
template<typename Char > |
static void | are_not_equal (const std::basic_string< Char > &expected, const std::basic_string< Char > &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that two files are not equal.
|
|
template<typename Char > |
static void | are_not_equal (const std::basic_string< Char > &expected, const std::basic_string< Char > &actual, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that two files are not equal.
|
|
template<typename Char > |
static void | does_not_exist (const std::basic_string< Char > &file) |
| Validate that file not exists.
|
|
template<typename Char > |
static void | does_not_exist (const std::basic_string< Char > &file, const std::string &message) |
| Validate that file not exists.
|
|
template<typename Char > |
static void | does_not_exist (const std::basic_string< Char > &file, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that file not exists.
|
|
template<typename Char > |
static void | does_not_exist (const std::basic_string< Char > &file, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that file not exists.
|
|
template<typename Char > |
static void | exists (const std::basic_string< Char > &file) |
| Validate that file exists.
|
|
template<typename Char > |
static void | exists (const std::basic_string< Char > &file, const std::string &message) |
| Validate that file exists.
|
|
template<typename Char > |
static void | exists (const std::basic_string< Char > &file, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that file exists.
|
|
template<typename Char > |
static void | exists (const std::basic_string< Char > &file, const xtd::diagnostics::stack_frame &stack_frame) |
| Validate that file exists.
|
|