@@ -320,30 +320,51 @@ public void ToVector4(int count)
320320 ( s , d ) => this . Operations . ToVector4 ( this . Configuration , s , d . GetSpan ( ) ) ) ;
321321 }
322322
323- public static readonly TheoryData < object > Generic_To_Data = new TheoryData < object >
323+ public static readonly TheoryData < object > Generic_To_Data = new ( )
324324 {
325+ new TestPixel < A8 > ( ) ,
325326 new TestPixel < Abgr32 > ( ) ,
326- new TestPixel < Rgba32 > ( ) ,
327+ new TestPixel < Argb32 > ( ) ,
328+ new TestPixel < Bgr24 > ( ) ,
329+ new TestPixel < Bgr565 > ( ) ,
327330 new TestPixel < Bgra32 > ( ) ,
328- new TestPixel < Rgb24 > ( ) ,
329- new TestPixel < L8 > ( ) ,
331+ new TestPixel < Bgra4444 > ( ) ,
332+ new TestPixel < Bgra5551 > ( ) ,
333+ new TestPixel < Byte4 > ( ) ,
334+ new TestPixel < HalfSingle > ( ) ,
335+ new TestPixel < HalfVector2 > ( ) ,
336+ new TestPixel < HalfVector4 > ( ) ,
330337 new TestPixel < L16 > ( ) ,
338+ new TestPixel < L8 > ( ) ,
339+ new TestPixel < La16 > ( ) ,
340+ new TestPixel < La32 > ( ) ,
341+ new TestPixel < NormalizedByte2 > ( ) ,
342+ new TestPixel < NormalizedByte4 > ( ) ,
343+ new TestPixel < NormalizedShort2 > ( ) ,
344+ new TestPixel < NormalizedShort4 > ( ) ,
345+ new TestPixel < Rg32 > ( ) ,
346+ new TestPixel < Rgb24 > ( ) ,
331347 new TestPixel < Rgb48 > ( ) ,
332- new TestPixel < Rgba64 > ( )
348+ new TestPixel < Rgba1010102 > ( ) ,
349+ new TestPixel < Rgba32 > ( ) ,
350+ new TestPixel < Rgba64 > ( ) ,
351+ new TestPixel < RgbaVector > ( ) ,
352+ new TestPixel < Short2 > ( ) ,
353+ new TestPixel < Short4 > ( ) ,
333354 } ;
334355
335356 [ Theory ]
336357 [ MemberData ( nameof ( Generic_To_Data ) ) ]
337- public void Generic_To < TDestPixel > ( TestPixel < TDestPixel > dummy )
358+ public void Generic_To < TDestPixel > ( TestPixel < TDestPixel > _ )
338359 where TDestPixel : unmanaged, IPixel < TDestPixel >
339360 {
340- const int Count = 2134 ;
341- TPixel [ ] source = CreatePixelTestData ( Count ) ;
342- var expected = new TDestPixel [ Count ] ;
361+ const int count = 2134 ;
362+ TPixel [ ] source = CreatePixelTestData ( count ) ;
363+ var expected = new TDestPixel [ count ] ;
343364
344365 PixelConverterTests . ReferenceImplementations . To < TPixel , TDestPixel > ( this . Configuration , source , expected ) ;
345366
346- TestOperation ( source , expected , ( s , d ) => this . Operations . To ( this . Configuration , s , d . GetSpan ( ) ) ) ;
367+ TestOperation ( source , expected , ( s , d ) => this . Operations . To ( this . Configuration , s , d . GetSpan ( ) ) , false ) ;
347368 }
348369
349370 [ Theory ]
@@ -1234,23 +1255,11 @@ public void Verify()
12341255 }
12351256
12361257 // TODO: We really need a PixelTypeInfo.BitsPerComponent property!!
1237- private static bool IsComplexPixel ( )
1258+ private static bool IsComplexPixel ( ) => default ( TDest ) switch
12381259 {
1239- switch ( default ( TDest ) )
1240- {
1241- case HalfSingle _:
1242- case HalfVector2 _:
1243- case L16 _:
1244- case La32 _:
1245- case NormalizedShort2 _:
1246- case Rg32 _:
1247- case Short2 _:
1248- return true ;
1249-
1250- default :
1251- return Unsafe . SizeOf < TDest > ( ) > sizeof ( int ) ;
1252- }
1253- }
1260+ HalfSingle or HalfVector2 or L16 or La32 or NormalizedShort2 or Rg32 or Short2 => true ,
1261+ _ => Unsafe . SizeOf < TDest > ( ) > sizeof ( int ) ,
1262+ } ;
12541263 }
12551264 }
12561265}
0 commit comments