Tests whether a string equals a given literal.
More...
Tests whether a string equals a given literal.
- Example:
assert( equals.test("foo"));
assert(!equals.test("foob"));
assert(!equals.test("bfoo"));
EqualsTest(std::string literal) noexcept
Constructs an EqualsTest that succeeds for subjects that equal a given literal.
Definition at line 41 of file EqualsTest.h.
◆ EqualsTest()
hext::EqualsTest::EqualsTest |
( |
std::string |
literal | ) |
|
|
explicitnoexcept |
Constructs an EqualsTest that succeeds for subjects that equal a given literal.
- Parameters
-
literal | A string that a subject must equal. |
◆ test()
bool hext::EqualsTest::test |
( |
const char * |
subject | ) |
const |
|
overridevirtual |
Returns true if subject equals literal.
- Parameters
-
subject | The string that is to be tested. |
Implements hext::ValueTest.
The documentation for this class was generated from the following file: