From 6053e76f6f4a278c558b370ffdcc0cb44c22c986 Mon Sep 17 00:00:00 2001 From: Kasey White Date: Sat, 4 Feb 2023 02:23:44 -0500 Subject: [PATCH] chore: more acceptance tests Co-authored-by: rvcas --- examples/acceptance_tests/050/lib/tests.ak | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/examples/acceptance_tests/050/lib/tests.ak b/examples/acceptance_tests/050/lib/tests.ak index 12a4ab79..4416c0bc 100644 --- a/examples/acceptance_tests/050/lib/tests.ak +++ b/examples/acceptance_tests/050/lib/tests.ak @@ -4,6 +4,20 @@ pub type Thing { wow: Int, } +test let_1() { + let x: Data = 1 + + x == builtin.i_data(1) +} + +test let_2() { + let x: Data = 1 + + assert y: Int = x + + y == 1 +} + test assert_1() { assert thing: Thing = builtin.constr_data(0, [builtin.i_data(1)]) @@ -23,6 +37,16 @@ test assert_2() { still_thing.wow == 1 } + +test tuple_1() { + let thing = (#"aa", #"bb", #"cc") + thing.1st == #"aa" +} + +test pair_1() { + let thing = (#"aa", #"bb") + thing.1st == #"aa" +} // should not typecheck // test unlift_data_without_assert_1() { // let thing: Thing = builtin.constr_data(0, [builtin.i_data(1)])