|
|
|
@ -1,4 +1,4 @@ |
|
|
|
// Copyright (c) Six Labors and contributors.
|
|
|
|
// Copyright (c) Six Labors and contributors.
|
|
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
|
|
|
|
using System; |
|
|
|
@ -20,17 +20,16 @@ namespace SixLabors.ImageSharp.Tests |
|
|
|
public class TestImageProviderTests |
|
|
|
{ |
|
|
|
public static readonly TheoryData<object> BasicData = new TheoryData<object>() |
|
|
|
{ |
|
|
|
TestImageProvider<Rgba32>.Blank(10, 20), |
|
|
|
TestImageProvider<HalfVector4>.Blank(10, 20), |
|
|
|
}; |
|
|
|
{ |
|
|
|
TestImageProvider<Rgba32>.Blank(10, 20), |
|
|
|
TestImageProvider<HalfVector4>.Blank(10, 20), |
|
|
|
}; |
|
|
|
|
|
|
|
public static readonly TheoryData<object> FileData = new TheoryData<object>() |
|
|
|
{ |
|
|
|
TestImageProvider<Rgba32>.File(TestImages.Bmp.Car), |
|
|
|
TestImageProvider<HalfVector4>.File( |
|
|
|
TestImages.Bmp.F) |
|
|
|
}; |
|
|
|
{ |
|
|
|
TestImageProvider<Rgba32>.File(TestImages.Bmp.Car), |
|
|
|
TestImageProvider<HalfVector4>.File(TestImages.Bmp.F) |
|
|
|
}; |
|
|
|
|
|
|
|
public static string[] AllBmpFiles = { TestImages.Bmp.F, TestImages.Bmp.Bit8 }; |
|
|
|
|
|
|
|
@ -332,13 +331,13 @@ namespace SixLabors.ImageSharp.Tests |
|
|
|
private static void EnsureCustomConfigurationIsApplied<TPixel>(TestImageProvider<TPixel> provider) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
{ |
|
|
|
using (var image1 = provider.GetImage()) |
|
|
|
using (provider.GetImage()) |
|
|
|
{ |
|
|
|
var customConfiguration = Configuration.CreateDefaultInstance(); |
|
|
|
provider.Configuration = customConfiguration; |
|
|
|
|
|
|
|
using (var image2 = provider.GetImage()) |
|
|
|
using (var image3 = provider.GetImage()) |
|
|
|
using (Image<TPixel> image2 = provider.GetImage()) |
|
|
|
using (Image<TPixel> image3 = provider.GetImage()) |
|
|
|
{ |
|
|
|
Assert.Same(customConfiguration, image2.GetConfiguration()); |
|
|
|
Assert.Same(customConfiguration, image3.GetConfiguration()); |
|
|
|
|