Browse Source

Fix Color equality test

Former-commit-id: 0c56d5ebf2db246bc725cac0a7dd74b82e48d579
Former-commit-id: 1041547e752303bdac6677d4a482e349784fa8aa
Former-commit-id: daef0c97bd5bd5eca5bd3398cb66b719e8f7b6ef
pull/1/head
James Jackson-South 10 years ago
parent
commit
eff93ab558
  1. 2
      src/ImageProcessorCore/Image/IImageProcessor.cs
  2. 38
      tests/ImageProcessorCore.Benchmarks/Color/ColorEquality.cs

2
src/ImageProcessorCore/Image/IImageProcessor.cs

@ -29,7 +29,7 @@ namespace ImageProcessorCore.Processors
event ProgressEventHandler OnProgress;
/// <summary>
/// Gets or sets the global parallel options for processing tasks in parallel.
/// Gets or sets the parallel options for processing tasks in parallel.
/// </summary>
ParallelOptions ParallelOptions { get; set; }

38
tests/ImageProcessorCore.Benchmarks/Color/ColorEquality.cs

@ -1,22 +1,22 @@
//namespace ImageProcessorCore.Benchmarks
//{
// using BenchmarkDotNet.Attributes;
namespace ImageProcessorCore.Benchmarks
{
using BenchmarkDotNet.Attributes;
// using CoreColor = ImageProcessorCore.Color;
// using SystemColor = System.Drawing.Color;
using CoreColor = ImageProcessorCore.Color;
using SystemColor = System.Drawing.Color;
// public class ColorEquality
// {
// [Benchmark(Baseline = true, Description = "System.Drawing Color Equals")]
// public bool SystemDrawingColorEqual()
// {
// return SystemColor.FromArgb(128, 128, 128, 128).Equals(SystemColor.FromArgb(128, 128, 128, 128));
// }
public class ColorEquality
{
[Benchmark(Baseline = true, Description = "System.Drawing Color Equals")]
public bool SystemDrawingColorEqual()
{
return SystemColor.FromArgb(128, 128, 128, 128).Equals(SystemColor.FromArgb(128, 128, 128, 128));
}
// [Benchmark(Description = "ImageProcessorCore Color Equals")]
// public bool ColorEqual()
// {
// return new CoreColor(.5f, .5f, .5f, .5f).Equals(new CoreColor(.5f, .5f, .5f, .5f));
// }
// }
//}
[Benchmark(Description = "ImageProcessorCore Color Equals")]
public bool ColorEqual()
{
return new CoreColor(128, 128, 128, 128).Equals(new CoreColor(128, 128, 128, 128));
}
}
}

Loading…
Cancel
Save