Record Builder colon arrow syntax

This commit is contained in:
Agustin Zubiaga 2023-05-16 22:44:55 -03:00
parent d6dfdabd16
commit 731cd4257d
No known key found for this signature in database
4 changed files with 64 additions and 35 deletions

View file

@ -1930,19 +1930,19 @@ mod test_fmt {
fn record_builder() {
expr_formats_same(indoc!(
r#"
{ a: 1, b <- get "b" |> batch, c <- get "c" |> batch, d }
{ a: 1, b: <- get "b" |> batch, c: <- get "c" |> batch, d }
"#
));
expr_formats_to(
indoc!(
r#"
{ a: 1, b <- get "b" |> batch, c <- get "c" |> batch }
{ a: 1, b: <- get "b" |> batch, c: <- get "c" |> batch }
"#
),
indoc!(
r#"
{ a: 1, b <- get "b" |> batch, c <- get "c" |> batch }
{ a: 1, b: <- get "b" |> batch, c: <- get "c" |> batch }
"#
),
);
@ -1951,8 +1951,8 @@ mod test_fmt {
r#"
{
a: 1,
b <- get "b" |> batch,
c <- get "c" |> batch,
b: <- get "b" |> batch,
c: <- get "c" |> batch,
d,
}
"#
@ -1961,16 +1961,16 @@ mod test_fmt {
expr_formats_to(
indoc!(
r#"
{ a: 1, b <- get "b" |> batch,
c <- get "c" |> batch, d }
{ a: 1, b: <- get "b" |> batch,
c: <- get "c" |> batch, d }
"#
),
indoc!(
r#"
{
a: 1,
b <- get "b" |> batch,
c <- get "c" |> batch,
b: <- get "b" |> batch,
c: <- get "c" |> batch,
d,
}
"#
@ -2004,15 +2004,15 @@ mod test_fmt {
expr_formats_to(
indoc!(
r#"
succeed { a <- get "a" }
{ b <- get "b" }
succeed { a: <- get "a" }
{ b: <- get "b" }
"#
),
indoc!(
r#"
succeed
{ a <- get "a" }
{ b <- get "b" }
{ a: <- get "a" }
{ b: <- get "b" }
"#
),
);