Skip to content

Commit 748625f

Browse files
committed
More unit tests fixes.
1 parent 2de469e commit 748625f

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

tests/Magick.NET.Tests/Colors/ColorCMYKTests/TheNativeInstance.cs

-4
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ public void ShouldHaveTheCorrectColorspace()
2121
using (var pixels = image.GetPixelsUnsafe())
2222
{
2323
var color = pixels.GetPixel(0, 0).ToColor();
24-
#if Q8
2524
Assert.Equal("cmyka(128,23,250,156,1.0)", color.ToString());
26-
#else
27-
Assert.Equal("cmyka(32896,5911,64250,40092,1.0)", color.ToString());
28-
#endif
2925
}
3026
}
3127
}

tests/Magick.NET.Tests/Pixels/PixelTests/TheEqualsMethod.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,14 @@ public void ShouldReturnTheCorrectValueForFourRgbChannels()
178178
[Fact]
179179
public void ShouldReturnTheCorrectValueForFourCmykChannels()
180180
{
181-
using (var image = new MagickImage(new MagickColor("cmyk(0, 127.499, 255, 255)"), 1, 1))
181+
var color = new MagickColor("cmyk(0, 128, 255, 255)");
182+
using (var image = new MagickImage(color, 1, 1))
182183
{
183184
using (var pixels = image.GetPixelsUnsafe())
184185
{
185186
var pixel = pixels.GetPixel(0, 0);
186187

187-
var half = (QuantumType)(Quantum.Max / 2.0);
188-
var color = new ColorCMYK(0, half, Quantum.Max, Quantum.Max);
189-
Assert.True(pixel.Equals(color.ToMagickColor()));
188+
Assert.True(pixel.Equals(color));
190189
}
191190
}
192191
}

0 commit comments

Comments
 (0)