Beispiel #1
0
        public void AddChunkThatCompleteBoth()
        {
            // Arrange
            var range = SingleRange.Range(1, SingleRange.MaxValue);

            range.Range(SingleRange.MinValue, -1);

            // Assume
            AssertChunks(range, SingleRange.MinValue, -1, 1, SingleRange.MaxValue);

            // Act
            range.Range(BitConverterHelper.Next(-1F), BitConverterHelper.Previous(1F));

            // Assert
            AssertChunks(range, SingleRange.MinValue, SingleRange.MaxValue);
        }
        public void AddChunkThatCompleteBoth()
        {
            // Arrange
            var range = DoubleRange.Range(1, double.MaxValue);

            range.Range(double.MinValue, -1);

            // Assume
            AssertChunks(range, double.MinValue, -1, 1, double.MaxValue);

            // Act
            range.Range(BitConverterHelper.Next((double)-1), BitConverterHelper.Previous((double)1));

            // Assert
            AssertChunks(range, double.MinValue, double.MaxValue);
        }
Beispiel #3
0
 /// <inheritdoc />
 protected override double GetPrevious(double n) => BitConverterHelper.Previous(n);
Beispiel #4
0
 /// <inheritdoc />
 protected override float GetPrevious(float n) => BitConverterHelper.Previous(n);
Beispiel #5
0
 /// <inheritdoc />
 protected override decimal GetPrevious(decimal n) => BitConverterHelper.Previous(n);