comment out tests

This commit is contained in:
Adam
2025-07-16 01:42:37 -07:00
parent cf0a32b9b1
commit f5c6b65fcc
35 changed files with 2963 additions and 3098 deletions
+35 -35
View File
@@ -372,40 +372,40 @@ pub fn blend_stamp_closure(foreground: BrushStampGenerator<Color>, mut backgroun
background
}
#[cfg(test)]
mod test {
use super::*;
use glam::DAffine2;
use graphene_core::transform::Transform;
// #[cfg(test)]
// mod test {
// use super::*;
// use glam::DAffine2;
// use graphene_core::transform::Transform;
#[test]
fn test_brush_texture() {
let size = 20.;
let image = brush_stamp_generator(size, Color::BLACK, 100., 100.);
assert_eq!(image.transform(), DAffine2::from_scale_angle_translation(DVec2::splat(size.ceil()), 0., -DVec2::splat(size / 2.)));
// center pixel should be BLACK
assert_eq!(image.sample(DVec2::splat(0.), DVec2::ONE), Some(Color::BLACK));
}
// #[test]
// fn test_brush_texture() {
// let size = 20.;
// let image = brush_stamp_generator(size, Color::BLACK, 100., 100.);
// assert_eq!(image.transform(), DAffine2::from_scale_angle_translation(DVec2::splat(size.ceil()), 0., -DVec2::splat(size / 2.)));
// // center pixel should be BLACK
// assert_eq!(image.sample(DVec2::splat(0.), DVec2::ONE), Some(Color::BLACK));
// }
#[tokio::test]
async fn test_brush_output_size() {
let image = brush(
(),
RasterDataTable::<CPU>::new(Raster::new_cpu(Image::<Color>::default())),
vec![BrushStroke {
trace: vec![crate::brush_stroke::BrushInputSample { position: DVec2::ZERO }],
style: BrushStyle {
color: Color::BLACK,
diameter: 20.,
hardness: 20.,
flow: 20.,
spacing: 20.,
blend_mode: BlendMode::Normal,
},
}],
BrushCache::default(),
)
.await;
assert_eq!(image.instance_ref_iter().next().unwrap().instance.width, 20);
}
}
// #[tokio::test]
// async fn test_brush_output_size() {
// let image = brush(
// (),
// RasterDataTable::<CPU>::new(Raster::new_cpu(Image::<Color>::default())),
// vec![BrushStroke {
// trace: vec![crate::brush_stroke::BrushInputSample { position: DVec2::ZERO }],
// style: BrushStyle {
// color: Color::BLACK,
// diameter: 20.,
// hardness: 20.,
// flow: 20.,
// spacing: 20.,
// blend_mode: BlendMode::Normal,
// },
// }],
// BrushCache::default(),
// )
// .await;
// assert_eq!(image.instance_ref_iter().next().unwrap().instance.width, 20);
// }
// }