-
Notifications
You must be signed in to change notification settings - Fork 5
/
KnownHslTests.cs
44 lines (37 loc) · 997 Bytes
/
KnownHslTests.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 KnownHslTests
{
private const double Tolerance = 0.00000000001;
[Test]
public void Red()
{
var red = StandardRgb.Red;
TestUtils.AssertTriplet<Hsl>(red, new(0, 1.0, 0.5), Tolerance);
}
[Test]
public void Green()
{
var green = StandardRgb.Green;
TestUtils.AssertTriplet<Hsl>(green, new(120, 1.0, 0.5), Tolerance);
}
[Test]
public void Blue()
{
var blue = StandardRgb.Blue;
TestUtils.AssertTriplet<Hsl>(blue, new(240, 1.0, 0.5), Tolerance);
}
[Test]
public void Black()
{
var black = StandardRgb.Black;
TestUtils.AssertTriplet<Hsl>(black, new(0, 0.0, 0.0), Tolerance);
}
[Test]
public void White()
{
var white = StandardRgb.White;
TestUtils.AssertTriplet<Hsl>(white, new(0, 0.0, 1.0), Tolerance);
}
}