grass/tests/ordering.rs

66 lines
1.3 KiB
Rust
Raw Normal View History

2020-03-30 10:42:13 -04:00
#![cfg(test)]
#[macro_use]
mod macros;
test!(
2020-04-06 15:27:00 -04:00
two_greater_than_or_equal_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 2 >= 1;\n}\n",
"a {\n color: true;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
one_greater_than_or_equal_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 1 >= 1;\n}\n",
"a {\n color: true;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
zero_greater_than_or_equal_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 0 >= 1;\n}\n",
"a {\n color: false;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
two_greater_than_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 2 > 1;\n}\n",
"a {\n color: true;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
one_greater_than_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 1 > 1;\n}\n",
"a {\n color: false;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
zero_greater_than_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 0 > 1;\n}\n",
"a {\n color: false;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
two_less_than_or_equal_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 2 <= 1;\n}\n",
"a {\n color: false;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
one_less_than_or_equal_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 1 <= 1;\n}\n",
"a {\n color: true;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
zero_less_than_or_equal_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 0 <= 1;\n}\n",
"a {\n color: true;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
two_less_than_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 2 < 1;\n}\n",
"a {\n color: false;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
one_less_than_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 1 < 1;\n}\n",
"a {\n color: false;\n}\n"
);
test!(
2020-04-06 15:27:00 -04:00
zero_less_than_one,
2020-03-30 10:42:13 -04:00
"a {\n color: 0 < 1;\n}\n",
"a {\n color: true;\n}\n"
);