示例#1
0
 public void UppercaseHexLettersAreBad()
 {
     for (var loop = 0; loop < 6; loop++)
     {
         var hex = (char)('A' + loop);
         Assert.Throws <BadParseException>(() => HexHelp.HexValue(hex));
     }
 }
示例#2
0
 public void ConvertsDigits()
 {
     for (var loop = 0; loop < 10; loop++)
     {
         var hex   = (char)('0' + loop);
         var value = HexHelp.HexValue(hex);
         Assert.Equal(loop, value);
     }
 }
示例#3
0
 public void ConvertsLowercaseHexLetters()
 {
     for (var loop = 0; loop < 6; loop++)
     {
         var hex   = (char)('a' + loop);
         var value = HexHelp.HexValue(hex);
         Assert.Equal(10 + loop, value);
     }
 }