Skip to content

Commit

Permalink
Added unit test for fix from #1512.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Feb 15, 2024
1 parent 6e76c42 commit 10903b0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/Magick.NET.Tests/Colors/MagickColorTests/TheOperators.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,22 @@ public void ShouldMultplyAllNonAlphaChannelsForCmykColor()
Assert.Equal(Quantum.Max / 2, result.K);
Assert.Equal(Quantum.Max, result.A);
}

[Fact]
public void ShouldLimitChannelToQuantumMax()
{
var color = new MagickColor("cmyka(50%,50%,50%,50%)");
var percentage = new Percentage(220);

var result = color * percentage;

Assert.NotNull(result);
Assert.Equal(Quantum.Max, result.R);
Assert.Equal(Quantum.Max, result.G);
Assert.Equal(Quantum.Max, result.B);
Assert.Equal(Quantum.Max, result.K);
Assert.Equal(Quantum.Max, result.A);
}
}
}
}

0 comments on commit 10903b0

Please sign in to comment.