-
Notifications
You must be signed in to change notification settings - Fork 5
/
KnownYcbcrTests.cs
44 lines (37 loc) · 1.02 KB
/
KnownYcbcrTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using NUnit.Framework;
using Wacton.Unicolour.Tests.Utils;
namespace Wacton.Unicolour.Tests;
public class KnownYcbcrTests
{
private const double Tolerance = 0.0000005;
[Test]
public void Red()
{
var red = StandardRgb.Red;
TestUtils.AssertTriplet<Ycbcr>(red, new(81.481, 90.20316, 240), Tolerance);
}
[Test]
public void Green()
{
var green = StandardRgb.Green;
TestUtils.AssertTriplet<Ycbcr>(green, new(144.553, 53.79684, 34.21398), Tolerance);
}
[Test]
public void Blue()
{
var blue = StandardRgb.Blue;
TestUtils.AssertTriplet<Ycbcr>(blue, new(40.966, 240, 109.78602), Tolerance);
}
[Test]
public void Black()
{
var black = StandardRgb.Black;
TestUtils.AssertTriplet<Ycbcr>(black, new(16, 128, 128), Tolerance);
}
[Test]
public void White()
{
var white = StandardRgb.White;
TestUtils.AssertTriplet<Ycbcr>(white, new(235, 128, 128), Tolerance);
}
}