Beispiel #1
0
        public void ConvertTest4()
        {
            string hex = "A";
            int    dec;

            dec = HexInt.HexToDec(hex);
            Assert.AreEqual(10, dec);
        }
Beispiel #2
0
        public void ConvertTest3()
        {
            string hex = "1FD";
            int    dec;

            dec = HexInt.HexToDec(hex);
            Assert.AreEqual(509, dec);
        }
Beispiel #3
0
        public void SubTest1()
        {
            string hex1 = "F";
            string hex2 = "A";
            int    dec;

            dec = HexInt.HexToDec(HexInt.Subsruct(hex1, hex2));
            Assert.AreEqual(5, dec);
        }
Beispiel #4
0
        public void SumTest1()
        {
            string hex1 = "A";
            string hex2 = "A";
            int    dec;

            dec = HexInt.HexToDec(HexInt.Add(hex1, hex2));
            Assert.AreEqual(20, dec);
        }