grass/tests/multiplication.rs
ConnorSkees 2a79fa2a40 implement some of the more esoteric binary ops
addition, subtraction, and multiplication of functions and maps, along
with correct error messages and tests
2020-05-22 23:30:48 -04:00

24 lines
539 B
Rust

#![cfg(test)]
#[macro_use]
mod macros;
error!(
map_lhs_mul,
"a {color: (a: b) * 1;}", "Error: Undefined operation \"(a: b) * 1\"."
);
error!(
map_rhs_mul,
"a {color: 1 * (a: b);}", "Error: Undefined operation \"1 * (a: b)\"."
);
error!(
function_lhs_mul,
"a {color: get-function(lighten) * 1;}",
"Error: Undefined operation \"get-function(\"lighten\") * 1\"."
);
error!(
function_rhs_mul,
"a {color: 1 * get-function(lighten);}",
"Error: Undefined operation \"1 * get-function(\"lighten\")\"."
);