Skip to content

Commit 1133769

Browse files
committed
Added test case DegreesToAngleUnits() in Tests/UnitConverterTests.cs.
1 parent 4370b8d commit 1133769

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Tests/UnitConverterTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ public void SquareMeterToAreaUnits()
6868
Assert.AreEqual(1550.003100, UnitConverter.Convert(1, Unit.SquareMeter, Unit.SquareInch), Delta);
6969
}
7070

71+
[Test]
72+
public void DegreesToAngleUnits()
73+
{
74+
Assert.AreEqual(90, UnitConverter.Convert(90, Unit.Degree, Unit.Degree), Delta);
75+
Assert.AreEqual(Math.PI / 2, UnitConverter.Convert(90, Unit.Degree, Unit.Radian), Delta);
76+
Assert.AreEqual(100, UnitConverter.Convert(90, Unit.Degree, Unit.Gradian), Delta);
77+
}
78+
7179
[Test]
7280
public void ThrowsOnIncompatibleUnits()
7381
{

0 commit comments

Comments
 (0)