Improve quality of decision tree newtype unwrap gen test

This commit is contained in:
Ayaz Hafiz 2022-07-21 14:58:42 -04:00
parent 1acb7e0748
commit 929a00e73d
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -1812,12 +1812,16 @@ fn issue_3560_nested_tag_constructor_is_newtype() {
assert_evals_to!(
indoc!(
r#"
when Wrapper (Payload "err") is
Wrapper (Payload str) -> str
Wrapper (AlternatePayload str) -> str
f : _ -> u8
f = \t ->
when t is
Wrapper (Payload it) -> it
Wrapper (AlternatePayload it) -> it
{a: f (Wrapper (Payload 15u8)), b: f(Wrapper (AlternatePayload 31u8))}
"#
),
RocStr::from("err"),
RocStr
(15, 31),
(u8, u8)
)
}