зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1684176 - Add a test of transforming sRGB to sRGB. r=aosmond
This uses the new safe Rust api Differential Revision: https://phabricator.services.mozilla.com/D100449
This commit is contained in:
Родитель
61d3b2f82d
Коммит
89be52d2fd
|
@ -854,4 +854,20 @@ mod test {
|
|||
qcms_profile_release(output);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn identity() {
|
||||
let p1 = crate::Profile::new_sRGB().unwrap();
|
||||
let p2 = crate::Profile::new_sRGB().unwrap();
|
||||
let mut xfm = crate::Transform::new(
|
||||
&p1,
|
||||
&p2,
|
||||
crate::DataType::DATA_RGB_8,
|
||||
crate::Intent::default(),
|
||||
)
|
||||
.unwrap();
|
||||
let mut data = [4, 30, 80];
|
||||
xfm.apply(&mut data);
|
||||
assert_eq!(data, [4, 30, 80]);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче