Commit adf7b11d authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Fixing double->float conversion error in initializer-list on Windows gitlab-ci.

parent 7e3f8202
......@@ -95,8 +95,8 @@ TEST(Interpolate, FillInBeginning)
float tolerance = 0.0001;
std::vector<float> baseValues1{12.f, 23.f, 100.f, 100.f};
std::vector<float> interpValues1{missingValue, missingValue, 103.23, 200.2};
std::vector<float> expectValues1{103.23, 103.23, 103.23, 200.2};
std::vector<float> interpValues1{missingValue, missingValue, 103.23f, 200.2f};
std::vector<float> expectValues1{103.23f, 103.23f, 103.23f, 200.2f};
std::vector<float> testValues1 =
interpolateValues(baseValues1, interpValues1);
ASSERT_EQ(expectValues1.size(), testValues1.size());
......@@ -112,8 +112,8 @@ TEST(Interpolate, FillInEnd)
float tolerance = 0.0001;
std::vector<float> baseValues1{12.f, 23.f, 100.f, 100.f};
std::vector<float> interpValues1{103.23, 200.2, missingValue, missingValue};
std::vector<float> expectValues1{103.23, 200.2, 200.2, 200.2};
std::vector<float> interpValues1{103.23f, 200.2f, missingValue, missingValue};
std::vector<float> expectValues1{103.23f, 200.2f, 200.2f, 200.2f};
std::vector<float> testValues1 =
interpolateValues(baseValues1, interpValues1);
ASSERT_EQ(expectValues1.size(), testValues1.size());
......@@ -130,8 +130,8 @@ TEST(Interpolate, NewBaseValues)
std::vector<float> baseValues1{1000.f, 2000.f, 3000.f};
std::vector<float> newBaseValues1{500.f, 1500.f, 2500.f, 3500.f};
std::vector<float> interpValues1{10.5, 20.5, 30.5};
std::vector<float> expectValues1{10.5, 15.5, 25.5, 30.5};
std::vector<float> interpValues1{10.5f, 20.5f, 30.5f};
std::vector<float> expectValues1{10.5f, 15.5f, 25.5f, 30.5f};
std::vector<float> testValues1 =
interpolateToOtherBaseValues(baseValues1, newBaseValues1, interpValues1);
ASSERT_EQ(expectValues1.size(), testValues1.size());
......@@ -140,7 +140,7 @@ TEST(Interpolate, NewBaseValues)
EXPECT_NEAR(expectValues1[i], testValues1[i], expectValues1[i] * tolerance);
}
std::vector<float> interpValuesMissing{10.5, missingValue, 30.5};
std::vector<float> interpValuesMissing{10.5f, missingValue, 30.5f};
std::vector<float> testValuesMissing = interpolateToOtherBaseValues(
baseValues1, newBaseValues1, interpValuesMissing);
ASSERT_EQ(expectValues1.size(), testValuesMissing.size());
......@@ -153,8 +153,8 @@ TEST(Interpolate, NewBaseValues)
// High-to-low base values
std::vector<float> baseValues2{3000.f, 2000.f, 1000.f};
std::vector<float> newBaseValues2{3500.f, 2500.f, 1500.f, 500.f};
std::vector<float> interpValues2{30.5, 20.5, 10.5};
std::vector<float> expectValues2{30.5, 25.5, 15.5, 10.5};
std::vector<float> interpValues2{30.5f, 20.5f, 10.5f};
std::vector<float> expectValues2{30.5f, 25.5f, 15.5f, 10.5f};
std::vector<float> testValues2 =
interpolateToOtherBaseValues(baseValues2, newBaseValues2, interpValues2);
ASSERT_EQ(expectValues2.size(), testValues2.size());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment