File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
tests/ImageSharp.Tests/Formats/Jpg Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,35 @@ static void RunTest(string arg)
166
166
}
167
167
}
168
168
169
+ [ Fact ]
170
+ public void GetConverterReturnsCorrectConverterWithYcckColorSpace ( )
171
+ {
172
+ FeatureTestRunner . RunWithHwIntrinsicsFeature (
173
+ RunTest ,
174
+ HwIntrinsics . AllowAll | HwIntrinsics . DisableAVX2 | HwIntrinsics . DisableSSE2 | HwIntrinsics . DisableHWIntrinsic ) ;
175
+
176
+ static void RunTest ( string arg )
177
+ {
178
+ // arrange
179
+ Type expectedType = typeof ( JpegColorConverterBase . YccKScalar ) ;
180
+ if ( Avx . IsSupported )
181
+ {
182
+ expectedType = typeof ( JpegColorConverterBase . YccKAvx ) ;
183
+ }
184
+ else if ( Sse2 . IsSupported )
185
+ {
186
+ expectedType = typeof ( JpegColorConverterBase . YccKVector ) ;
187
+ }
188
+
189
+ // act
190
+ JpegColorConverterBase converter = JpegColorConverterBase . GetConverter ( JpegColorSpace . Ycck , 8 ) ;
191
+ Type actualType = converter . GetType ( ) ;
192
+
193
+ // assert
194
+ Assert . Equal ( expectedType , actualType ) ;
195
+ }
196
+ }
197
+
169
198
[ Theory ]
170
199
[ InlineData ( JpegColorSpace . Grayscale , 1 ) ]
171
200
[ InlineData ( JpegColorSpace . Ycck , 4 ) ]
You can’t perform that action at this time.
0 commit comments