Remove single-argument function call special-case in formatter

Not sure what this special case was trying to achieve, but it's not right. There's no need to handle function call with a single argument differently than the others.
This commit is contained in:
KtorZ
2023-02-15 17:20:58 +01:00
parent 47e77aa819
commit 7251b2d01e
7 changed files with 91 additions and 66 deletions

View File

@@ -32,34 +32,34 @@ test expect_ford1() {
owner == #"" && wheels == 4 && truck_bed_limit == 10000
}
test expect_ford2() {
let initial_car = Ford {remote_connect: #"", owner: #[34,34,34,34,34], wheels: 6, truck_bed_limit: 15000, car_doors: []}
let initial_car =
Ford {
remote_connect: #"",
owner: #"2222222222",
wheels: 6,
truck_bed_limit: 15000,
car_doors: [],
}
expect Ford { owner, wheels, remote_connect, .. } = initial_car
owner == #[34,34,34,34,34] && wheels == 6 && remote_connect == #""
owner == #"2222222222" && wheels == 6 && remote_connect == #""
}
test expect_list1() {
let initial_car = [5,6,7]
expect [a,b,c] = initial_car
a == 5 && b == 6 && c == 7
let initial_car = [5, 6, 7]
expect [a, b, c] = initial_car
a == 5 && b == 6 && c == 7
}
test expect_list2() {
let initial_car = [5,6,7]
let initial_car = [5, 6, 7]
expect [a, ..d] = initial_car
a == 5 && d == [6, 7]
}
test expect_list3() {
let initial_car = builtin.list_data([builtin.i_data(5), builtin.i_data(6), builtin.i_data(7)])
let initial_car =
builtin.list_data([builtin.i_data(5), builtin.i_data(6), builtin.i_data(7)])
expect [a, ..d]: List<Int> = initial_car
a == 5 && d == [6, 7]
}