feat: add new tests
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user