#include "gtest/gtest.h"
TEST(Utils, RandGetSeed) {
}
TEST(Utils, RandChoice) {
Range<int> elements = {1, 2, 3};
Range<double> weights = {0, 3, 0};
weights = {0, 1, 0};
elements = {0, 1, 2};
std::mt19937 generator(42);
std::vector<int> counts = {0, 0, 0};
for (int i = 0; i < 100; ++i) {
EXPECT_LE(0, c);
EXPECT_LE(c, 2);
counts[c]++;
}
EXPECT_LE(30, counts[0]);
EXPECT_LE(counts[0], 37);
EXPECT_LE(30, counts[1]);
EXPECT_LE(counts[1], 37);
EXPECT_LE(30, counts[2]);
EXPECT_LE(counts[2], 37);
}
}