X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ftest%2FSparseByteSetTest.cpp;h=76f489677e643e9f5a620a305eea6674e5bf9d3e;hb=a6b10d84b12734b6cde0d94530b1e3e4635ce00a;hp=418d797da525285f36cf38e619c76bfa1d13658f;hpb=6a6ac91e1fda65d7871390f03be8d19b3591ba45;p=folly.git diff --git a/folly/test/SparseByteSetTest.cpp b/folly/test/SparseByteSetTest.cpp index 418d797d..76f48967 100644 --- a/folly/test/SparseByteSetTest.cpp +++ b/folly/test/SparseByteSetTest.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2016 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,10 +55,10 @@ TEST_F(SparseByteSetTest, each) { TEST_F(SparseByteSetTest, each_random) { mt19937 rng; - uniform_int_distribution dist; + uniform_int_distribution dist{lims::min(), lims::max()}; set added; while (added.size() <= lims::max()) { - auto c = dist(rng); + auto c = uint8_t(dist(rng)); EXPECT_EQ(added.count(c), s.contains(c)); EXPECT_EQ(!added.count(c), s.add(c)); added.insert(c);