fix bug with record field ordering in repl eval

This commit is contained in:
Folkert 2023-01-14 15:09:12 +01:00
parent dca1c665ae
commit 148ec3752d
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
4 changed files with 92 additions and 17 deletions

View file

@ -977,7 +977,7 @@ mod test {
}
#[test]
fn foobar() {
fn adjacent_lists() {
run_expect_test(
indoc!(
r#"
@ -1039,4 +1039,41 @@ mod test {
),
);
}
#[test]
fn record_field_ordering() {
run_expect_test(
indoc!(
r#"
interface Test exposes [] imports []
Request : {
fieldA : [Get, Post],
fieldB : Str,
}
expect
actual : Request
actual = {
fieldA: Get,
fieldB: "/things?id=2",
}
expected : Request
expected = {
fieldA: Get,
fieldB: "/things?id=1",
}
actual == expected
"#
),
indoc!(
r#"
This expectation failed:
"#
),
);
}
}