Skip to content

Commit

Permalink
#959 Use numeric_limits::infinity for infinite power argument in unit…
Browse files Browse the repository at this point in the history
… test for Norm load model
  • Loading branch information
JacobDomagala committed Sep 9, 2020
1 parent 8229762 commit b4b61ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/collection/test_model_norm.nompi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

#include "test_harness.h"

#include <cmath>
#include <limits>
#include <memory>

namespace vt { namespace tests { namespace unit {
Expand Down Expand Up @@ -185,8 +185,8 @@ TEST_F(TestModelNorm, test_model_norm_3) {
{ElementIDType{2}, {TimeType{40}, TimeType{50}, TimeType{60}}}}}};

// infinite 'power' value
auto test_model =
std::make_shared<Norm>(std::make_shared<StubModel>(), std::exp(800));
auto test_model = std::make_shared<Norm>(
std::make_shared<StubModel>(), std::numeric_limits<double>::infinity());
test_model->setLoads(&proc_load, &proc_subphase_load, nullptr);

std::array<TimeType, 2> expected_norms = {TimeType{30}, TimeType{60}};
Expand Down

0 comments on commit b4b61ac

Please sign in to comment.