Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit b0835ea

Browse files
committed
functional test: update fload tests to use setAs<>
The tests were using the setAsDouble version instead of the more generic setAs<Double>. Signed-off-by: Kevin Rocard <[email protected]>
1 parent 018de90 commit b0835ea

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

test/functional-tests/FloatingPoint.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,17 @@ SCENARIO_METHOD(FloatsPF, "Floating points", "[floating points]")
159159
{"(inside range)", 0.0f},
160160
}) {
161161
GIVEN ("A valid value " + vec.title) {
162-
CHECK_NOTHROW(handle.setAsDouble(vec.payload));
162+
CHECK_NOTHROW(handle.setAs<double>(vec.payload));
163163
double getValueBack;
164-
REQUIRE_NOTHROW(handle.getAsDouble(getValueBack));
164+
REQUIRE_NOTHROW(getValueBack = handle.getAs<double>());
165165
CHECK(getValueBack == vec.payload);
166166
}
167167
}
168168
for (auto &vec : Tests<float>{
169169
{"(too high)", 12.3f}, {"(too low)", -50.5f},
170170
}) {
171171
GIVEN ("An invalid value " + vec.title) {
172-
CHECK_THROWS_AS(handle.setAsDouble(vec.payload), Exception);
172+
CHECK_THROWS_AS(handle.setAs<double>(vec.payload), Exception);
173173
}
174174
}
175175
}

test/functional-tests/include/ElementHandle.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ class ElementHandle : protected FailureWrapper<::ElementHandle>
8989
{
9090
return mayFailGet(&EH::getAs<T>);
9191
}
92-
/** Wrap EH::setAsDouble to throw an exception on failure. */
93-
void setAsDouble(double value) { mayFailCall(&EH::setAsDouble, value); }
94-
/** Wrap EH::getAsDouble to throw an exception on failure. */
95-
void getAsDouble(double &value) const { mayFailCall(&EH::getAsDouble, value); }
9692

9793
std::string getStructureAsXML() const { return mayFailGet(&EH::getStructureAsXML); }
9894

0 commit comments

Comments
 (0)