diff --git a/rsass/src/css/valueformat.rs b/rsass/src/css/valueformat.rs index eb3f1ee7..cf2051f6 100644 --- a/rsass/src/css/valueformat.rs +++ b/rsass/src/css/valueformat.rs @@ -19,11 +19,11 @@ impl<'a> Display for Formatted<'a, Value> { write!(out, "get-function(\"{name}\")") } Value::Numeric(ref num, _) => num.format(self.format).fmt(out), - Value::Color(ref rgba, ref name) => { + Value::Color(ref col, ref name) => { if let Some(ref name) = *name { name.fmt(out) } else { - rgba.format(self.format).fmt(out) + col.format(self.format).fmt(out) } } Value::List(ref v, sep, brackets) => { diff --git a/rsass/src/sass/functions/color/hsl.rs b/rsass/src/sass/functions/color/hsl.rs index 14676e1b..e0dd745d 100644 --- a/rsass/src/sass/functions/color/hsl.rs +++ b/rsass/src/sass/functions/color/hsl.rs @@ -30,9 +30,12 @@ pub fn register(f: &mut Scope) { }); def!(f, grayscale(color), |args| match args.get(name!(color))? { Value::Color(col, _) => { + let is_rgb = col.is_rgb(); let col = col.to_hsla(); - Ok(Hsla::new(col.hue(), zero(), col.lum(), col.alpha(), false) - .into()) + Ok( + Hsla::new(col.hue(), zero(), col.lum(), col.alpha(), !is_rgb) + .into(), + ) } v @ Value::Numeric(..) => Ok(Value::call("grayscale", [v])), v => Err(is_not(&v, "a color")).named(name!(color)), diff --git a/rsass/src/sass/functions/color/hwb.rs b/rsass/src/sass/functions/color/hwb.rs index 89734688..a13955a2 100644 --- a/rsass/src/sass/functions/color/hwb.rs +++ b/rsass/src/sass/functions/color/hwb.rs @@ -1,32 +1,41 @@ +use super::super::FunctionMap; use super::hsl::percentage; use super::{ - check_alpha, check_expl_pct, eval_inner, is_not, CallError, CheckedArg, - ResolvedArgs, + check_alpha, check_expl_pct, eval_inner, is_not, relative_color, + CallError, CheckedArg, ResolvedArgs, }; use crate::css::{CallArgs, Value}; use crate::output::Format; use crate::sass::FormalArgs; -use crate::value::{Color, Hwba, ListSeparator, Numeric, Rational, Unit}; +use crate::value::{ + Color, Hwba, ListSeparator, Numeric, Rational, Rgba, Unit, +}; use crate::Scope; +use num_traits::{one, zero}; pub fn register(f: &mut Scope) { def_va!(f, hwb(kwargs), hwb); def!(f, blackness(color), |s| { - // Blackness of the rgb approximation that can be represented in css. - let (r, g, b, _a) = Color::to_rgba(&s.get(name!(color))?).to_bytes(); - let max_c = *[r, g, b].iter().max().unwrap(); - Ok(percentage(Rational::new((255 - max_c).into(), 255))) + let color: Color = s.get(name!(color))?; + let hwb = color.to_hwba(); + Ok(percentage(hwb.blackness())) }); def!(f, whiteness(color), |s| { - // Whiteness of the rgb approximation that can be represented in css. - let (r, g, b, _a) = Color::to_rgba(&s.get(name!(color))?).to_bytes(); - let min_c = *[r, g, b].iter().min().unwrap(); - Ok(percentage(Rational::new(min_c.into(), 255))) + let color: Color = s.get(name!(color))?; + let hwb = color.to_hwba(); + Ok(percentage(hwb.whiteness())) }); } +pub fn expose(m: &Scope, global: &mut FunctionMap) { + global.insert(name!(hwb), m.get_lfunction(&name!(hwb))); +} + fn hwb(s: &ResolvedArgs) -> Result { let args = s.get_map(name!(kwargs), CallArgs::from_value)?; + if relative_color(&args) { + return Ok(Value::Call("hwb".to_string(), args)); + } let (hue, w, b, a) = if args.len() < 3 { let a1 = FormalArgs::new(vec![one_arg!(channels)]); eval_inner(&name!(hwb), &a1, s, args) @@ -51,7 +60,15 @@ fn hwb(s: &ResolvedArgs) -> Result { let w = check_expl_pct(w).named(name!(whiteness))?; let b = check_expl_pct(b).named(name!(blackness))?; let a = check_alpha(a).named(name!(alpha))?; - Ok(Hwba::new(hue, w, b, a).into()) + // I don't really agree with this, but it makes tests pass. + let hue = if w + b >= one() { zero() } else { hue }; + let hwba = Hwba::new(hue, w, b, a); + let rgba = Rgba::from(&hwba); + if rgba.is_integer() { + Ok(rgba.into()) + } else { + Ok(hwba.into()) + } } fn hwb_from_channels( diff --git a/rsass/src/sass/functions/color/mod.rs b/rsass/src/sass/functions/color/mod.rs index 28854e99..4a2c3b95 100644 --- a/rsass/src/sass/functions/color/mod.rs +++ b/rsass/src/sass/functions/color/mod.rs @@ -55,6 +55,7 @@ pub fn create_module() -> Scope { pub fn expose(m: &Scope, global: &mut FunctionMap) { rgb::expose(m, global); hsl::expose(m, global); + hwb::expose(m, global); other::expose(m, global); } diff --git a/rsass/src/sass/functions/color/other.rs b/rsass/src/sass/functions/color/other.rs index f08d2b8d..d4a7064b 100644 --- a/rsass/src/sass/functions/color/other.rs +++ b/rsass/src/sass/functions/color/other.rs @@ -17,7 +17,7 @@ pub fn register(f: &mut Scope) { a } } - let rgba: Color = s.get(name!(color))?; + let color: Color = s.get(name!(color))?; let mut args = s.get_map(name!(kwargs), CallArgs::from_value)?; no_more_positional(&args)?; let a_adj = take_opt(&mut args, name!(alpha), check_alpha_pm)?; @@ -27,7 +27,7 @@ pub fn register(f: &mut Scope) { let blu = take_opt(&mut args, name!(blue), check_channel_pm)?; if red.is_some() || gre.is_some() || blu.is_some() { no_more_in_space(&args, "rgb")?; - let rgba = rgba.to_rgba(); + let rgba = color.to_rgba(); Ok(Rgba::new( opt_add(rgba.red(), red), opt_add(rgba.green(), gre), @@ -47,18 +47,18 @@ pub fn register(f: &mut Scope) { take_opt(&mut args, name!(blackness), check_pct_expl_pm)?; let whi = take_opt(&mut args, name!(whiteness), check_pct_expl_pm)?; - args.check_no_named().map_err(CallError::msg)?; + no_more_in_space(&args, "rgb")?; if bla.is_some() || whi.is_some() { - let hwba = rgba.to_hwba(); - Ok(Hwba::new( + let hwba = color.to_hwba(); + let hwba = Hwba::new( opt_add(hwba.hue(), hue), opt_add(hwba.whiteness(), whi), opt_add(hwba.blackness(), bla), opt_add(hwba.alpha(), a_adj), - ) - .into()) + ); + Ok(Rgba::from(&hwba).into()) } else if hue.is_some() || sat.is_some() || lig.is_some() { - let hsla = rgba.to_hsla(); + let hsla = color.to_hsla(); let sat = opt_add(hsla.sat(), sat); let lum = opt_add(hsla.lum(), lig); Ok(Hsla::new( @@ -73,9 +73,9 @@ pub fn register(f: &mut Scope) { ) .into()) } else { - let mut rgba = rgba.clone(); - rgba.set_alpha(opt_add(rgba.get_alpha(), a_adj)); - Ok(rgba.into()) + let mut color = color.clone(); + color.set_alpha(opt_add(color.get_alpha(), a_adj)); + Ok(color.into()) } } }); @@ -94,33 +94,39 @@ pub fn register(f: &mut Scope) { let one: Rational = one(); let ff = Rational::from_integer(255); - let rgba: Color = s.get(name!(color))?; + let color: Color = s.get(name!(color))?; let mut args = s.get_map(name!(kwargs), CallArgs::from_value)?; no_more_positional(&args)?; + let a_adj = take_opt(&mut args, name!(alpha), check_pct_expl_pm)?; + + take_opt(&mut args, name!(hue), check_none_scalable)?; + let red = take_opt(&mut args, name!(red), check_pct_expl_pm)?; let gre = take_opt(&mut args, name!(green), check_pct_expl_pm)?; let blu = take_opt(&mut args, name!(blue), check_pct_expl_pm)?; - let sat = take_opt(&mut args, name!(saturation), check_pct_expl_pm)?; - let lig = take_opt(&mut args, name!(lightness), check_pct_expl_pm)?; - let bla = take_opt(&mut args, name!(blackness), check_pct_expl_pm)?; - let whi = take_opt(&mut args, name!(whiteness), check_pct_expl_pm)?; - let a_adj = take_opt(&mut args, name!(alpha), check_pct_expl_pm)?; - args.check_no_named().map_err(CallError::msg)?; - if red.is_some() || gre.is_some() || blu.is_some() { - check_none(&[bla, whi], "RGB", "HWB")?; - check_none(&[sat, lig], "RGB", "HSL")?; - let rgba = rgba.to_rgba(); - Ok(Rgba::new( + no_more_in_space(&args, "rgb")?; + let rgba = color.to_rgba(); + let rgba = Rgba::new( cmb(rgba.red(), red, ff), cmb(rgba.green(), gre, ff), cmb(rgba.blue(), blu, ff), cmb(rgba.alpha(), a_adj, one), RgbFormat::Name, - ) - .into()) - } else if bla.is_none() && whi.is_none() { - let hsla = rgba.to_hsla(); + ); + return Ok(rgba.into()); + } + let sat = take_opt(&mut args, name!(saturation), check_pct_expl_pm)?; + let lig = take_opt(&mut args, name!(lightness), check_pct_expl_pm)?; + if sat.is_some() || lig.is_some() { + no_more_in_space(&args, "hsl")?; + } + let bla = take_opt(&mut args, name!(blackness), check_pct_expl_pm)?; + let whi = take_opt(&mut args, name!(whiteness), check_pct_expl_pm)?; + no_more_in_space(&args, "rgb")?; + + if bla.is_none() && whi.is_none() { + let hsla = color.to_hsla(); Ok(Hsla::new( hsla.hue(), cmb(hsla.sat(), sat, one), @@ -130,15 +136,19 @@ pub fn register(f: &mut Scope) { ) .into()) } else { - check_none(&[sat, lig], "HSL", "HWB")?; - let hwba = rgba.to_hwba(); - Ok(Hwba::new( + let is_rgb = color.is_rgb(); + let hwba = color.to_hwba(); + let hwba = Hwba::new( hwba.hue(), cmb(hwba.whiteness(), whi, one), cmb(hwba.blackness(), bla, one), cmb(hwba.alpha(), a_adj, one), - ) - .into()) + ); + if is_rgb { + Ok(Rgba::from(&hwba).into()) + } else { + Ok(hwba.into()) + } } }); @@ -160,31 +170,35 @@ pub fn register(f: &mut Scope) { let rgba: Color = s.get(name!(color))?; let mut args = s.get_map(name!(kwargs), CallArgs::from_value)?; no_more_positional(&args)?; + let alp = take_opt(&mut args, name!(alpha), check_alpha_range)?; + let red = take_opt(&mut args, name!(red), check_channel_range)?; let gre = take_opt(&mut args, name!(green), check_channel_range)?; let blu = take_opt(&mut args, name!(blue), check_channel_range)?; - let hue = take_opt(&mut args, name!(hue), check_hue)?; - let sat = - take_opt(&mut args, name!(saturation), check_pct_opt_range)?; - let lig = take_opt(&mut args, name!(lightness), check_pct_opt_range)?; - let bla = take_opt(&mut args, name!(blackness), check_expl_pct)?; - let whi = take_opt(&mut args, name!(whiteness), check_expl_pct)?; - let alp = take_opt(&mut args, name!(alpha), check_alpha_range)?; - args.check_no_named().map_err(CallError::msg)?; - if red.is_some() || gre.is_some() || blu.is_some() { - check_none(&[hue, sat, lig], "RGB", "HSL")?; - check_none(&[bla, whi], "RGB", "HWB")?; + no_more_in_space(&args, "rgb")?; let rgba = rgba.to_rgba(); - Ok(Rgba::new( + let rgba = Rgba::new( red.unwrap_or_else(|| rgba.red()), gre.unwrap_or_else(|| rgba.green()), blu.unwrap_or_else(|| rgba.blue()), alp.unwrap_or_else(|| rgba.alpha()), rgba.source(), - ) - .into()) - } else if bla.is_none() && whi.is_none() { + ); + return Ok(rgba.into()); + } + let hue = take_opt(&mut args, name!(hue), check_hue)?; + let sat = + take_opt(&mut args, name!(saturation), check_pct_opt_range)?; + let lig = take_opt(&mut args, name!(lightness), check_pct_opt_range)?; + if sat.is_some() || lig.is_some() { + no_more_in_space(&args, "hsl")?; + } + let bla = take_opt(&mut args, name!(blackness), check_expl_pct)?; + let whi = take_opt(&mut args, name!(whiteness), check_expl_pct)?; + no_more_in_space(&args, "rgb")?; + + if bla.is_none() && whi.is_none() { let hsla = rgba.to_hsla(); Ok(Hsla::new( hue.unwrap_or_else(|| hsla.hue()), @@ -195,15 +209,14 @@ pub fn register(f: &mut Scope) { ) .into()) } else { - check_none(&[sat, lig], "HSL", "HWB")?; let hwba = rgba.to_hwba(); - Ok(Hwba::new( + let hwba = Hwba::new( hue.unwrap_or_else(|| hwba.hue()), whi.unwrap_or_else(|| hwba.whiteness()), bla.unwrap_or_else(|| hwba.blackness()), alp.unwrap_or_else(|| hwba.alpha()), - ) - .into()) + ); + Ok(Rgba::from(&hwba).into()) } }); def!(f, ie_hex_str(color), |s| { @@ -247,18 +260,8 @@ pub fn expose(m: &Scope, global: &mut FunctionMap) { } } -fn check_none( - args: &[Option], - kind: &str, - with_kind: &str, -) -> Result<(), CallError> { - if args.iter().all(Option::is_none) { - Ok(()) - } else { - Err(CallError::msg(format!( - "{kind} parameters may not be passed along with {with_kind} parameters." - ))) - } +fn check_none_scalable(_: Value) -> Result<(), String> { + Err("Channel isn't scalable.".into()) } fn no_more_positional(args: &CallArgs) -> Result<(), CallError> { diff --git a/rsass/src/sass/functions/color/rgb.rs b/rsass/src/sass/functions/color/rgb.rs index 58700850..b539f150 100644 --- a/rsass/src/sass/functions/color/rgb.rs +++ b/rsass/src/sass/functions/color/rgb.rs @@ -59,7 +59,7 @@ pub fn register(f: &mut Scope) { match s.get(name!(color))? { Value::Color(col, _) => { let w = s.get_map(name!(weight), check_pct_range)?; - Ok(do_invert(col, w)) + Ok(col.invert(w).into()) } col => { let w = s.get_map(name!(weight), check_pct_range)?; @@ -94,7 +94,7 @@ pub fn expose(m: &Scope, global: &mut FunctionMap) { match s.get(name!(color))? { Value::Color(col, _) => { let w = s.get_map(name!(weight), check_pct_range)?; - Ok(do_invert(col, w)) + Ok(col.invert(w).into()) } col => { let w = s.get_map(name!(weight), check_pct_range)?; @@ -116,19 +116,6 @@ pub fn expose(m: &Scope, global: &mut FunctionMap) { } } -fn do_invert(col: Color, w: Rational) -> Value { - let rgba = col.to_rgba(); - let inv = |v: Rational| -(v - 255) * w + v * -(w - 1); - Rgba::new( - inv(rgba.red()), - inv(rgba.green()), - inv(rgba.blue()), - rgba.alpha(), - rgba.source(), - ) - .into() -} - fn do_rgba(fn_name: &Name, s: &ResolvedArgs) -> Result { let a1 = FormalArgs::new(vec![one_arg!(channels)]); let a1b = FormalArgs::new(vec![one_arg!(color), one_arg!(alpha)]); diff --git a/rsass/src/value/colors/hsla.rs b/rsass/src/value/colors/hsla.rs index f9f5effc..70a9e762 100644 --- a/rsass/src/value/colors/hsla.rs +++ b/rsass/src/value/colors/hsla.rs @@ -1,6 +1,6 @@ use crate::output::{Format, Formatted}; use crate::value::{Number, Rational}; -use num_traits::{one, zero, Signed}; +use num_traits::{one, zero, One as _, Signed}; use std::fmt::{self, Display}; /// A color defined by hue, saturation, luminance, and alpha. @@ -55,6 +55,18 @@ impl Hsla { pub fn set_alpha(&mut self, alpha: Rational) { self.alpha = alpha.clamp(zero(), one()); } + + pub(crate) fn invert(&self, weight: Rational) -> Self { + let one = Rational::one(); + Self { + hue: deg_mod(self.hue + 180), + sat: self.sat, + lum: (one - self.lum) * weight + self.lum * (one - weight), + alpha: self.alpha, + hsla_format: self.hsla_format, + } + } + pub(crate) fn reset_source(&mut self) { self.hsla_format = false; } diff --git a/rsass/src/value/colors/mod.rs b/rsass/src/value/colors/mod.rs index f3e9a963..d46f8f48 100644 --- a/rsass/src/value/colors/mod.rs +++ b/rsass/src/value/colors/mod.rs @@ -25,6 +25,10 @@ pub enum Color { } impl Color { + pub(crate) fn is_rgb(&self) -> bool { + matches!(self, Self::Rgba(_)) + } + /// Get this color as a rgba value. /// /// If this color is a rgba value, return a borrow of it. @@ -111,6 +115,13 @@ impl Color { .into(), } } + pub(crate) fn invert(&self, weight: Rational) -> Self { + match self { + Color::Rgba(rgba) => rgba.invert(weight).into(), + Color::Hsla(hsla) => hsla.invert(weight).into(), + Color::Hwba(_hwba) => todo!(), + } + } pub(crate) fn reset_source(&mut self) { match self { Self::Rgba(rgba) => rgba.reset_source(), @@ -150,6 +161,9 @@ impl<'a> Display for Formatted<'a, Color> { Color::Hsla(hsla) if hsla.hsla_format => { hsla.format(self.format).fmt(out) } + Color::Hwba(hwba) => { + Hsla::from(hwba).format(self.format).fmt(out) + } any => any.to_rgba().format(self.format).fmt(out), } } diff --git a/rsass/src/value/colors/rgba.rs b/rsass/src/value/colors/rgba.rs index a83e17b6..fd7bd3d0 100644 --- a/rsass/src/value/colors/rgba.rs +++ b/rsass/src/value/colors/rgba.rs @@ -76,16 +76,10 @@ impl Rgba { self.alpha >= one() } /// If this color is equal to a named color, get the name. - /// - /// Each component is rounded to its byte value before lookup. pub fn name(&self) -> Option<&'static str> { - if self.is_opaque() { - let (r, g, b, _a) = self.try_bytes().ok()?; - let c = u32::from_be_bytes([0, r, g, b]); - LOOKUP.v2n.get(&c).copied() - } else { - None - } + self.try_bytes() + .map(|(r, g, b)| u32::from_be_bytes([0, r, g, b])) + .and_then(|c| LOOKUP.v2n.get(&c).copied()) } /// If `name` is a known color name, get the corresponding rgba value. pub fn from_name(name: &str) -> Option { @@ -119,6 +113,12 @@ impl Rgba { && self.green.is_zero() && self.blue.is_zero() } + pub(crate) fn is_integer(&self) -> bool { + self.red.is_integer() + && self.green.is_integer() + && self.blue.is_integer() + && self.is_opaque() + } /// Get a (r, g, b, a) byte-value tuple for this color. pub fn to_bytes(&self) -> (u8, u8, u8, u8) { fn byte(v: Rational) -> u8 { @@ -127,8 +127,14 @@ impl Rgba { let a = self.alpha * 255; (byte(self.red), byte(self.green), byte(self.blue), byte(a)) } - /// Get a (r, g, b, a) byte-value tuple for this color. - pub fn try_bytes(&self) -> Result<(u8, u8, u8, u8), &Self> { + /// Get a (r, g, b) byte-value tuple for this color. + /// + /// If the color is not opaque or not exactly equal to a byte + /// value, return None. + pub fn try_bytes(&self) -> Option<(u8, u8, u8)> { + if !self.is_opaque() { + return None; + } fn byte(v: Rational) -> Option { if v.is_integer() { Some(v.round().to_integer() as u8) @@ -136,13 +142,12 @@ impl Rgba { None } } - let a = self.alpha * 255; - if let (Some(r), Some(g), Some(b), Some(a)) = - (byte(self.red), byte(self.green), byte(self.blue), byte(a)) + if let (Some(r), Some(g), Some(b)) = + (byte(self.red), byte(self.green), byte(self.blue)) { - Ok((r, g, b, a)) + Some((r, g, b)) } else { - Err(self) + None } } /// Get the red component. @@ -169,6 +174,18 @@ impl Rgba { pub fn set_alpha(&mut self, alpha: Rational) { self.alpha = cap(alpha, &one()); } + + pub(crate) fn invert(&self, weight: Rational) -> Self { + let inv = |v: Rational| -(v - 255) * weight + v * -(weight - 1); + Rgba::new( + inv(self.red()), + inv(self.green()), + inv(self.blue()), + self.alpha(), + self.source(), + ) + } + /// Get the source type of this color. pub(crate) fn source(&self) -> RgbFormat { self.source @@ -415,19 +432,28 @@ impl<'a> Display for Formatted<'a, Rgba> { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { // The byte-version of alpha is not used here. let rgba = self.value; - if rgba.is_opaque() { - if let Ok((r, g, b, _a)) = rgba.try_bytes() { - // E.g. #ff00cc can be written #f0c in css. - // 0xff / 0x11 = 0xf. - let short = r % 0x11 == 0 && g % 0x11 == 0 && b % 0x11 == 0; - let hex_len = if short { 4 } else { 7 }; - if self.format.is_compressed() { - if let Some(name) = rgba.name() { - if name.len() <= hex_len { - return name.fmt(out); - } + if let Some((r, g, b)) = rgba.try_bytes() { + // E.g. #ff00cc can be written #f0c in css. + // 0xff / 0x11 = 0xf. + let short = r % 0x11 == 0 && g % 0x11 == 0 && b % 0x11 == 0; + let hex_len = if short { 4 } else { 7 }; + if self.format.is_compressed() { + if let Some(name) = rgba.name() { + if name.len() <= hex_len { + return name.fmt(out); } - if short { + } + if short { + write!(out, "#{:x}{:x}{:x}", r / 0x11, g / 0x11, b / 0x11) + } else { + write!(out, "#{r:02x}{g:02x}{b:02x}") + } + } else { + match rgba.source { + RgbFormat::LongHex => { + write!(out, "#{r:02x}{g:02x}{b:02x}") + } + RgbFormat::ShortHex => { write!( out, "#{:x}{:x}{:x}", @@ -435,36 +461,17 @@ impl<'a> Display for Formatted<'a, Rgba> { g / 0x11, b / 0x11 ) - } else { - write!(out, "#{r:02x}{g:02x}{b:02x}") } - } else { - match rgba.source { - RgbFormat::LongHex => { - write!(out, "#{r:02x}{g:02x}{b:02x}") - } - RgbFormat::ShortHex => { - write!( - out, - "#{:x}{:x}{:x}", - r / 0x11, - g / 0x11, - b / 0x11 - ) - } - RgbFormat::Name => { - if let Some(name) = rgba.name() { - return name.fmt(out); - } - write!(out, "#{r:02x}{g:02x}{b:02x}") - } - RgbFormat::Rgb => { - write!(out, "rgb({r}, {g}, {b})") + RgbFormat::Name => { + if let Some(name) = rgba.name() { + return name.fmt(out); } + write!(out, "#{r:02x}{g:02x}{b:02x}") + } + RgbFormat::Rgb => { + write!(out, "rgb({r}, {g}, {b})") } } - } else { - write_rgba(rgba, out, self.format) } } else if self.format.is_compressed() && rgba.all_zero() { write!(out, "transparent") diff --git a/rsass/tests/spec/core_functions/color/adjust/error/args.rs b/rsass/tests/spec/core_functions/color/adjust/error/args.rs index 304718dc..ebe962ab 100644 --- a/rsass/tests/spec/core_functions/color/adjust/error/args.rs +++ b/rsass/tests/spec/core_functions/color/adjust/error/args.rs @@ -40,7 +40,6 @@ fn too_many() { ); } #[test] -#[ignore] // wrong error fn unknown() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/adjust/error/incompatible_channel.rs b/rsass/tests/spec/core_functions/color/adjust/error/incompatible_channel.rs index 008fcf17..fb9dde0b 100644 --- a/rsass/tests/spec/core_functions/color/adjust/error/incompatible_channel.rs +++ b/rsass/tests/spec/core_functions/color/adjust/error/incompatible_channel.rs @@ -22,7 +22,6 @@ fn legacy_channel() { ); } #[test] -#[ignore] // wrong error fn legacy_space() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/blackness.rs b/rsass/tests/spec/core_functions/color/blackness.rs index 78736ae3..eaf7f86f 100644 --- a/rsass/tests/spec/core_functions/color/blackness.rs +++ b/rsass/tests/spec/core_functions/color/blackness.rs @@ -80,7 +80,6 @@ mod error { } } #[test] -#[ignore] // unexepected error fn fraction() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -105,7 +104,6 @@ mod middle { use super::runner; #[test] - #[ignore] // unexepected error fn half_whiteness() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -116,7 +114,6 @@ mod middle { ); } #[test] - #[ignore] // unexepected error fn high_whiteness() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -127,7 +124,6 @@ mod middle { ); } #[test] - #[ignore] // unexepected error fn zero_whiteness() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -149,7 +145,6 @@ fn min() { ); } #[test] -#[ignore] // unexepected error fn named() { assert_eq!( runner().ok("@use \"sass:color\";\ diff --git a/rsass/tests/spec/core_functions/color/change/error/args.rs b/rsass/tests/spec/core_functions/color/change/error/args.rs index d84f72b5..4ca97df2 100644 --- a/rsass/tests/spec/core_functions/color/change/error/args.rs +++ b/rsass/tests/spec/core_functions/color/change/error/args.rs @@ -40,7 +40,6 @@ fn too_many() { ); } #[test] -#[ignore] // wrong error fn unknown() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/change/error/incompatible_channel.rs b/rsass/tests/spec/core_functions/color/change/error/incompatible_channel.rs index ee7bfcf3..3ba2bd36 100644 --- a/rsass/tests/spec/core_functions/color/change/error/incompatible_channel.rs +++ b/rsass/tests/spec/core_functions/color/change/error/incompatible_channel.rs @@ -22,7 +22,6 @@ fn legacy_channel() { ); } #[test] -#[ignore] // wrong error fn legacy_space() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/change/error/mixed_formats.rs b/rsass/tests/spec/core_functions/color/change/error/mixed_formats.rs index 3e505d8c..68d5ad78 100644 --- a/rsass/tests/spec/core_functions/color/change/error/mixed_formats.rs +++ b/rsass/tests/spec/core_functions/color/change/error/mixed_formats.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong error fn blue_and_lightness() { assert_eq!( runner().err( @@ -22,7 +21,6 @@ fn blue_and_lightness() { ); } #[test] -#[ignore] // wrong error fn green_and_saturation() { assert_eq!( runner().err( @@ -38,7 +36,6 @@ fn green_and_saturation() { ); } #[test] -#[ignore] // wrong error fn green_and_whiteness() { assert_eq!( runner().err( @@ -54,7 +51,6 @@ fn green_and_whiteness() { ); } #[test] -#[ignore] // wrong error fn lightness_and_whiteness() { assert_eq!( runner().err( @@ -70,7 +66,6 @@ fn lightness_and_whiteness() { ); } #[test] -#[ignore] // wrong error fn red_and_blackness() { assert_eq!( runner().err( @@ -86,7 +81,6 @@ fn red_and_blackness() { ); } #[test] -#[ignore] // wrong error fn red_and_hue() { assert_eq!( runner().err( @@ -102,7 +96,6 @@ fn red_and_hue() { ); } #[test] -#[ignore] // wrong error fn saturation_and_blackness() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/grayscale.rs b/rsass/tests/spec/core_functions/color/grayscale.rs index 347188db..c1cd7ada 100644 --- a/rsass/tests/spec/core_functions/color/grayscale.rs +++ b/rsass/tests/spec/core_functions/color/grayscale.rs @@ -212,7 +212,7 @@ mod legacy { use super::runner; #[test] - #[ignore] // unexepected error + #[ignore] // wrong result fn different() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -223,7 +223,6 @@ mod legacy { ); } #[test] - #[ignore] // wrong result fn same() { assert_eq!( runner().ok("@use \"sass:color\";\ diff --git a/rsass/tests/spec/core_functions/color/hwb/four_args.rs b/rsass/tests/spec/core_functions/color/hwb/four_args.rs index e5126dca..189594c4 100644 --- a/rsass/tests/spec/core_functions/color/hwb/four_args.rs +++ b/rsass/tests/spec/core_functions/color/hwb/four_args.rs @@ -72,7 +72,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn min() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -83,7 +82,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn negative() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -94,7 +92,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn positive() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -130,7 +127,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn min() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -141,7 +137,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn negative() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -152,7 +147,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn positive() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -306,7 +300,6 @@ mod hue { } } #[test] -#[ignore] // wrong result fn named() { assert_eq!( runner().ok( diff --git a/rsass/tests/spec/core_functions/color/hwb/global.rs b/rsass/tests/spec/core_functions/color/hwb/global.rs index f4c67f70..42921760 100644 --- a/rsass/tests/spec/core_functions/color/hwb/global.rs +++ b/rsass/tests/spec/core_functions/color/hwb/global.rs @@ -14,7 +14,6 @@ mod alpha { use super::runner; #[test] - #[ignore] // wrong result fn above() { assert_eq!( runner().ok("a {b: hwb(0 30% 40% / 1.1)}\n"), @@ -24,7 +23,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn below() { assert_eq!( runner().ok("a {b: hwb(0 30% 40% / -0.1)}\n"), @@ -39,7 +37,6 @@ mod alpha { use super::runner; #[test] - #[ignore] // wrong result fn named() { assert_eq!( runner().ok("a {b: hwb($channels: 180 30% 40% / 0.4)}\n"), @@ -49,7 +46,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn opaque() { assert_eq!( runner().ok("a {b: hwb(180 30% 40% / 1)}\n"), @@ -59,7 +55,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn parenthesized() { assert_eq!( runner().ok( @@ -72,7 +67,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn partial() { assert_eq!( runner().ok("a {b: hwb(180 30% 40% / 0.5)}\n"), @@ -82,7 +76,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn transparent() { assert_eq!( runner().ok("a {b: hwb(180 30% 40% / 0)}\n"), @@ -97,7 +90,7 @@ mod alpha { use super::runner; #[test] - #[ignore] // wrong result + #[ignore] // unexepected error fn slash() { assert_eq!( runner().ok("a {b: hwb(0 30% 40% / none)}\n"), @@ -107,7 +100,7 @@ mod alpha { ); } #[test] - #[ignore] // wrong result + #[ignore] // unexepected error fn slash_list() { assert_eq!( runner().ok("@use \'sass:list\';\ @@ -124,7 +117,7 @@ mod missing { use super::runner; #[test] - #[ignore] // wrong result + #[ignore] // unexepected error fn blackness() { assert_eq!( runner().ok("a {b: hwb(0 30% none)}\n"), @@ -134,6 +127,7 @@ mod missing { ); } #[test] + #[ignore] // unexepected error fn hue() { assert_eq!( runner().ok("a {b: hwb(none 30% 40%)}\n"), @@ -143,7 +137,7 @@ mod missing { ); } #[test] - #[ignore] // wrong result + #[ignore] // unexepected error fn whiteness() { assert_eq!( runner().ok("a {b: hwb(0 none 40%)}\n"), @@ -154,7 +148,6 @@ mod missing { } } #[test] -#[ignore] // wrong result fn named() { assert_eq!( runner().ok("a {b: hwb($channels: 180 30% 40% / 0.4)}\n"), @@ -164,7 +157,6 @@ fn named() { ); } #[test] -#[ignore] // wrong result fn no_alpha() { assert_eq!( runner().ok("a {b: hwb(180 30% 40%)}\n"), @@ -233,7 +225,7 @@ mod relative_color { use super::runner; #[test] - #[ignore] // missing error + #[ignore] // wrong error fn alpha() { assert_eq!( runner().err( @@ -248,7 +240,7 @@ mod relative_color { ); } #[test] - #[ignore] // missing error + #[ignore] // wrong error fn no_alpha() { assert_eq!( runner().err( @@ -268,7 +260,7 @@ mod relative_color { use super::runner; #[test] - #[ignore] // missing error + #[ignore] // wrong error fn alpha() { assert_eq!( runner().err( @@ -283,7 +275,7 @@ mod relative_color { ); } #[test] - #[ignore] // missing error + #[ignore] // wrong error fn no_alpha() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/hwb/one_arg.rs b/rsass/tests/spec/core_functions/color/hwb/one_arg.rs index 0acbab2a..d9174252 100644 --- a/rsass/tests/spec/core_functions/color/hwb/one_arg.rs +++ b/rsass/tests/spec/core_functions/color/hwb/one_arg.rs @@ -14,7 +14,6 @@ mod alpha { use super::runner; #[test] - #[ignore] // wrong result fn above() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -25,7 +24,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn below() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -41,7 +39,6 @@ mod alpha { use super::runner; #[test] - #[ignore] // wrong result fn named() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -52,7 +49,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn opaque() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -63,7 +59,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn parenthesized() { assert_eq!( runner().ok( @@ -77,7 +72,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn partial() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -88,7 +82,6 @@ mod alpha { ); } #[test] - #[ignore] // wrong result fn transparent() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -182,7 +175,6 @@ mod hue { } } #[test] -#[ignore] // wrong result fn named() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -193,7 +185,6 @@ fn named() { ); } #[test] -#[ignore] // wrong result fn no_alpha() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -263,7 +254,7 @@ mod relative_color { use super::runner; #[test] - #[ignore] // missing error + #[ignore] // wrong error fn alpha() { assert_eq!( runner().err( @@ -278,7 +269,7 @@ mod relative_color { ); } #[test] - #[ignore] // missing error + #[ignore] // wrong error fn no_alpha() { assert_eq!( runner().err( @@ -298,7 +289,7 @@ mod relative_color { use super::runner; #[test] - #[ignore] // missing error + #[ignore] // wrong error fn alpha() { assert_eq!( runner().err( @@ -313,7 +304,7 @@ mod relative_color { ); } #[test] - #[ignore] // missing error + #[ignore] // wrong error fn no_alpha() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/named.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/named.rs index a764bc49..3df4069f 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/named.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/named.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok( diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/units.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/units.rs index d270da5a..de1999f4 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/units.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/units.rs @@ -10,7 +10,6 @@ mod hue { use super::runner; #[test] - #[ignore] // wrong result fn deg() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -32,7 +31,6 @@ mod hue { ); } #[test] - #[ignore] // wrong result fn rad() { assert_eq!( runner().ok("@use \"sass:color\";\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/blue_magentas.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/blue_magentas.rs index 0ff19679..5d378ff1 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/blue_magentas.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/blue_magentas.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/blues.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/blues.rs index fb5c314d..2d07b52c 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/blues.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/blues.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/cyan_blues.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/cyan_blues.rs index 0435787e..de00b6c5 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/cyan_blues.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/cyan_blues.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/cyans.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/cyans.rs index 145350a4..f172060d 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/cyans.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/cyans.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/green_cyans.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/green_cyans.rs index 2500a7dc..32f04331 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/green_cyans.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/green_cyans.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/greens.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/greens.rs index a795569f..5cab4da6 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/greens.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/greens.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/magenta_reds.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/magenta_reds.rs index c6ae2ad3..b8827c20 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/magenta_reds.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/magenta_reds.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/magentas.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/magentas.rs index 0a3c4f23..09e018d7 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/magentas.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/magentas.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/oranges.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/oranges.rs index 726ce61f..5b754566 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/oranges.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/oranges.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/reds.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/reds.rs index 6ff3c193..0b02612e 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/reds.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/reds.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/yellow_greens.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/yellow_greens.rs index 2dce463c..92e2b05b 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/yellow_greens.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/yellow_greens.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/yellows.rs b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/yellows.rs index 8d2c727f..43a6cc06 100644 --- a/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/yellows.rs +++ b/rsass/tests/spec/core_functions/color/hwb/three_args/w3c/yellows.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \'../test-hue\' as *;\ diff --git a/rsass/tests/spec/core_functions/color/invert/legacy.rs b/rsass/tests/spec/core_functions/color/invert/legacy.rs index 18ed0bbc..98733fce 100644 --- a/rsass/tests/spec/core_functions/color/invert/legacy.rs +++ b/rsass/tests/spec/core_functions/color/invert/legacy.rs @@ -30,7 +30,6 @@ mod no_space { ); } #[test] - #[ignore] // wrong result fn hsl() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -41,7 +40,6 @@ mod no_space { ); } #[test] - #[ignore] // wrong result fn hwb() { assert_eq!( runner().ok("@use \"sass:color\";\ diff --git a/rsass/tests/spec/core_functions/color/scale/error/args.rs b/rsass/tests/spec/core_functions/color/scale/error/args.rs index 55f2c2b5..cf907500 100644 --- a/rsass/tests/spec/core_functions/color/scale/error/args.rs +++ b/rsass/tests/spec/core_functions/color/scale/error/args.rs @@ -40,7 +40,6 @@ fn too_many() { ); } #[test] -#[ignore] // wrong error fn unknown() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/scale/error/incompatible_channel.rs b/rsass/tests/spec/core_functions/color/scale/error/incompatible_channel.rs index b3dbd850..12b3ed5d 100644 --- a/rsass/tests/spec/core_functions/color/scale/error/incompatible_channel.rs +++ b/rsass/tests/spec/core_functions/color/scale/error/incompatible_channel.rs @@ -22,7 +22,6 @@ fn legacy_channel() { ); } #[test] -#[ignore] // wrong error fn legacy_space() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/scale/error/mixed_formats.rs b/rsass/tests/spec/core_functions/color/scale/error/mixed_formats.rs index 1aed22e3..95f0f68b 100644 --- a/rsass/tests/spec/core_functions/color/scale/error/mixed_formats.rs +++ b/rsass/tests/spec/core_functions/color/scale/error/mixed_formats.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong error fn blue_and_lightness() { assert_eq!( runner().err( @@ -22,7 +21,6 @@ fn blue_and_lightness() { ); } #[test] -#[ignore] // wrong error fn green_and_saturation() { assert_eq!( runner().err( @@ -38,7 +36,6 @@ fn green_and_saturation() { ); } #[test] -#[ignore] // wrong error fn green_and_whiteness() { assert_eq!( runner().err( @@ -54,7 +51,6 @@ fn green_and_whiteness() { ); } #[test] -#[ignore] // wrong error fn lightness_and_whiteness() { assert_eq!( runner().err( @@ -70,7 +66,6 @@ fn lightness_and_whiteness() { ); } #[test] -#[ignore] // wrong error fn red_and_blackness() { assert_eq!( runner().err( @@ -86,7 +81,6 @@ fn red_and_blackness() { ); } #[test] -#[ignore] // wrong error fn red_and_saturation() { assert_eq!( runner().err( @@ -102,7 +96,6 @@ fn red_and_saturation() { ); } #[test] -#[ignore] // wrong error fn saturation_and_blackness() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/scale/error/polar.rs b/rsass/tests/spec/core_functions/color/scale/error/polar.rs index bd6f483d..0ed5d277 100644 --- a/rsass/tests/spec/core_functions/color/scale/error/polar.rs +++ b/rsass/tests/spec/core_functions/color/scale/error/polar.rs @@ -22,7 +22,6 @@ fn lch() { ); } #[test] -#[ignore] // wrong error fn legacy() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/core_functions/color/whiteness.rs b/rsass/tests/spec/core_functions/color/whiteness.rs index 6c7f82ff..9b94b7be 100644 --- a/rsass/tests/spec/core_functions/color/whiteness.rs +++ b/rsass/tests/spec/core_functions/color/whiteness.rs @@ -80,7 +80,6 @@ mod error { } } #[test] -#[ignore] // wrong result fn fraction() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -105,7 +104,6 @@ mod middle { use super::runner; #[test] - #[ignore] // wrong result fn half_blackness() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -116,7 +114,6 @@ mod middle { ); } #[test] - #[ignore] // wrong result fn high_blackness() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -127,7 +124,6 @@ mod middle { ); } #[test] - #[ignore] // wrong result fn zero_blackness() { assert_eq!( runner().ok("@use \"sass:color\";\ @@ -149,7 +145,6 @@ fn min() { ); } #[test] -#[ignore] // wrong result fn named() { assert_eq!( runner().ok("@use \"sass:color\";\ diff --git a/rsass/tests/spec/non_conformant/errors/fn_change_color_1.rs b/rsass/tests/spec/non_conformant/errors/fn_change_color_1.rs index a3bcc78e..8bcb1134 100644 --- a/rsass/tests/spec/non_conformant/errors/fn_change_color_1.rs +++ b/rsass/tests/spec/non_conformant/errors/fn_change_color_1.rs @@ -6,7 +6,6 @@ fn runner() -> crate::TestRunner { } #[test] -#[ignore] // wrong error fn test() { assert_eq!( runner().err( diff --git a/rsass/tests/spec/values/colors/equality.rs b/rsass/tests/spec/values/colors/equality.rs index eff98f4a..fe14289a 100644 --- a/rsass/tests/spec/values/colors/equality.rs +++ b/rsass/tests/spec/values/colors/equality.rs @@ -88,6 +88,7 @@ mod test_false { ); } #[test] + #[ignore] // unexepected error fn one_none() { assert_eq!( runner() @@ -258,7 +259,6 @@ mod test_true { use super::runner; #[test] - #[ignore] // wrong result fn no_none() { assert_eq!( runner().ok( @@ -270,6 +270,7 @@ mod test_true { ); } #[test] + #[ignore] // unexepected error fn none() { assert_eq!( runner().ok(