feat: add new tests

This commit is contained in:
samsonium
2026-10-21 04:00:03 +03:00
parent 80f07dc7c6
commit e49ebba346
13 changed files with 145 additions and 99 deletions
+23
View File
@@ -0,0 +1,23 @@
class Item
{
int value;
}
fn maybe_item(bool create) Item
{
if (create)
return new Item;
return null;
}
Item empty = maybe_item(false);
Item present = maybe_item(true);
if (empty == null && present != null)
printline("null handling passed");
else
{
printline("null handling failed");
exit(1);
}