mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 15:27:45 +03:00
Add ignored empty record decoding test
This commit is contained in:
parent
21c3d0cafa
commit
bed9b57b58
@ -990,3 +990,23 @@ fn decode_record_two_fields_string_and_int() {
|
||||
RocStr
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore = "json parsing impl must be fixed first"]
|
||||
fn decode_empty_record() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" imports [Encode, Decode, Json] provides [main] to "./platform"
|
||||
|
||||
main =
|
||||
when Str.toUtf8 "{}" |> Decode.fromBytes Json.fromUtf8 is
|
||||
Ok {} -> "empty"
|
||||
_ -> "something went wrong"
|
||||
"#
|
||||
),
|
||||
RocStr::from("empty"),
|
||||
RocStr
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user