add test for tag with no args and boolean

This commit is contained in:
Sébastien Besnier 2020-09-05 09:17:42 +02:00
parent d701bf5f6e
commit 72497a1916

View file

@ -969,7 +969,7 @@ mod test_reporting {
4 f Blue 4 f Blue
^^^^ ^^^^
This `Blue` global tag application has the type: This `Blue` global tag has the type:
[ Blue ]a [ Blue ]a
@ -2086,6 +2086,35 @@ mod test_reporting {
) )
} }
#[test]
fn boolean_tag() {
report_problem_as(
indoc!(
r#"
42 + True
"#
),
indoc!(
r#"
TYPE MISMATCH
The 2nd argument to `add` is not what I expect:
1 42 + True
^^^^
This `True` boolean has the type:
[ True ]a
But `add` needs the 2nd argument to be:
Num a
"#
),
)
}
#[test] #[test]
fn tag_missing() { fn tag_missing() {
report_problem_as( report_problem_as(