[fine] A few more tests
This commit is contained in:
parent
cc6f77daf4
commit
dd6b673615
1 changed files with 12 additions and 0 deletions
|
|
@ -599,6 +599,18 @@ mod tests {
|
||||||
"cannot apply unary operator '-' to expression of type 'string'"
|
"cannot apply unary operator '-' to expression of type 'string'"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
test_type_error_expr!(
|
||||||
|
add_string_number,
|
||||||
|
"'what?' + 5",
|
||||||
|
"cannot apply binary operator '+' to expressions of type 'string' (on the left) and 'f64' (on the right)"
|
||||||
|
);
|
||||||
|
|
||||||
|
test_type_error_expr!(
|
||||||
|
add_number_string,
|
||||||
|
"5 + 'what?'",
|
||||||
|
"cannot apply binary operator '+' to expressions of type 'f64' (on the left) and 'string' (on the right)"
|
||||||
|
);
|
||||||
|
|
||||||
test_type_error_expr!(
|
test_type_error_expr!(
|
||||||
errors_propagate_do_not_duplicate,
|
errors_propagate_do_not_duplicate,
|
||||||
"!'hello' / 27 * -('what?') + 23",
|
"!'hello' / 27 * -('what?') + 23",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue