Re-format and re-run all acceptance tests.

This commit is contained in:
KtorZ
2024-01-20 10:43:17 +01:00
parent 9ee2d58ba3
commit b50e4ab63a
77 changed files with 449 additions and 830 deletions

View File

@@ -1,48 +1,34 @@
test foo_1() {
let a =
False
let a = False
when a is {
a if a ->
False
_ ->
True
a if a -> False
_ -> True
}
}
test foo_2() {
let point =
(14, 42)
let point = (14, 42)
when point is {
(x, _) if x > 100 ->
False
(x, _) if x > 10 ->
True
_ ->
False
(x, _) if x > 100 -> False
(x, _) if x > 10 -> True
_ -> False
}
}
test foo_3() {
let point =
(14, 42)
let point = (14, 42)
when point is {
(x, y) if x == 14 && y <= 100 ->
True
_ ->
False
(x, y) if x == 14 && y <= 100 -> True
_ -> False
}
}
test foo_4() {
let a =
False
let point =
(14, 42)
let a = False
let point = (14, 42)
when point is {
(x, y) if !a ->
x + y == 56
_ ->
False
(x, y) if !a -> x + y == 56
_ -> False
}
}
@@ -55,12 +41,9 @@ type Seasons {
fn is_cold(season, hour) {
when season is {
Winter | Fall ->
True
_ if hour >= 18 ->
True
_ ->
False
Winter | Fall -> True
_ if hour >= 18 -> True
_ -> False
}
}
@@ -70,8 +53,7 @@ test foo_5() {
fn when_tuple(a: (Int, Int)) -> Int {
when a is {
(a, _b) ->
a
(a, _b) -> a
}
}