public void TestSum3() { int a = -10, b = 3; int c = NumberSystem8.Sum(a, b); Assert.IsTrue(c < 0); }
public void TestSub3() { int a = 3, b = 6; int c = NumberSystem8.Sub(a, b); int res = -1 * int.Parse(Convert.ToString(NumberSystem8.From8To10(b) - NumberSystem8.From8To10(a), 8)); Assert.AreEqual(res, c); }
public void TestAND3() { int a = 4, b = 6; Assert.AreEqual(100, NumberSystem8.AND(a, b)); }
public void TestAND2() { int a = -3, b = 6; Assert.Equals(NumberSystem8.AND(a, b), typeof(NotSupportedException)); }
public void TestAND1() { int a = 0, b = 6; Assert.AreEqual(0, NumberSystem8.AND(a, b)); }
public void TestSub2() { int a = 99, b = 11; Assert.Equals(NumberSystem8.Sub(a, b), typeof(NotSupportedException)); }
public void TestOR1() { int a = 3, b = 6; Assert.AreEqual(NumberSystem8.OR(a, b), 111); }
public void TestOR2() { int a = 99, b = 3; Assert.Equals(NumberSystem8.OR(a, b), typeof(NotSupportedException)); }
public void TestFrom8To10() { int a = NumberSystem8.From8To10(13); Assert.AreEqual(a.ToString(), "11"); }