mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
style: Remove useless unit tests, and fix not-so-useless ones.
This commit is contained in:
parent
4671ef5243
commit
ac01c76e5e
4 changed files with 8 additions and 64 deletions
|
@ -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)])
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue