Enable support to initialize a string_t with a const char[] within M_LET.
This commit is contained in:
1 parent
d4cd327ea3
commit
ad5c141a7c
2 files changed
+4
No files matched your search
@@ -1273,6 +1273,7 @@ namespace m_string {
|
||||
/* Define the OPLIST of a STRING */
|
||||
#define STRING_OPLIST \
|
||||
(INIT(string_init),INIT_SET(string_init_set), SET(string_set), \
|
||||
INIT_WITH(string_init_set_str), \
|
||||
INIT_MOVE(string_init_move), MOVE(string_move), \
|
||||
SWAP(string_swap), CLEAN(string_clean), \
|
||||
CLEAR(string_clear), HASH(string_hash), EQUAL(string_equal_p), \
|
||||
|
||||
@@ -33,6 +33,9 @@ static void test1(void)
|
||||
string_set(s2, s1);
|
||||
assert(string_equal_p(s1, s2));
|
||||
}
|
||||
M_LET((s1,"OK"),string_t) {
|
||||
assert(string_equal_str_p(s1, "OK"));
|
||||
}
|
||||
}
|
||||
|
||||
static void test_utf8_basic(void)
|
||||
|
||||
Reference in new issue
Block a user