Add tests for precision rounding
This commit is contained in:
parent
42787ec700
commit
1c4be96f73
@ -84,11 +84,6 @@ test!(
|
||||
"a {\n color: unit(1)\n}\n",
|
||||
"a {\n color: \"\";\n}\n"
|
||||
);
|
||||
test!(
|
||||
unit_non_numeric,
|
||||
"a {\n color: unit(red)\n}\n",
|
||||
"a {\n color: \"\";\n}\n"
|
||||
);
|
||||
test!(
|
||||
unit_named_args,
|
||||
"a {\n color: unit($number: 1px)\n}\n",
|
||||
|
@ -46,3 +46,15 @@ test!(
|
||||
"a {\n color: red; ;\n}\n",
|
||||
"a {\n color: red;\n}\n"
|
||||
);
|
||||
// these two precisiont tests only act like this in dart sass
|
||||
// these values are `1` for libsass
|
||||
test!(
|
||||
precision_does_not_round_up,
|
||||
"a {\n color: 0.99999999991;\n}\n",
|
||||
"a {\n color: 0.9999999999;\n}\n"
|
||||
);
|
||||
test!(
|
||||
precision_does_round_up,
|
||||
"a {\n color: 1.00000000009;\n}\n",
|
||||
"a {\n color: 1.0000000001;\n}\n"
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user