Skip to content
Permalink
Browse files

style: Remove useless unit tests, and fix not-so-useless ones.

  • Loading branch information...
emilio committed May 25, 2019
1 parent 4671ef5 commit ac01c76e5e82d2a2ecbc06962658bf788d05976d
@@ -4,7 +4,6 @@

use cssparser::RGBA;
use style::values::animated::{Animate, Procedure, ToAnimatedValue};
use style::values::generics::transform::{Transform, TransformOperation};

fn interpolate_rgba(from: RGBA, to: RGBA, progress: f64) -> RGBA {
let from = from.to_animated_value();
@@ -81,14 +80,3 @@ fn test_rgba_color_interepolation_out_of_range_clamped_2() {
RGBA::from_floats(0.0, 0.0, 0.0, 0.0)
);
}

#[test]
fn test_transform_interpolation_on_scale() {
let from = Transform(vec![TransformOperation::Scale3D(1.0, 2.0, 1.0)]);
let to = Transform(vec![TransformOperation::Scale3D(2.0, 4.0, 2.0)]);
assert_eq!(
from.animate(&to, Procedure::Interpolate { progress: 0.5 })
.unwrap(),
Transform(vec![TransformOperation::Scale3D(1.5, 3.0, 1.5)])
);
}

This file was deleted.

@@ -133,7 +133,6 @@ macro_rules! parse_longhand {
};
}

mod animation;
mod background;
mod border;
mod box_;
@@ -194,23 +194,23 @@ fn test_parse_stylesheet() {
PropertyDeclaration::BackgroundPositionX(
longhands::background_position_x::SpecifiedValue(vec![
PositionComponent::zero(),
]),
].into()),
),
Importance::Normal,
),
(
PropertyDeclaration::BackgroundPositionY(
longhands::background_position_y::SpecifiedValue(vec![
PositionComponent::zero(),
]),
].into()),
),
Importance::Normal,
),
(
PropertyDeclaration::BackgroundRepeat(
longhands::background_repeat::SpecifiedValue(
vec![longhands::background_repeat::single_value
::get_initial_specified_value()],
::get_initial_specified_value()].into(),
),
),
Importance::Normal,
@@ -219,7 +219,7 @@ fn test_parse_stylesheet() {
PropertyDeclaration::BackgroundAttachment(
longhands::background_attachment::SpecifiedValue(
vec![longhands::background_attachment::single_value
::get_initial_specified_value()],
::get_initial_specified_value()].into(),
),
),
Importance::Normal,
@@ -228,7 +228,7 @@ fn test_parse_stylesheet() {
PropertyDeclaration::BackgroundImage(
longhands::background_image::SpecifiedValue(
vec![longhands::background_image::single_value
::get_initial_specified_value()],
::get_initial_specified_value()].into(),
),
),
Importance::Normal,
@@ -237,7 +237,7 @@ fn test_parse_stylesheet() {
PropertyDeclaration::BackgroundSize(
longhands::background_size::SpecifiedValue(
vec![longhands::background_size::single_value
::get_initial_specified_value()],
::get_initial_specified_value()].into(),
),
),
Importance::Normal,
@@ -246,7 +246,7 @@ fn test_parse_stylesheet() {
PropertyDeclaration::BackgroundOrigin(
longhands::background_origin::SpecifiedValue(
vec![longhands::background_origin::single_value
::get_initial_specified_value()],
::get_initial_specified_value()].into(),
),
),
Importance::Normal,
@@ -255,7 +255,7 @@ fn test_parse_stylesheet() {
PropertyDeclaration::BackgroundClip(
longhands::background_clip::SpecifiedValue(
vec![longhands::background_clip::single_value
::get_initial_specified_value()],
::get_initial_specified_value()].into(),
),
),
Importance::Normal,

0 comments on commit ac01c76

Please sign in to comment.
You can’t perform that action at this time.