mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Comparing a null ZString with a non-null ZString would crash.
This commit is contained in:
@@ -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?";
|
||||
|
||||
Reference in New Issue
Block a user