xtd 0.2.0
Loading...
Searching...
No Matches

◆ starts_with_

#define starts_with_ (   ...)

#include <xtd.tunit/include/xtd/tunit/string_assert.h>

Asserts that string starts with item.

Parameters
itemobject to verify.
collectionthat contains object.
messageAn optional user message to display if the assertion fails. This message can be seen in the unit test results.
Remarks
Contains information about current file and current line.
Can be used with xtd::tunit::string_assert, xtd::tunit::string_assume and xtd::tunit::string_valid classes.
Examples
xtd::string s = "value";
xtd::tunit::string_assert::starts_with_("val", s); // test ok.
xtd::tunit::string_assert::starts_with_("zoe", s, "User message..."); // test error.
xtd::tunit::string_assume::starts_with_("val", s); // test ok.
xtd::tunit::string_assume::starts_with_("zoe", s, "User message..."); // test error.
xtd::tunit::string_valid::starts_with_("val", s); // test ok.
xtd::tunit::string_valid::starts_with_("zoe", s, "User message..."); // test error.
Represents text as a sequence of character units.
Definition basic_string.h:79