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

Fixing additional type conversion errors for Windows in tstInterpolate.cc.

parent acd13a4c
Pipeline #35938 failed with stages
in 9 minutes and 28 seconds
......@@ -9,7 +9,7 @@ using namespace radix;
TEST(Interpolate, InternalInterpolation)
{
float missingValue = -9999.f;
float tolerance = 0.0001;
float tolerance = 0.0001f;
std::vector<float> baseValues1{10.f, 20.f, 30.f, 40.f, 50.f, 60.f, 70.f};
std::vector<float> interpValues1{1.f, missingValue, 3.f, missingValue,
......@@ -37,7 +37,7 @@ TEST(Interpolate, InternalInterpolation)
EXPECT_NEAR(expectValues2[i], testValues2[i], expectValues2[i] * tolerance);
}
missingValue = 3e12;
missingValue = 3e12f;
std::vector<float> baseValues3{100.f, 50.f, 25.f, 12.5};
std::vector<float> interpValues3{16.f, missingValue, missingValue, 2.f};
std::vector<float> expectValues3{16.f, 8.f, 4.f, 2.f};
......@@ -73,8 +73,8 @@ TEST(Interpolate, Doubles)
TEST(Interpolate, CircularInterpolation)
{
float missingValue = 713.3;
float tolerance = 0.0001;
float missingValue = 713.3f;
float tolerance = 0.0001f;
std::vector<float> baseValues1{1.f, 2.f, 3.f, 4.f, 5.f, 6.f};
std::vector<float> interpValues1{90.f, missingValue, 270.f,
......@@ -92,7 +92,7 @@ TEST(Interpolate, CircularInterpolation)
TEST(Interpolate, FillInBeginning)
{
float missingValue = -9999.f;
float tolerance = 0.0001;
float tolerance = 0.0001f;
std::vector<float> baseValues1{12.f, 23.f, 100.f, 100.f};
std::vector<float> interpValues1{missingValue, missingValue, 103.23f, 200.2f};
......@@ -109,7 +109,7 @@ TEST(Interpolate, FillInBeginning)
TEST(Interpolate, FillInEnd)
{
float missingValue = -9999.f;
float tolerance = 0.0001;
float tolerance = 0.0001f;
std::vector<float> baseValues1{12.f, 23.f, 100.f, 100.f};
std::vector<float> interpValues1{103.23f, 200.2f, missingValue, missingValue};
......@@ -126,7 +126,7 @@ TEST(Interpolate, FillInEnd)
TEST(Interpolate, NewBaseValues)
{
float missingValue = -9999.f;
float tolerance = 0.0001;
float tolerance = 0.0001f;
std::vector<float> baseValues1{1000.f, 2000.f, 3000.f};
std::vector<float> newBaseValues1{500.f, 1500.f, 2500.f, 3500.f};
......@@ -158,7 +158,7 @@ TEST(Interpolate, NewBaseValues)
std::vector<float> testValues2 =
interpolateToOtherBaseValues(baseValues2, newBaseValues2, interpValues2);
ASSERT_EQ(expectValues2.size(), testValues2.size());
for (int i = 0; i < testValues2.size(); ++i)
for (size_t i = 0; i < testValues2.size(); ++i)
{
EXPECT_NEAR(expectValues2[i], testValues2[i], expectValues2[i] * tolerance);
}
......
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