Skip to content

Commit

Permalink
add tests for slice default construction
Browse files Browse the repository at this point in the history
  • Loading branch information
Il-Capitano committed Dec 29, 2024
1 parent 682f8a1 commit c81bb5f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/behavior/success/builtin_default_construct.bz
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function main()
{
let a = [: int32]();
if (a.size() != 0) unreachable;
if (a.begin() != null) unreachable;
if (a.end() != null) unreachable;

let a = [: *int32]();
if (a.size() != 0) unreachable;
if (a.begin() != null) unreachable;
if (a.end() != null) unreachable;

let a = [: [10: int32]]();
if (a.size() != 0) unreachable;
if (a.begin() != null) unreachable;
if (a.end() != null) unreachable;

let a = [: [int32, float64, str]]();
if (a.size() != 0) unreachable;
if (a.begin() != null) unreachable;
if (a.end() != null) unreachable;
}

0 comments on commit c81bb5f

Please sign in to comment.