public void CheckConversionFromPrefixFormIsCorrect() { var converter = new HexadecimalImmediateValueConverter(); var result = converter.Convert("0xFFFF"); Assert.AreEqual(65535, result); }
public void BothUpperAndLowerCaseLettersAreSupported() { var converter = new HexadecimalImmediateValueConverter(); var result = converter.Convert("FfFfh"); Assert.AreEqual(65535, result); }
public void UnderscoresAreIgnored() { var converter = new HexadecimalImmediateValueConverter(); var result = converter.Convert("0xFF_FF"); Assert.AreEqual(65535, result); }
public void ConversionThrowsForIncorrectSymbols() { var converter = new HexadecimalImmediateValueConverter(); Assert.Throws <FormatException>(() => converter.Convert("0xGGGG")); }
public HexadecimalImmediateValueParser() { Validator = new HexadecimalImmediateValueValidator(); Converter = new HexadecimalImmediateValueConverter(); }