X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ftest%2FSparseByteSetTest.cpp;h=76f489677e643e9f5a620a305eea6674e5bf9d3e;hb=22d531a8fe503001a51672750dc09daae252fbf6;hp=f5f6f1a1103730dff6f69eef41a0abc88290e4da;hpb=4598dd7067fb84d53913acaf80d0df585ba4d0f7;p=folly.git diff --git a/folly/test/SparseByteSetTest.cpp b/folly/test/SparseByteSetTest.cpp index f5f6f1a1..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. @@ -21,7 +21,7 @@ #include #include -#include +#include using namespace std; using namespace folly; @@ -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);