feat(expect): update formatter
* Token::Expect should format to expect * since we still capture assert this means we can help users update to the new syntax
This commit is contained in:
@@ -28,6 +28,6 @@ test update_owner1() {
|
||||
builtin.list_data([]),
|
||||
],
|
||||
)
|
||||
assert Ford { owner, wheels, truck_bed_limit, .. }: Car = initial_car
|
||||
expect Ford { owner, wheels, truck_bed_limit, .. }: Car = initial_car
|
||||
owner == #"" && wheels == 4 && truck_bed_limit == 10000
|
||||
}
|
||||
|
||||
@@ -13,19 +13,19 @@ test let_1() {
|
||||
test let_2() {
|
||||
let x: Data = 1
|
||||
|
||||
assert y: Int = x
|
||||
expect y: Int = x
|
||||
|
||||
y == 1
|
||||
}
|
||||
|
||||
test assert_1() {
|
||||
assert thing: Thing = builtin.constr_data(0, [builtin.i_data(1)])
|
||||
expect thing: Thing = builtin.constr_data(0, [builtin.i_data(1)])
|
||||
|
||||
thing.wow == 1
|
||||
}
|
||||
|
||||
fn cast_to_thing(x: Data) -> Thing {
|
||||
assert x: Thing = x
|
||||
expect x: Thing = x
|
||||
|
||||
x
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user