6 references to IfOutOfRange
Shared.Tests (6)
Throw\LongTests.cs (6)
265var exception = Assert.Throws<ArgumentOutOfRangeException>(() => Throw.IfOutOfRange(0UL, 1UL, 2UL, "foo")); 269exception = Assert.Throws<ArgumentOutOfRangeException>(() => Throw.IfOutOfRange(2L, 0UL, 1UL, "foo")); 273Assert.Equal(0UL, Throw.IfOutOfRange(0UL, 0, 1, "foo")); 274Assert.Equal(1UL, Throw.IfOutOfRange(1UL, 0, 1, "foo")); 347var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1UL, 2UL)); 349var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange(Zero, 1UL, 2UL, nameof(Zero)));