private static void AssertNotHex(char c)
 {
     try
     {
         RawParseUtils.ParseHexInt4(unchecked ((byte)c));
         NUnit.Framework.Assert.Fail("Incorrectly acccepted " + c);
     }
     catch (IndexOutOfRangeException)
     {
     }
 }
 public virtual void TestInt4_1()
 {
     NUnit.Framework.Assert.AreEqual(0, RawParseUtils.ParseHexInt4(unchecked ((byte)'0'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(1, RawParseUtils.ParseHexInt4(unchecked ((byte)'1'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(2, RawParseUtils.ParseHexInt4(unchecked ((byte)'2'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(3, RawParseUtils.ParseHexInt4(unchecked ((byte)'3'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(4, RawParseUtils.ParseHexInt4(unchecked ((byte)'4'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(5, RawParseUtils.ParseHexInt4(unchecked ((byte)'5'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(6, RawParseUtils.ParseHexInt4(unchecked ((byte)'6'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(7, RawParseUtils.ParseHexInt4(unchecked ((byte)'7'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(8, RawParseUtils.ParseHexInt4(unchecked ((byte)'8'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(9, RawParseUtils.ParseHexInt4(unchecked ((byte)'9'
                                                                              )));
     NUnit.Framework.Assert.AreEqual(10, RawParseUtils.ParseHexInt4(unchecked ((byte)'a'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(11, RawParseUtils.ParseHexInt4(unchecked ((byte)'b'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(12, RawParseUtils.ParseHexInt4(unchecked ((byte)'c'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(13, RawParseUtils.ParseHexInt4(unchecked ((byte)'d'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(14, RawParseUtils.ParseHexInt4(unchecked ((byte)'e'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(15, RawParseUtils.ParseHexInt4(unchecked ((byte)'f'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(10, RawParseUtils.ParseHexInt4(unchecked ((byte)'A'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(11, RawParseUtils.ParseHexInt4(unchecked ((byte)'B'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(12, RawParseUtils.ParseHexInt4(unchecked ((byte)'C'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(13, RawParseUtils.ParseHexInt4(unchecked ((byte)'D'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(14, RawParseUtils.ParseHexInt4(unchecked ((byte)'E'
                                                                               )));
     NUnit.Framework.Assert.AreEqual(15, RawParseUtils.ParseHexInt4(unchecked ((byte)'F'
                                                                               )));
     AssertNotHex('q');
     AssertNotHex(' ');
     AssertNotHex('.');
 }