chore: more acceptance tests
Co-authored-by: rvcas <x@rvcas.dev>
This commit is contained in:
parent
c126f6acda
commit
6053e76f6f
|
@ -4,6 +4,20 @@ pub type Thing {
|
||||||
wow: Int,
|
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() {
|
test assert_1() {
|
||||||
assert thing: Thing = builtin.constr_data(0, [builtin.i_data(1)])
|
assert thing: Thing = builtin.constr_data(0, [builtin.i_data(1)])
|
||||||
|
|
||||||
|
@ -23,6 +37,16 @@ test assert_2() {
|
||||||
|
|
||||||
still_thing.wow == 1
|
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
|
// should not typecheck
|
||||||
// test unlift_data_without_assert_1() {
|
// test unlift_data_without_assert_1() {
|
||||||
// let thing: Thing = builtin.constr_data(0, [builtin.i_data(1)])
|
// let thing: Thing = builtin.constr_data(0, [builtin.i_data(1)])
|
||||||
|
|
Loading…
Reference in New Issue