mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
fix bug with record field ordering in repl eval
This commit is contained in:
parent
dca1c665ae
commit
148ec3752d
4 changed files with 92 additions and 17 deletions
|
@ -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:
|
||||
|
||||
"#
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue