Rename v_test to vello_test
diff --git a/sparse_strips/vello_dev_macros/src/lib.rs b/sparse_strips/vello_dev_macros/src/lib.rs index aed7bc2..9906846 100644 --- a/sparse_strips/vello_dev_macros/src/lib.rs +++ b/sparse_strips/vello_dev_macros/src/lib.rs
@@ -106,11 +106,11 @@ /// /// ## Example /// ```ignore -/// use vello_dev_macros::v_test; +/// use vello_dev_macros::vello_test; /// use vello_api::kurbo::Rect; /// use vello_api::color::palette::css::REBECCA_PURPLE; /// -/// #[v_test(width = 10, height = 10)] +/// #[vello_test(width = 10, height = 10)] /// fn rectangle_above_viewport(ctx: &mut impl Renderer) { /// let rect = Rect::new(2.0, -5.0, 8.0, 8.0); /// @@ -119,7 +119,7 @@ /// } /// ``` #[proc_macro_attribute] -pub fn v_test(attr: TokenStream, item: TokenStream) -> TokenStream { +pub fn vello_test(attr: TokenStream, item: TokenStream) -> TokenStream { let attrs = parse_macro_input!(attr as AttributeInput); let input_fn = parse_macro_input!(item as ItemFn);
diff --git a/sparse_strips/vello_sparse_tests/tests/basic.rs b/sparse_strips/vello_sparse_tests/tests/basic.rs index 288971e..061d8b8 100644 --- a/sparse_strips/vello_sparse_tests/tests/basic.rs +++ b/sparse_strips/vello_sparse_tests/tests/basic.rs
@@ -11,15 +11,15 @@ }; use vello_common::kurbo::{Affine, BezPath, Circle, Join, Point, Rect, Shape, Stroke}; use vello_common::peniko::Fill; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; -#[v_test(width = 8, height = 8)] +#[vello_test(width = 8, height = 8)] fn full_cover_1(ctx: &mut impl Renderer) { ctx.set_paint(BEIGE); ctx.fill_path(&Rect::new(0.0, 0.0, 8.0, 8.0).to_path(0.1)); } -#[v_test] +#[vello_test] fn filled_triangle(ctx: &mut impl Renderer) { let path = { let mut path = BezPath::new(); @@ -35,7 +35,7 @@ ctx.fill_path(&path); } -#[v_test] +#[vello_test] fn stroked_triangle(ctx: &mut impl Renderer) { let path = { let mut path = BezPath::new(); @@ -52,14 +52,14 @@ ctx.stroke_path(&path); } -#[v_test] +#[vello_test] fn filled_circle(ctx: &mut impl Renderer) { let circle = Circle::new((50.0, 50.0), 45.0); ctx.set_paint(LIME); ctx.fill_path(&circle.to_path(0.1)); } -#[v_test] +#[vello_test] fn filled_overflowing_circle(ctx: &mut impl Renderer) { let circle = Circle::new((50.0, 50.0), 50.0 + 1.0); @@ -67,7 +67,7 @@ ctx.fill_path(&circle.to_path(0.1)); } -#[v_test] +#[vello_test] fn filled_fully_overflowing_circle(ctx: &mut impl Renderer) { let circle = Circle::new((50.0, 50.0), 80.0); @@ -75,7 +75,7 @@ ctx.fill_path(&circle.to_path(0.1)); } -#[v_test] +#[vello_test] fn filled_circle_with_opacity(ctx: &mut impl Renderer) { let circle = Circle::new((50.0, 50.0), 45.0); @@ -83,7 +83,7 @@ ctx.fill_path(&circle.to_path(0.1)); } -#[v_test(hybrid_tolerance = 1)] +#[vello_test(hybrid_tolerance = 1)] fn filled_overlapping_circles(ctx: &mut impl Renderer) { for e in [(35.0, 35.0, RED), (65.0, 35.0, GREEN), (50.0, 65.0, BLUE)] { let circle = Circle::new((e.0, e.1), 30.0); @@ -92,7 +92,7 @@ } } -#[v_test] +#[vello_test] fn stroked_circle(ctx: &mut impl Renderer) { let circle = Circle::new((50.0, 50.0), 45.0); let stroke = Stroke::new(3.0); @@ -103,7 +103,7 @@ } /// Requires winding of the first row of tiles to be calculcated correctly for vertical lines. -#[v_test(width = 10, height = 10)] +#[vello_test(width = 10, height = 10)] fn rectangle_above_viewport(ctx: &mut impl Renderer) { let rect = Rect::new(2.0, -5.0, 8.0, 8.0); @@ -112,7 +112,7 @@ } /// Requires winding of the first row of tiles to be calculcated correctly for sloped lines. -#[v_test(width = 10, height = 10)] +#[vello_test(width = 10, height = 10)] fn triangle_above_and_wider_than_viewport(ctx: &mut impl Renderer) { let path = { let mut path = BezPath::new(); @@ -130,7 +130,7 @@ /// Requires winding and pixel coverage to be calculcated correctly for tiles preceding the /// viewport in scan direction. -#[v_test(width = 10, height = 10)] +#[vello_test(width = 10, height = 10)] fn rectangle_left_of_viewport(ctx: &mut impl Renderer) { let rect = Rect::new(-4.0, 3.0, 1.0, 8.0); @@ -138,7 +138,7 @@ ctx.fill_rect(&rect); } -#[v_test] +#[vello_test] fn filling_nonzero_rule(ctx: &mut impl Renderer) { let star = crossed_line_star(); @@ -146,7 +146,7 @@ ctx.fill_path(&star); } -#[v_test] +#[vello_test] fn filling_evenodd_rule(ctx: &mut impl Renderer) { let star = crossed_line_star(); @@ -155,7 +155,7 @@ ctx.fill_path(&star); } -#[v_test(width = 30, height = 20)] +#[vello_test(width = 30, height = 20)] fn filled_aligned_rect(ctx: &mut impl Renderer) { let rect = Rect::new(1.0, 1.0, 29.0, 19.0); @@ -163,7 +163,7 @@ ctx.fill_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn stroked_unaligned_rect(ctx: &mut impl Renderer) { let rect = Rect::new(5.0, 5.0, 25.0, 25.0); let stroke = Stroke { @@ -177,7 +177,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn stroked_unaligned_rect_as_path(ctx: &mut impl Renderer) { let rect = Rect::new(5.0, 5.0, 25.0, 25.0).to_path(0.1); let stroke = Stroke { @@ -191,7 +191,7 @@ ctx.stroke_path(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn stroked_aligned_rect(ctx: &mut impl Renderer) { let rect = Rect::new(5.0, 5.0, 25.0, 25.0); let stroke = miter_stroke_2(); @@ -201,7 +201,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn overflowing_stroked_rect(ctx: &mut impl Renderer) { let rect = Rect::new(12.5, 12.5, 17.5, 17.5); let stroke = Stroke { @@ -215,7 +215,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn round_stroked_rect(ctx: &mut impl Renderer) { let rect = Rect::new(5.0, 5.0, 25.0, 25.0); let stroke = Stroke::new(3.0); @@ -225,7 +225,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn bevel_stroked_rect(ctx: &mut impl Renderer) { let rect = Rect::new(5.0, 5.0, 25.0, 25.0); let stroke = Stroke { @@ -239,7 +239,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 20)] +#[vello_test(width = 30, height = 20)] fn filled_unaligned_rect(ctx: &mut impl Renderer) { let rect = Rect::new(1.5, 1.5, 28.5, 18.5); @@ -247,7 +247,7 @@ ctx.fill_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn filled_transformed_rect_1(ctx: &mut impl Renderer) { let rect = Rect::new(0.0, 0.0, 10.0, 10.0); @@ -256,7 +256,7 @@ ctx.fill_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn filled_transformed_rect_2(ctx: &mut impl Renderer) { let rect = Rect::new(5.0, 5.0, 10.0, 10.0); @@ -265,7 +265,7 @@ ctx.fill_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn filled_transformed_rect_3(ctx: &mut impl Renderer) { let rect = Rect::new(0.0, 0.0, 10.0, 10.0); @@ -274,7 +274,7 @@ ctx.fill_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn filled_transformed_rect_4(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 20.0, 20.0); @@ -286,7 +286,7 @@ ctx.fill_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn stroked_transformed_rect_1(ctx: &mut impl Renderer) { let rect = Rect::new(0.0, 0.0, 10.0, 10.0); let stroke = miter_stroke_2(); @@ -297,7 +297,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn stroked_transformed_rect_2(ctx: &mut impl Renderer) { let rect = Rect::new(5.0, 5.0, 10.0, 10.0); let stroke = miter_stroke_2(); @@ -308,7 +308,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn stroked_transformed_rect_3(ctx: &mut impl Renderer) { let rect = Rect::new(0.0, 0.0, 10.0, 10.0); let stroke = miter_stroke_2(); @@ -319,7 +319,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 30)] +#[vello_test(width = 30, height = 30)] fn stroked_transformed_rect_4(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 20.0, 20.0); let stroke = miter_stroke_2(); @@ -333,7 +333,7 @@ ctx.stroke_rect(&rect); } -#[v_test(width = 30, height = 20)] +#[vello_test(width = 30, height = 20)] fn strip_inscribed_rect(ctx: &mut impl Renderer) { let rect = Rect::new(1.5, 9.5, 28.5, 11.5); @@ -341,7 +341,7 @@ ctx.fill_rect(&rect); } -#[v_test(width = 5, height = 8)] +#[vello_test(width = 5, height = 8)] fn filled_vertical_hairline_rect(ctx: &mut impl Renderer) { let rect = Rect::new(2.25, 0.0, 2.75, 8.0); @@ -349,7 +349,7 @@ ctx.fill_rect(&rect); } -#[v_test(width = 10, height = 10)] +#[vello_test(width = 10, height = 10)] fn filled_vertical_hairline_rect_2(ctx: &mut impl Renderer) { let rect = Rect::new(4.5, 0.5, 5.5, 9.5); @@ -357,7 +357,7 @@ ctx.fill_rect(&rect); } -#[v_test] +#[vello_test] fn oversized_star(ctx: &mut impl Renderer) { // Create a star path that extends beyond the render context boundaries // Center it in the middle of the viewport
diff --git a/sparse_strips/vello_sparse_tests/tests/clip.rs b/sparse_strips/vello_sparse_tests/tests/clip.rs index 0baa811..dd310b1 100644 --- a/sparse_strips/vello_sparse_tests/tests/clip.rs +++ b/sparse_strips/vello_sparse_tests/tests/clip.rs
@@ -10,9 +10,9 @@ use vello_common::color::palette::css::{DARK_BLUE, DARK_GREEN, REBECCA_PURPLE}; use vello_common::kurbo::{Affine, BezPath, Circle, Point, Rect, Shape, Stroke}; use vello_common::peniko::Fill; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; -#[v_test] +#[vello_test] fn clip_triangle_with_star(ctx: &mut impl Renderer) { let mut triangle_path = BezPath::new(); triangle_path.move_to((10.0, 10.0)); @@ -33,7 +33,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_rectangle_with_star_nonzero(ctx: &mut impl Renderer) { let rect = Rect::new(0.0, 0.0, 100.0, 100.0); // Create a self-intersecting star shape that will show the difference between fill rules @@ -50,7 +50,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_rectangle_with_star_evenodd(ctx: &mut impl Renderer) { let rect = Rect::new(0.0, 0.0, 100.0, 100.0); // Create a self-intersecting star shape that will show the difference between fill rules @@ -67,7 +67,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_rectangle_and_circle(ctx: &mut impl Renderer) { // Create first clipping region - a rectangle on the left side let clip_rect = Rect::new(10.0, 30.0, 50.0, 70.0); @@ -96,7 +96,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_with_translation(ctx: &mut impl Renderer) { // Apply a translation transform ctx.set_transform(Affine::translate((30.0, 30.0))); @@ -113,7 +113,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_with_scale(ctx: &mut impl Renderer) { ctx.set_transform(Affine::scale(2.0)); @@ -129,7 +129,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_with_rotate(ctx: &mut impl Renderer) { ctx.set_transform(Affine::rotate_about( 45.0 * PI / 180.0, @@ -148,7 +148,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_transformed_rect(ctx: &mut impl Renderer) { let clip_rect = Rect::new(20.0, 20.0, 80.0, 80.0); @@ -168,7 +168,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_with_multiple_transforms(ctx: &mut impl Renderer) { // Apply initial transform ctx.set_transform(Affine::rotate_about( @@ -197,7 +197,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_with_save_restore(ctx: &mut impl Renderer) { // Create first clipping region - a rectangle on the left side let clip_rect1 = Rect::new(10.0, 30.0, 50.0, 70.0); @@ -226,7 +226,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn clip_with_opacity(ctx: &mut impl Renderer) { // Main body of the shape should be RGB 127, 127, 127. Anti-aliased part should be // 191, 191, 191.
diff --git a/sparse_strips/vello_sparse_tests/tests/compose.rs b/sparse_strips/vello_sparse_tests/tests/compose.rs index a628aef..7109d87 100644 --- a/sparse_strips/vello_sparse_tests/tests/compose.rs +++ b/sparse_strips/vello_sparse_tests/tests/compose.rs
@@ -5,7 +5,7 @@ use vello_common::color::palette::css::{BLUE, YELLOW}; use vello_common::kurbo::Rect; use vello_common::peniko::{BlendMode, Compose, Mix}; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; fn compose(ctx: &mut impl Renderer, compose: Compose) { ctx.push_blend_layer(BlendMode::new(Mix::Normal, Compose::SrcOver)); @@ -22,67 +22,67 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn compose_src_over(ctx: &mut impl Renderer) { compose(ctx, Compose::SrcOver); } -#[v_test] +#[vello_test] fn compose_xor(ctx: &mut impl Renderer) { compose(ctx, Compose::Xor); } -#[v_test] +#[vello_test] fn compose_clear(ctx: &mut impl Renderer) { compose(ctx, Compose::Clear); } -#[v_test] +#[vello_test] fn compose_copy(ctx: &mut impl Renderer) { compose(ctx, Compose::Copy); } -#[v_test] +#[vello_test] fn compose_dest(ctx: &mut impl Renderer) { compose(ctx, Compose::Dest); } -#[v_test] +#[vello_test] fn compose_dest_over(ctx: &mut impl Renderer) { compose(ctx, Compose::DestOver); } -#[v_test] +#[vello_test] fn compose_src_in(ctx: &mut impl Renderer) { compose(ctx, Compose::SrcIn); } -#[v_test] +#[vello_test] fn compose_src_out(ctx: &mut impl Renderer) { compose(ctx, Compose::SrcOut); } -#[v_test] +#[vello_test] fn compose_dest_in(ctx: &mut impl Renderer) { compose(ctx, Compose::DestIn); } -#[v_test] +#[vello_test] fn compose_dest_out(ctx: &mut impl Renderer) { compose(ctx, Compose::DestOut); } -#[v_test] +#[vello_test] fn compose_src_atop(ctx: &mut impl Renderer) { compose(ctx, Compose::SrcAtop); } -#[v_test] +#[vello_test] fn compose_dest_atop(ctx: &mut impl Renderer) { compose(ctx, Compose::DestAtop); } -#[v_test] +#[vello_test] fn compose_plus(ctx: &mut impl Renderer) { compose(ctx, Compose::Plus); }
diff --git a/sparse_strips/vello_sparse_tests/tests/glyph.rs b/sparse_strips/vello_sparse_tests/tests/glyph.rs index a424b8c..3f51c76 100644 --- a/sparse_strips/vello_sparse_tests/tests/glyph.rs +++ b/sparse_strips/vello_sparse_tests/tests/glyph.rs
@@ -7,9 +7,9 @@ use crate::util::layout_glyphs; use vello_common::color::palette::css::REBECCA_PURPLE; use vello_common::kurbo::Affine; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; -#[v_test(width = 300, height = 70)] +#[vello_test(width = 300, height = 70)] fn glyphs_filled(ctx: &mut impl Renderer) { let font_size: f32 = 50_f32; let (font, glyphs) = layout_glyphs("Hello, world!", font_size); @@ -22,7 +22,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 300, height = 70)] +#[vello_test(width = 300, height = 70)] fn glyphs_filled_unhinted(ctx: &mut impl Renderer) { let font_size: f32 = 50_f32; let (font, glyphs) = layout_glyphs("Hello, world!", font_size); @@ -35,7 +35,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 300, height = 70)] +#[vello_test(width = 300, height = 70)] fn glyphs_stroked(ctx: &mut impl Renderer) { let font_size: f32 = 50_f32; let (font, glyphs) = layout_glyphs("Hello, world!", font_size); @@ -48,7 +48,7 @@ .stroke_glyphs(glyphs.into_iter()); } -#[v_test(width = 300, height = 70)] +#[vello_test(width = 300, height = 70)] fn glyphs_stroked_unhinted(ctx: &mut impl Renderer) { let font_size: f32 = 50_f32; let (font, glyphs) = layout_glyphs("Hello, world!", font_size); @@ -61,7 +61,7 @@ .stroke_glyphs(glyphs.into_iter()); } -#[v_test(width = 300, height = 70)] +#[vello_test(width = 300, height = 70)] fn glyphs_skewed(ctx: &mut impl Renderer) { let font_size: f32 = 50_f32; let (font, glyphs) = layout_glyphs("Hello, world!", font_size); @@ -75,7 +75,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 300, height = 70)] +#[vello_test(width = 300, height = 70)] fn glyphs_skewed_unhinted(ctx: &mut impl Renderer) { let font_size: f32 = 50_f32; let (font, glyphs) = layout_glyphs("Hello, world!", font_size); @@ -89,7 +89,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 250, height = 75)] +#[vello_test(width = 250, height = 75)] fn glyphs_skewed_long(ctx: &mut impl Renderer) { let font_size: f32 = 20_f32; let (font, glyphs) = layout_glyphs( @@ -106,7 +106,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 250, height = 75)] +#[vello_test(width = 250, height = 75)] fn glyphs_skewed_long_unhinted(ctx: &mut impl Renderer) { let font_size: f32 = 20_f32; let (font, glyphs) = layout_glyphs( @@ -123,7 +123,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 150, height = 125)] +#[vello_test(width = 150, height = 125)] fn glyphs_skewed_unskewed(ctx: &mut impl Renderer) { let font_size: f32 = 50_f32; let (font, glyphs) = layout_glyphs("Hello,\nworld!", font_size); @@ -140,7 +140,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 150, height = 125)] +#[vello_test(width = 150, height = 125)] fn glyphs_skewed_unskewed_unhinted(ctx: &mut impl Renderer) { let font_size: f32 = 50_f32; let (font, glyphs) = layout_glyphs("Hello,\nworld!", font_size); @@ -157,7 +157,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 150, height = 125)] +#[vello_test(width = 150, height = 125)] fn glyphs_scaled(ctx: &mut impl Renderer) { let font_size: f32 = 25_f32; let (font, glyphs) = layout_glyphs("Hello,\nworld!", font_size); @@ -170,7 +170,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 150, height = 125)] +#[vello_test(width = 150, height = 125)] fn glyphs_scaled_unhinted(ctx: &mut impl Renderer) { let font_size: f32 = 25_f32; let (font, glyphs) = layout_glyphs("Hello,\nworld!", font_size); @@ -183,7 +183,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 150, height = 125)] +#[vello_test(width = 150, height = 125)] fn glyphs_glyph_transform(ctx: &mut impl Renderer) { let font_size: f32 = 25_f32; let (font, glyphs) = layout_glyphs("Hello,\nworld!", font_size); @@ -197,7 +197,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 150, height = 125)] +#[vello_test(width = 150, height = 125)] fn glyphs_glyph_transform_unhinted(ctx: &mut impl Renderer) { let font_size: f32 = 25_f32; let (font, glyphs) = layout_glyphs("Hello,\nworld!", font_size); @@ -211,7 +211,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 60, height = 12)] +#[vello_test(width = 60, height = 12)] fn glyphs_small(ctx: &mut impl Renderer) { let font_size: f32 = 10_f32; let (font, glyphs) = layout_glyphs("Hello, world!", font_size); @@ -224,7 +224,7 @@ .fill_glyphs(glyphs.into_iter()); } -#[v_test(width = 60, height = 12)] +#[vello_test(width = 60, height = 12)] fn glyphs_small_unhinted(ctx: &mut impl Renderer) { let font_size: f32 = 10_f32; let (font, glyphs) = layout_glyphs("Hello, world!", font_size);
diff --git a/sparse_strips/vello_sparse_tests/tests/gradient.rs b/sparse_strips/vello_sparse_tests/tests/gradient.rs index 05e0c78..d2e8561 100644 --- a/sparse_strips/vello_sparse_tests/tests/gradient.rs +++ b/sparse_strips/vello_sparse_tests/tests/gradient.rs
@@ -9,13 +9,13 @@ use vello_common::color::{ColorSpaceTag, DynamicColor}; use vello_common::kurbo::{Point, Rect}; use vello_common::peniko::{ColorStop, ColorStops, GradientKind}; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; pub(crate) const fn tan_45() -> f64 { 1.0 } -#[v_test(width = 600, height = 32)] +#[vello_test(width = 600, height = 32)] fn gradient_on_3_wide_tiles(ctx: &mut impl Renderer) { let rect = Rect::new(4.0, 4.0, 596.0, 28.0); @@ -32,7 +32,7 @@ ctx.fill_rect(&rect); } -#[v_test] +#[vello_test] fn gradient_with_global_alpha(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -76,7 +76,7 @@ } } -#[v_test(width = 200, height = 130)] +#[vello_test(width = 200, height = 130)] fn gradient_with_color_spaces_1(ctx: &mut impl Renderer) { let stops = ColorStops(smallvec![ ColorStop { @@ -92,7 +92,7 @@ gradient_with_color_spaces(ctx, stops); } -#[v_test(width = 200, height = 130)] +#[vello_test(width = 200, height = 130)] fn gradient_with_color_spaces_2(ctx: &mut impl Renderer) { let stops = ColorStops(smallvec![ ColorStop { @@ -108,7 +108,7 @@ gradient_with_color_spaces(ctx, stops); } -#[v_test(width = 200, height = 130)] +#[vello_test(width = 200, height = 130)] fn gradient_with_color_spaces_3(ctx: &mut impl Renderer) { gradient_with_color_spaces(ctx, stops_blue_green_red_yellow()); } @@ -126,9 +126,9 @@ use vello_api::peniko::Gradient; use vello_common::kurbo::{Affine, Point, Rect}; use vello_common::peniko::GradientKind; - use vello_dev_macros::v_test; + use vello_dev_macros::vello_test; - #[v_test] + #[vello_test] fn gradient_linear_2_stops(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -145,7 +145,7 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_linear_2_stops_with_alpha(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -175,22 +175,22 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_linear_negative_direction(ctx: &mut impl Renderer) { directional(ctx, Point::new(90.0, 0.0), Point::new(10.0, 0.0)); } - #[v_test] + #[vello_test] fn gradient_linear_with_downward_y(ctx: &mut impl Renderer) { directional(ctx, Point::new(20.0, 20.0), Point::new(80.0, 80.0)); } - #[v_test] + #[vello_test] fn gradient_linear_with_upward_y(ctx: &mut impl Renderer) { directional(ctx, Point::new(20.0, 80.0), Point::new(80.0, 20.0)); } - #[v_test] + #[vello_test] fn gradient_linear_vertical(ctx: &mut impl Renderer) { directional(ctx, Point::new(0.0, 10.0), Point::new(0.0, 90.0)); } @@ -212,22 +212,22 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_linear_spread_method_pad(ctx: &mut impl Renderer) { gradient_pad(ctx, Extend::Pad); } - #[v_test] + #[vello_test] fn gradient_linear_spread_method_repeat(ctx: &mut impl Renderer) { gradient_pad(ctx, Extend::Repeat); } - #[v_test] + #[vello_test] fn gradient_linear_spread_method_reflect(ctx: &mut impl Renderer) { gradient_pad(ctx, Extend::Reflect); } - #[v_test] + #[vello_test] fn gradient_linear_4_stops(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -244,7 +244,7 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_linear_complex_shape(ctx: &mut impl Renderer) { let path = crossed_line_star(); @@ -261,7 +261,7 @@ ctx.fill_path(&path); } - #[v_test] + #[vello_test] fn gradient_linear_with_y_repeat(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -279,7 +279,7 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_linear_with_y_reflect(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -321,22 +321,22 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_identity(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::IDENTITY, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_translate(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::translate((25.0, 25.0)), 0.0, 0.0, 50.0, 50.0); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_scale(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::scale(2.0), 12.5, 12.5, 37.5, 37.5); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_negative_scale(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -348,7 +348,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_scale_and_translate(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -360,7 +360,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_rotate_1(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -372,7 +372,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_rotate_2(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -384,7 +384,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_scaling_non_uniform(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -396,25 +396,25 @@ ); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_skew_x_1(ctx: &mut impl Renderer) { let transform = Affine::translate((-50.0, 0.0)) * Affine::skew(tan_45(), 0.0); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_skew_x_2(ctx: &mut impl Renderer) { let transform = Affine::translate((50.0, 0.0)) * Affine::skew(-tan_45(), 0.0); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_skew_y_1(ctx: &mut impl Renderer) { let transform = Affine::translate((0.0, 50.0)) * Affine::skew(0.0, -tan_45()); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_linear_with_transform_skew_y_2(ctx: &mut impl Renderer) { let transform = Affine::translate((0.0, -50.0)) * Affine::skew(0.0, tan_45()); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); @@ -434,7 +434,7 @@ use vello_api::peniko::{ColorStops, Gradient}; use vello_common::kurbo::{Affine, Point, Rect}; use vello_common::peniko::GradientKind::Radial; - use vello_dev_macros::v_test; + use vello_dev_macros::vello_test; fn simple(ctx: &mut impl Renderer, stops: ColorStops) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -454,17 +454,17 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_radial_2_stops(ctx: &mut impl Renderer) { simple(ctx, stops_green_blue()); } - #[v_test] + #[vello_test] fn gradient_radial_4_stops(ctx: &mut impl Renderer) { simple(ctx, stops_blue_green_red_yellow()); } - #[v_test] + #[vello_test] fn gradient_radial_2_stops_with_alpha(ctx: &mut impl Renderer) { simple(ctx, stops_green_blue_with_alpha()); } @@ -488,17 +488,17 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_radial_spread_method_pad(ctx: &mut impl Renderer) { gradient_pad(ctx, Extend::Pad); } - #[v_test] + #[vello_test] fn gradient_radial_spread_method_reflect(ctx: &mut impl Renderer) { gradient_pad(ctx, Extend::Reflect); } - #[v_test] + #[vello_test] fn gradient_radial_spread_method_repeat(ctx: &mut impl Renderer) { gradient_pad(ctx, Extend::Repeat); } @@ -522,27 +522,27 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_radial_center_offset_top_left(ctx: &mut impl Renderer) { offset(ctx, Point::new(30.0, 30.0)); } - #[v_test] + #[vello_test] fn gradient_radial_center_offset_top_right(ctx: &mut impl Renderer) { offset(ctx, Point::new(70.0, 30.0)); } - #[v_test] + #[vello_test] fn gradient_radial_center_offset_bottom_left(ctx: &mut impl Renderer) { offset(ctx, Point::new(30.0, 70.0)); } - #[v_test] + #[vello_test] fn gradient_radial_center_offset_bottom_right(ctx: &mut impl Renderer) { offset(ctx, Point::new(70.0, 70.0)); } - #[v_test] + #[vello_test] fn gradient_radial_c0_bigger(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -579,27 +579,27 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_radial_non_overlapping_same_size(ctx: &mut impl Renderer) { non_overlapping(ctx, 20.0); } - #[v_test] + #[vello_test] fn gradient_radial_non_overlapping_c0_smaller(ctx: &mut impl Renderer) { non_overlapping(ctx, 15.0); } - #[v_test] + #[vello_test] fn gradient_radial_non_overlapping_c0_larger(ctx: &mut impl Renderer) { non_overlapping(ctx, 25.0); } - #[v_test] + #[vello_test] fn gradient_radial_non_overlapping_cone(ctx: &mut impl Renderer) { non_overlapping(ctx, 5.0); } - #[v_test] + #[vello_test] fn gradient_radial_complex_shape(ctx: &mut impl Renderer) { let path = crossed_line_star(); @@ -645,22 +645,22 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_identity(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::IDENTITY, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_translate(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::translate((25.0, 25.0)), 0.0, 0.0, 50.0, 50.0); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_scale(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::scale(2.0), 12.5, 12.5, 37.5, 37.5); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_negative_scale(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -672,7 +672,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_scale_and_translate(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -684,7 +684,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_rotate_1(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -696,7 +696,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_rotate_2(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -708,7 +708,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_scale_non_uniform(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -720,25 +720,25 @@ ); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_skew_x_1(ctx: &mut impl Renderer) { let transform = Affine::translate((-50.0, 0.0)) * Affine::skew(tan_45(), 0.0); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_skew_x_2(ctx: &mut impl Renderer) { let transform = Affine::translate((50.0, 0.0)) * Affine::skew(-tan_45(), 0.0); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_skew_y_1(ctx: &mut impl Renderer) { let transform = Affine::translate((0.0, 50.0)) * Affine::skew(0.0, -tan_45()); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_radial_with_transform_skew_y_2(ctx: &mut impl Renderer) { let transform = Affine::translate((0.0, -50.0)) * Affine::skew(0.0, tan_45()); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); @@ -758,7 +758,7 @@ use vello_api::peniko::{ColorStops, Gradient}; use vello_common::kurbo::{Affine, Point, Rect}; use vello_common::peniko::GradientKind; - use vello_dev_macros::v_test; + use vello_dev_macros::vello_test; fn basic(ctx: &mut impl Renderer, stops: ColorStops, center: Point) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -777,27 +777,27 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_sweep_2_stops(ctx: &mut impl Renderer) { basic(ctx, stops_green_blue(), Point::new(50.0, 50.0)); } - #[v_test] + #[vello_test] fn gradient_sweep_2_stops_with_alpha(ctx: &mut impl Renderer) { basic(ctx, stops_green_blue_with_alpha(), Point::new(50.0, 50.0)); } - #[v_test] + #[vello_test] fn gradient_sweep_4_stops(ctx: &mut impl Renderer) { basic(ctx, stops_blue_green_red_yellow(), Point::new(50.0, 50.0)); } - #[v_test] + #[vello_test] fn gradient_sweep_not_in_center(ctx: &mut impl Renderer) { basic(ctx, stops_green_blue(), Point::new(30.0, 30.0)); } - #[v_test] + #[vello_test] fn gradient_sweep_complex_shape(ctx: &mut impl Renderer) { let path = crossed_line_star(); @@ -833,17 +833,17 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_sweep_spread_method_pad(ctx: &mut impl Renderer) { spread_method(ctx, Extend::Pad); } - #[v_test] + #[vello_test] fn gradient_sweep_spread_method_repeat(ctx: &mut impl Renderer) { spread_method(ctx, Extend::Repeat); } - #[v_test] + #[vello_test] fn gradient_sweep_spread_method_reflect(ctx: &mut impl Renderer) { spread_method(ctx, Extend::Reflect); } @@ -873,22 +873,22 @@ ctx.fill_rect(&rect); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_identity(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::IDENTITY, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_translate(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::translate((25.0, 25.0)), 0.0, 0.0, 50.0, 50.0); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_scale(ctx: &mut impl Renderer) { gradient_with_transform(ctx, Affine::scale(2.0), 12.5, 12.5, 37.5, 37.5); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_negative_scale(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -900,7 +900,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_scale_and_translate(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -912,7 +912,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_rotate_1(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -924,7 +924,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_rotate_2(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -936,7 +936,7 @@ ); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_scale_non_uniform(ctx: &mut impl Renderer) { gradient_with_transform( ctx, @@ -948,25 +948,25 @@ ); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_skew_x_1(ctx: &mut impl Renderer) { let transform = Affine::translate((-50.0, 0.0)) * Affine::skew(tan_45(), 0.0); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_skew_x_2(ctx: &mut impl Renderer) { let transform = Affine::translate((50.0, 0.0)) * Affine::skew(-tan_45(), 0.0); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_skew_y_1(ctx: &mut impl Renderer) { let transform = Affine::translate((0.0, 50.0)) * Affine::skew(0.0, -tan_45()); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0); } - #[v_test] + #[vello_test] fn gradient_sweep_with_transform_skew_y_2(ctx: &mut impl Renderer) { let transform = Affine::translate((0.0, -50.0)) * Affine::skew(0.0, tan_45()); gradient_with_transform(ctx, transform, 25.0, 25.0, 75.0, 75.0);
diff --git a/sparse_strips/vello_sparse_tests/tests/image.rs b/sparse_strips/vello_sparse_tests/tests/image.rs index 7c63a0d..bfe60b4 100644 --- a/sparse_strips/vello_sparse_tests/tests/image.rs +++ b/sparse_strips/vello_sparse_tests/tests/image.rs
@@ -11,7 +11,7 @@ use vello_common::paint::Image; use vello_common::peniko::{Extend, ImageQuality}; use vello_common::pixmap::Pixmap; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; pub(crate) fn load_image(name: &str) -> Arc<Pixmap> { let path = Path::new(env!("CARGO_MANIFEST_DIR")).join(format!("tests/assets/{name}.png")); @@ -56,27 +56,27 @@ ctx.fill_rect(&rect); } -#[v_test] +#[vello_test] fn image_reflect_x_pad_y(ctx: &mut impl Renderer) { repeat(ctx, Extend::Reflect, Extend::Pad); } -#[v_test] +#[vello_test] fn image_pad_x_repeat_y(ctx: &mut impl Renderer) { repeat(ctx, Extend::Pad, Extend::Repeat); } -#[v_test] +#[vello_test] fn image_reflect_x_reflect_y(ctx: &mut impl Renderer) { repeat(ctx, Extend::Reflect, Extend::Reflect); } -#[v_test] +#[vello_test] fn image_repeat_x_repeat_y(ctx: &mut impl Renderer) { repeat(ctx, Extend::Repeat, Extend::Repeat); } -#[v_test] +#[vello_test] fn image_pad_x_pad_y(ctx: &mut impl Renderer) { repeat(ctx, Extend::Pad, Extend::Pad); } @@ -96,22 +96,22 @@ ctx.fill_rect(&rect); } -#[v_test] +#[vello_test] fn image_with_transform_identity(ctx: &mut impl Renderer) { transform(ctx, Affine::IDENTITY, 25.0, 25.0, 75.0, 75.0); } -#[v_test] +#[vello_test] fn image_with_transform_translate(ctx: &mut impl Renderer) { transform(ctx, Affine::translate((25.0, 25.0)), 0.0, 0.0, 50.0, 50.0); } -#[v_test] +#[vello_test] fn image_with_transform_scale(ctx: &mut impl Renderer) { transform(ctx, Affine::scale(2.0), 12.5, 12.5, 37.5, 37.5); } -#[v_test] +#[vello_test] fn image_with_transform_negative_scale(ctx: &mut impl Renderer) { transform( ctx, @@ -123,7 +123,7 @@ ); } -#[v_test] +#[vello_test] fn image_with_transform_scale_and_translate(ctx: &mut impl Renderer) { transform( ctx, @@ -136,7 +136,7 @@ } // TODO: The below two test cases fail on Windows CI for some reason. -#[v_test(ignore)] +#[vello_test(ignore)] fn image_with_transform_rotate_1(ctx: &mut impl Renderer) { transform( ctx, @@ -148,7 +148,7 @@ ); } -#[v_test(ignore)] +#[vello_test(ignore)] fn image_with_transform_rotate_2(ctx: &mut impl Renderer) { transform( ctx, @@ -160,7 +160,7 @@ ); } -#[v_test] +#[vello_test] fn image_with_transform_scaling_non_uniform(ctx: &mut impl Renderer) { transform( ctx, @@ -172,7 +172,7 @@ ); } -#[v_test] +#[vello_test] fn image_with_transform_skew_x_1(ctx: &mut impl Renderer) { transform( ctx, @@ -184,7 +184,7 @@ ); } -#[v_test] +#[vello_test] fn image_with_transform_skew_x_2(ctx: &mut impl Renderer) { transform( ctx, @@ -196,7 +196,7 @@ ); } -#[v_test] +#[vello_test] fn image_with_transform_skew_y_1(ctx: &mut impl Renderer) { transform( ctx, @@ -208,7 +208,7 @@ ); } -#[v_test] +#[vello_test] fn image_with_transform_skew_y_2(ctx: &mut impl Renderer) { transform( ctx, @@ -220,7 +220,7 @@ ); } -#[v_test] +#[vello_test] fn image_complex_shape(ctx: &mut impl Renderer) { let path = crossed_line_star(); @@ -235,7 +235,7 @@ ctx.fill_path(&path); } -#[v_test] +#[vello_test] fn image_global_alpha(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); @@ -267,22 +267,22 @@ ctx.fill_rect(&rect); } -#[v_test] +#[vello_test] fn image_rgb_image(ctx: &mut impl Renderer) { image_format(ctx, rgb_img_10x10()); } -#[v_test] +#[vello_test] fn image_rgba_image(ctx: &mut impl Renderer) { image_format(ctx, rgba_img_10x10()); } -#[v_test] +#[vello_test] fn image_luma_image(ctx: &mut impl Renderer) { image_format(ctx, luma_img_10x10()); } -#[v_test] +#[vello_test] fn image_lumaa_image(ctx: &mut impl Renderer) { image_format(ctx, lumaa_img_10x10()); } @@ -310,7 +310,7 @@ // Outputs of those tests were compared against Blend2D and tiny-skia. -#[v_test] +#[vello_test] fn image_bilinear_identity(ctx: &mut impl Renderer) { quality( ctx, @@ -321,7 +321,7 @@ ); } -#[v_test] +#[vello_test] fn image_bilinear_2x_scale(ctx: &mut impl Renderer) { quality( ctx, @@ -332,7 +332,7 @@ ); } -#[v_test] +#[vello_test] fn image_bilinear_5x_scale(ctx: &mut impl Renderer) { quality( ctx, @@ -343,7 +343,7 @@ ); } -#[v_test] +#[vello_test] fn image_bilinear_10x_scale(ctx: &mut impl Renderer) { quality( ctx, @@ -354,7 +354,7 @@ ); } -#[v_test] +#[vello_test] fn image_bilinear_with_rotation(ctx: &mut impl Renderer) { quality( ctx, @@ -365,7 +365,7 @@ ); } -#[v_test] +#[vello_test] fn image_bilinear_with_translation(ctx: &mut impl Renderer) { quality( ctx, @@ -376,7 +376,7 @@ ); } -#[v_test] +#[vello_test] fn image_bilinear_10x_scale_2(ctx: &mut impl Renderer) { quality( ctx, @@ -395,7 +395,7 @@ // // We also ported the cubic polynomials directly from current Skia, while tiny-skia (seems?) to use // either an outdated version or a slightly adapted one. -#[v_test] +#[vello_test] fn image_bicubic_identity(ctx: &mut impl Renderer) { quality( ctx, @@ -406,7 +406,7 @@ ); } -#[v_test] +#[vello_test] fn image_bicubic_2x_scale(ctx: &mut impl Renderer) { quality( ctx, @@ -417,7 +417,7 @@ ); } -#[v_test] +#[vello_test] fn image_bicubic_5x_scale(ctx: &mut impl Renderer) { quality( ctx, @@ -428,7 +428,7 @@ ); } -#[v_test] +#[vello_test] fn image_bicubic_10x_scale(ctx: &mut impl Renderer) { quality( ctx, @@ -439,7 +439,7 @@ ); } -#[v_test] +#[vello_test] fn image_bicubic_with_rotation(ctx: &mut impl Renderer) { quality( ctx, @@ -450,7 +450,7 @@ ); } -#[v_test] +#[vello_test] fn image_bicubic_with_translation(ctx: &mut impl Renderer) { quality( ctx, @@ -461,7 +461,7 @@ ); } -#[v_test] +#[vello_test] fn image_bicubic_10x_scale_2(ctx: &mut impl Renderer) { quality( ctx,
diff --git a/sparse_strips/vello_sparse_tests/tests/issues.rs b/sparse_strips/vello_sparse_tests/tests/issues.rs index 6b3f2ea..7eb78ba 100644 --- a/sparse_strips/vello_sparse_tests/tests/issues.rs +++ b/sparse_strips/vello_sparse_tests/tests/issues.rs
@@ -7,9 +7,9 @@ use vello_common::color::palette::css::{DARK_BLUE, LIME, REBECCA_PURPLE}; use vello_common::kurbo::{BezPath, Rect, Shape, Stroke}; use vello_common::peniko::Fill; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; -#[v_test(width = 8, height = 8)] +#[vello_test(width = 8, height = 8)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/2 fn incorrect_filling_1(ctx: &mut impl Renderer) { let mut p = BezPath::default(); @@ -23,7 +23,7 @@ ctx.fill_path(&p); } -#[v_test(width = 64, height = 64)] +#[vello_test(width = 64, height = 64)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/2 fn incorrect_filling_2(ctx: &mut impl Renderer) { let mut p = BezPath::default(); @@ -37,7 +37,7 @@ ctx.fill_path(&p); } -#[v_test(width = 9, height = 9)] +#[vello_test(width = 9, height = 9)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/2 fn incorrect_filling_3(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -51,7 +51,7 @@ ctx.fill_path(&path); } -#[v_test(width = 64, height = 64)] +#[vello_test(width = 64, height = 64)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/2 fn incorrect_filling_4(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -71,7 +71,7 @@ ctx.fill_path(&path); } -#[v_test(width = 32, height = 32)] +#[vello_test(width = 32, height = 32)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/2 fn incorrect_filling_5(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -85,7 +85,7 @@ ctx.fill_path(&path); } -#[v_test(width = 32, height = 32)] +#[vello_test(width = 32, height = 32)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/2 fn incorrect_filling_6(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -99,7 +99,7 @@ ctx.fill_path(&path); } -#[v_test(width = 32, height = 32)] +#[vello_test(width = 32, height = 32)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/2 fn incorrect_filling_7(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -113,7 +113,7 @@ ctx.fill_path(&path); } -#[v_test(width = 32, height = 32)] +#[vello_test(width = 32, height = 32)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/2 fn incorrect_filling_8(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -133,7 +133,7 @@ ctx.fill_path(&path); } -#[v_test(width = 256, height = 256, no_ref)] +#[vello_test(width = 256, height = 256, no_ref)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/11 fn out_of_bound_strip(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -147,7 +147,7 @@ ctx.stroke_path(&path); } -#[v_test] +#[vello_test] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/12 fn filling_unclosed_path_1(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -159,7 +159,7 @@ ctx.fill_path(&path); } -#[v_test] +#[vello_test] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/12 fn filling_unclosed_path_2(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -177,7 +177,7 @@ ctx.fill_path(&path); } -#[v_test(width = 15, height = 8)] +#[vello_test(width = 15, height = 8)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/28 fn triangle_exceeding_viewport_1(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -191,7 +191,7 @@ ctx.fill_path(&path); } -#[v_test(width = 15, height = 8)] +#[vello_test(width = 15, height = 8)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/28 fn triangle_exceeding_viewport_2(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -205,7 +205,7 @@ ctx.fill_path(&path); } -#[v_test(width = 256, height = 4, no_ref)] +#[vello_test(width = 256, height = 4, no_ref)] // https://github.com/LaurenzV/cpu-sparse-experiments/issues/30 fn shape_at_wide_tile_boundary(ctx: &mut impl Renderer) { let mut path = BezPath::new(); @@ -220,7 +220,7 @@ ctx.fill_path(&path); } -#[v_test(width = 50, height = 50)] +#[vello_test(width = 50, height = 50)] fn eo_filling_missing_anti_aliasing(ctx: &mut impl Renderer) { let mut path = BezPath::new(); path.move_to((0.0, 0.0)); @@ -234,7 +234,7 @@ ctx.fill_path(&path); } -#[v_test(width = 600, height = 600, transparent)] +#[vello_test(width = 600, height = 600, transparent)] // https://github.com/linebender/vello/issues/906 fn fill_command_respects_clip_bounds(ctx: &mut impl Renderer) { ctx.push_clip_layer(&Rect::new(400.0, 400.0, 500.0, 500.0).to_path(0.1)); @@ -243,7 +243,7 @@ ctx.pop_layer(); } -#[v_test(no_ref)] +#[vello_test(no_ref)] fn out_of_viewport_clip(ctx: &mut impl Renderer) { ctx.push_clip_layer(&Rect::new(-100.0, -100.0, 0.0, 0.0).to_path(0.1)); ctx.set_paint(REBECCA_PURPLE);
diff --git a/sparse_strips/vello_sparse_tests/tests/layer.rs b/sparse_strips/vello_sparse_tests/tests/layer.rs index 2d51cd3..0a9b920 100644 --- a/sparse_strips/vello_sparse_tests/tests/layer.rs +++ b/sparse_strips/vello_sparse_tests/tests/layer.rs
@@ -7,9 +7,9 @@ use vello_common::color::palette::css::{BLUE, RED}; use vello_common::kurbo::Rect; use vello_common::peniko::{BlendMode, Compose, Mix}; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; -#[v_test] +#[vello_test] fn layer_multiple_properties_1(ctx: &mut impl Renderer) { let mask = example_mask(true); let star = crossed_line_star();
diff --git a/sparse_strips/vello_sparse_tests/tests/mask.rs b/sparse_strips/vello_sparse_tests/tests/mask.rs index e13a6b7..3674a1c 100644 --- a/sparse_strips/vello_sparse_tests/tests/mask.rs +++ b/sparse_strips/vello_sparse_tests/tests/mask.rs
@@ -10,7 +10,7 @@ use vello_common::mask::Mask; use vello_common::peniko::{ColorStop, ColorStops, GradientKind}; use vello_cpu::{Pixmap, RenderContext}; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; pub(crate) fn example_mask(alpha_mask: bool) -> Mask { let mut mask_pix = Pixmap::new(100, 100); @@ -60,12 +60,12 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn mask_alpha(ctx: &mut impl Renderer) { mask(ctx, true); } -#[v_test] +#[vello_test] fn mask_luminance(ctx: &mut impl Renderer) { mask(ctx, false); }
diff --git a/sparse_strips/vello_sparse_tests/tests/mix.rs b/sparse_strips/vello_sparse_tests/tests/mix.rs index ca11124..e16b515 100644 --- a/sparse_strips/vello_sparse_tests/tests/mix.rs +++ b/sparse_strips/vello_sparse_tests/tests/mix.rs
@@ -11,7 +11,7 @@ use vello_common::paint::Image; use vello_common::peniko::{BlendMode, Compose, Extend, Mix}; use vello_common::peniko::{ColorStop, ColorStops, GradientKind, ImageQuality}; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; // The outputs have been compared visually with tiny-skia, and except for two cases (where tiny-skia // is wrong), the overall visual effect looks the same. @@ -64,87 +64,87 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn mix_normal(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Normal, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_multiply(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Multiply, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_screen(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Screen, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_darken(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Darken, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_lighten(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Lighten, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_color_dodge(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::ColorDodge, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_color_burn(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::ColorBurn, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_hard_light(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::HardLight, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_soft_light(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::SoftLight, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_difference(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Difference, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_exclusion(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Exclusion, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_overlay(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Overlay, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_hue(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Hue, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_saturation(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Saturation, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_color(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Color, Compose::SrcOver)); } -#[v_test] +#[vello_test] fn mix_luminosity(ctx: &mut impl Renderer) { mix(ctx, BlendMode::new(Mix::Luminosity, Compose::SrcOver)); } -#[v_test(transparent)] +#[vello_test(transparent)] fn mix_with_transparent_bg(ctx: &mut impl Renderer) { let rect = Rect::new(10.0, 10.0, 90.0, 90.0); ctx.set_paint(AlphaColor::<Srgb>::from_rgba8(0, 0, 128, 128)); @@ -169,13 +169,13 @@ // The below 2 test cases yield different results than in tiny-skia, but I checked by converting // the test case into SVG and viewing it in Chrome, and our version should be right. // Color of rectangle should be (106, 106, 0). -#[v_test] +#[vello_test] fn mix_color_with_solid(ctx: &mut impl Renderer) { mix_solid(ctx, Mix::Color); } // Color of rectangle should be (213, 52, 0). -#[v_test] +#[vello_test] fn mix_saturation_with_solid(ctx: &mut impl Renderer) { mix_solid(ctx, Mix::Saturation); }
diff --git a/sparse_strips/vello_sparse_tests/tests/opacity.rs b/sparse_strips/vello_sparse_tests/tests/opacity.rs index 7e58d60..4c84eb7 100644 --- a/sparse_strips/vello_sparse_tests/tests/opacity.rs +++ b/sparse_strips/vello_sparse_tests/tests/opacity.rs
@@ -4,9 +4,9 @@ use crate::renderer::Renderer; use vello_common::color::palette::css::{BLUE, GREEN, REBECCA_PURPLE, RED, YELLOW}; use vello_common::kurbo::{Circle, Rect, Shape}; -use vello_dev_macros::v_test; +use vello_dev_macros::vello_test; -#[v_test] +#[vello_test] fn opacity_on_layer(ctx: &mut impl Renderer) { ctx.push_opacity_layer(70); @@ -19,7 +19,7 @@ ctx.pop_layer(); } -#[v_test] +#[vello_test] fn opacity_nested_on_layer(ctx: &mut impl Renderer) { ctx.set_paint(REBECCA_PURPLE); ctx.fill_rect(&Rect::new(10.0, 10.0, 90.0, 90.0));