Skip to content

Commit

Permalink
cleaner test
Browse files Browse the repository at this point in the history
  • Loading branch information
Chriscbr committed Sep 20, 2024
1 parent bb4e91e commit 371a839
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/valid/type_intrinsic.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ let t4 = @type(inflight (num): bool);
expect.equal(t4.kind, "function");
expect.equal(t4.toString(), "inflight (num): bool");

let t4_fn = t4.asFunction()!;
expect.equal(t4_fn.params.length, 1);
expect.equal(t4_fn.params[0].kind, "num");
expect.equal(t4_fn.returns.kind, "bool");
expect.equal(t4_fn.phase, std.Phase.INFLIGHT);
expect.equal(t4_fn.toString(), "inflight (num): bool");
if let fn = t4.asFunction() {
expect.equal(fn.params.length, 1);
expect.equal(fn.params[0].kind, "num");
expect.equal(fn.returns.kind, "bool");
expect.equal(fn.phase, std.Phase.INFLIGHT);
expect.equal(fn.toString(), "inflight (num): bool");
} else {
expect.fail("t4 is not a function");
}

// TODO: why doesn't this work?

Expand Down

0 comments on commit 371a839

Please sign in to comment.