aboutsummaryrefslogtreecommitdiff
path: root/libphobos/src/std/random.d
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2018-11-28 17:54:07 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2018-11-28 17:54:07 +0000
commit85041a5b7755dc7b9d74b183e933d89152997886 (patch)
tree2967bb1b7ffbc8c178b109a75f117df37895e144 /libphobos/src/std/random.d
parent735352d2eede1e412cb89f45a5c3e0846bce39af (diff)
downloadgcc-85041a5b7755dc7b9d74b183e933d89152997886.zip
gcc-85041a5b7755dc7b9d74b183e933d89152997886.tar.gz
gcc-85041a5b7755dc7b9d74b183e933d89152997886.tar.bz2
Merge libphobos upstream version 2.076.1
Updated the library version to 76:3:0. libphobos/ChangeLog: 2018-11-28 Iain Buclaw <ibuclaw@gdcproject.org> * Makefile.in: Rebuild. * configure: Rebuild. * configure.ac (DRUNTIME_SOVERSION): Remove. (PHOBOS_SOVERSION): Remove. (libtool_VERSION): Add. * libdruntime/Makefile.am: Use libtool_VERSION. * libdruntime/Makefile.in: Rebuild. * src/Makefile.am: Use libtool_VERSION. * src/Makefile.in: Rebuild. * testsuite/Makefile.in: Rebuild. From-SVN: r266572
Diffstat (limited to 'libphobos/src/std/random.d')
-rw-r--r--libphobos/src/std/random.d6
1 files changed, 3 insertions, 3 deletions
diff --git a/libphobos/src/std/random.d b/libphobos/src/std/random.d
index b3116e18..f4c64d4 100644
--- a/libphobos/src/std/random.d
+++ b/libphobos/src/std/random.d
@@ -64,15 +64,15 @@ import std.traits;
// Generate a uniformly-distributed integer in the range [0, 14]
// If no random generator is passed, the global `rndGen` would be used
auto i = uniform(0, 15, rnd);
- assert(i == 12);
+ assert(i >= 0 && i < 15);
// Generate a uniformly-distributed real in the range [0, 100)
auto r = uniform(0.0L, 100.0L, rnd);
- assert(r == 79.65429843861011285);
+ assert(r >= 0 && r < 100);
// Generate a 32-bit random number
auto u = uniform!uint(rnd);
- assert(u == 4083286876);
+ static assert(is(typeof(u) == uint));
}
version (unittest)