From c8cbe2cec8943ef7fc323768606495d013046add Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 7 Nov 2020 22:42:14 +0100 Subject: [PATCH] Added test case for no rng --- FastRngTests/Double/Distributions/Uniform.cs | 8 ++++++++ FastRngTests/Float/Distributions/Uniform.cs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/FastRngTests/Double/Distributions/Uniform.cs b/FastRngTests/Double/Distributions/Uniform.cs index c9b55cf..facd579 100644 --- a/FastRngTests/Double/Distributions/Uniform.cs +++ b/FastRngTests/Double/Distributions/Uniform.cs @@ -285,5 +285,13 @@ namespace FastRngTests.Double.Distributions Assert.That(distribution[..^1].Max() - distribution[..^1].Min(), Is.InRange(0, 6_000)); } + + [Test] + [Category(TestCategories.COVER)] + [Category(TestCategories.NORMAL)] + public void NoRandomNumberGenerator01() + { + Assert.Throws(() => new FastRng.Double.Distributions.Uniform(null)); + } } } \ No newline at end of file diff --git a/FastRngTests/Float/Distributions/Uniform.cs b/FastRngTests/Float/Distributions/Uniform.cs index 6b94202..62a9cc1 100644 --- a/FastRngTests/Float/Distributions/Uniform.cs +++ b/FastRngTests/Float/Distributions/Uniform.cs @@ -285,5 +285,13 @@ namespace FastRngTests.Float.Distributions Assert.That(distribution[..^1].Max() - distribution[..^1].Min(), Is.InRange(0, 6_000)); } + + [Test] + [Category(TestCategories.COVER)] + [Category(TestCategories.NORMAL)] + public void NoRandomNumberGenerator01() + { + Assert.Throws(() => new FastRng.Float.Distributions.Uniform(null)); + } } } \ No newline at end of file