Comparing a null ZString with a non-null ZString would crash.

This commit is contained in:
Christoffer Lerno
2025-07-02 01:22:34 +02:00
parent ad48637cbb
commit af192354fd
3 changed files with 7 additions and 0 deletions

View File

@@ -197,7 +197,12 @@ fn void test_zstring()
ZString test3 = "bye";
assert(test.zstr_tcopy() == test2);
assert(test.zstr_tcopy() != test3);
ZString null_string;
assert(test != null_string);
assert(null_string == null_string);
assert(null_string != test);
}
fn void test_replace()
{
String test = "Befriend some dragons?";