@@ -1698,7 +1698,7 @@ async fn color_overlay<F: 'n + Send, T: Adjust<Color>>(
16981698
16991699#[ cfg( test) ]
17001700mod test {
1701- use crate :: raster:: image:: ImageFrame ;
1701+ use crate :: raster:: image:: { ImageFrame , ImageFrameTable } ;
17021702 use crate :: raster:: { BlendMode , Image } ;
17031703 use crate :: { Color , Node } ;
17041704 use std:: pin:: Pin ;
@@ -1721,18 +1721,17 @@ mod test {
17211721 image : Image :: new ( 1 , 1 , image_color) ,
17221722 ..Default :: default ( )
17231723 } ;
1724- let expected = result. image . data [ 0 ] . clone ( ) ;
1725- let image_frame_table = ImageFrameTable :: new ( image) ;
17261724
17271725 // Color { red: 0., green: 1., blue: 0., alpha: 1. }
17281726 let overlay_color = Color :: GREEN ;
17291727
17301728 // 100% of the output should come from the multiplied value
17311729 let opacity = 100_f64 ;
17321730
1733- let result = super :: color_overlay ( ( ) , & FutureWrapperNode ( image) , overlay_color, BlendMode :: Multiply , opacity) . await ;
1731+ let result = super :: color_overlay ( ( ) , & FutureWrapperNode ( ImageFrameTable :: new ( image. clone ( ) ) ) , overlay_color, BlendMode :: Multiply , opacity) . await ;
1732+ let result = result. one_item ( ) ;
17341733
17351734 // The output should just be the original green and alpha channels (as we multiply them by 1 and other channels by 0)
1736- assert_eq ! ( expected , Color :: from_rgbaf32_unchecked( 0. , image_color. g( ) , 0. , image_color. a( ) ) ) ;
1735+ assert_eq ! ( result . image . data [ 0 ] , Color :: from_rgbaf32_unchecked( 0. , image_color. g( ) , 0. , image_color. a( ) ) ) ;
17371736 }
17381737}
0 commit comments