public void ParseLong() { Assert.That(Utf8String.ParseLong(new Utf8String("-1")), Is.EqualTo(-1)); Assert.That(Utf8String.ParseLong(new Utf8String("1587")), Is.EqualTo(1587)); Assert.That(Utf8String.ParseLong(new Utf8String("777777777777")), Is.EqualTo(777777777777L)); Assert.That(Utf8String.ParseLong(new Utf8String("1")), Is.EqualTo(1L)); Assert.That(Utf8String.ParseLong(new Utf8String("4")), Is.EqualTo(4L)); }
public void ParseLongRadix() { Assert.That(Utf8String.ParseLong(new Utf8String("-1"), 16), Is.EqualTo(-0x1)); Assert.That(Utf8String.ParseLong(new Utf8String("1587"), 16), Is.EqualTo(0x1587)); Assert.That(Utf8String.ParseLong(new Utf8String("777777777777"), 16), Is.EqualTo(0x777777777777L)); }