public void GetHashCodeTest() { URational32 a = new URational32(42, 666); URational32 b = new URational32(42, 666); Assert.Equal(a.GetHashCode(), b.GetHashCode()); }
public void AddTest4() { Page target = new Page(); TagType Tag = new TagType(); URational32 value = new URational32(); target.Add(Tag, value); }
public void ToStringTest() { URational32 target = new URational32(42, 666); string expected = "42/666"; string actual = target.ToString(); Assert.Equal(expected, actual); }
public void YResolutionTest2() { Page target = new Page(); URational32 expected = new URational32(); URational32 actual; actual = target.YResolution; Assert.Equal(expected, actual); }
public void ReduceTest2() { URational32 target = new URational32(9, 25); URational32 expected = new URational32(9, 25); URational32 actual; actual = target.Reduce(); Assert.Equal(expected, actual); }
public void URational32ConstructorTest1() { uint numerator = 0; uint denominator = 0; URational32 target = new URational32(numerator, denominator); Assert.Equal(numerator, target.Numerator); Assert.Equal(denominator, target.Denominator); }
public void ReduceTest() { URational32 target = new URational32(1207959552, 16777216); URational32 expected = new URational32(72, 1); URational32 actual; actual = target.Reduce(); Assert.Equal(expected, actual); }
public void InverseTest() { URational32 target = new URational32(1207959552, 16777216); URational32 expected = new URational32(16777216, 1207959552); URational32 actual; actual = target.Inverse(); Assert.Equal(expected, actual); }
public void EqualsTest() { URational32 target = new URational32(); object obj = null; bool expected = false; bool actual; actual = target.Equals(obj); Assert.Equal(expected, actual); }
public void op_InequalityTest() { URational32 value1 = new URational32(1, 2); URational32 value2 = new URational32(2, 4); bool expected = true; bool actual; actual = (value1 != value2); Assert.Equal(expected, actual); }
public void GetBytesTest() { URational32 test = new URational32(42, 666); byte[] data = new byte[8]; Array.Copy(BitConverter.GetBytes((uint)42), data, 4); Array.Copy(BitConverter.GetBytes((uint)666), 0, data, 4, 4); int startIndex = 0; URational32 target = new URational32(data, startIndex); Assert.Equal(data, target.GetBytes()); }
public void NumeratorTest() { URational32 target = new URational32(42, 666); Assert.Equal(42u, target.Numerator); }
public void DenominatorTest() { URational32 target = new URational32(42, 666); Assert.Equal(666u, target.Denominator); }