public void ToUInt64UncheckedFlags() { Assert.AreEqual((ulong)(FlagsSigned.Variant1 | FlagsSigned.Variant2), _flagsSigned.ToUInt64Unchecked(FlagsSigned.Variant1 | FlagsSigned.Variant2)); }
public void ToUInt64UncheckedOverflow() { Assert.AreEqual((ulong)long.MaxValue, _valueHuge.ToUInt64Unchecked(ValueHuge.Max)); Assert.AreEqual(unchecked ((ulong)long.MinValue), _valueHuge.ToUInt64Unchecked(ValueHuge.Min)); }
public void ToUInt64Unchecked() { Assert.AreEqual(0ul, _nonFlagsSigned.ToUInt64Unchecked(NonFlagsSigned.Variant1)); Assert.AreEqual(1ul, _nonFlagsSigned.ToUInt64Unchecked(NonFlagsSigned.Variant2)); }