Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Replace boost::size in model unit tests #1517

Merged
merged 1 commit into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/model/unittest/CCountingModelTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ const std::string EMPTY_STRING;
class CTestFixture : public CModelTestFixtureBase {};

BOOST_FIXTURE_TEST_CASE(testSkipSampling, CTestFixture) {
core_t::TTime startTime(100);
core_t::TTime bucketLength(100);
std::size_t maxAgeBuckets(1);
core_t::TTime startTime{100};
core_t::TTime bucketLength{100};
std::size_t maxAgeBuckets{1};

SModelParams params(bucketLength);
params.s_DecayRate = 0.001;
Expand Down Expand Up @@ -144,8 +144,8 @@ BOOST_FIXTURE_TEST_CASE(testSkipSampling, CTestFixture) {
}

BOOST_FIXTURE_TEST_CASE(testCheckScheduledEvents, CTestFixture) {
core_t::TTime startTime(100);
core_t::TTime bucketLength(100);
core_t::TTime startTime{100};
core_t::TTime bucketLength{100};

SModelParams params(bucketLength);

Expand Down Expand Up @@ -247,8 +247,8 @@ BOOST_FIXTURE_TEST_CASE(testCheckScheduledEvents, CTestFixture) {
BOOST_FIXTURE_TEST_CASE(testInterimBucketCorrector, CTestFixture) {
// Check that we correctly update estimate bucket completeness.

core_t::TTime time(0);
core_t::TTime bucketLength(600);
core_t::TTime time{0};
core_t::TTime bucketLength{600};

SModelParams params(bucketLength);
params.s_DecayRate = 0.001;
Expand All @@ -270,7 +270,7 @@ BOOST_FIXTURE_TEST_CASE(testInterimBucketCorrector, CTestFixture) {
TDoubleVec uniform01;
TSizeVec offsets;

for (std::size_t i = 0; i < 10; ++i, time += bucketLength) {
for (std::size_t i = 0u; i < 10; ++i, time += bucketLength) {
rng.generateUniformSamples(0, bucketLength, 10, offsets);
std::sort(offsets.begin(), offsets.end());
for (auto offset : offsets) {
Expand All @@ -285,7 +285,7 @@ BOOST_FIXTURE_TEST_CASE(testInterimBucketCorrector, CTestFixture) {
rng.generateUniformSamples(0, bucketLength, 10, offsets);
std::sort(offsets.begin(), offsets.end());

for (std::size_t i = 0; i < offsets.size(); ++i) {
for (std::size_t i = 0u; i < offsets.size(); ++i) {
rng.generateUniformSamples(0.0, 1.0, 1, uniform01);
addArrival(*gatherer, m_ResourceMonitor,
time + static_cast<core_t::TTime>(offsets[i]),
Expand Down
Loading