Skip to content
Snippets Groups Projects
Commit 50667b7e authored by webmanue's avatar webmanue
Browse files

explictly construct std::function in test

parent fa166e71
No related branches found
No related tags found
No related merge requests found
Pipeline #80082 passed
......@@ -61,11 +61,13 @@ TYPED_TEST(createVectorFromSource_Test, creates_correct_vector_with_two_dofs) {
constexpr auto dofs = size_type{2};
constexpr value_type increment = .1;
using DataSource = std::function<void(size_type, value_type *)>;
const auto result = createVectorFromSource(
this->mesh, dofs, [](const size_type index, value_type *const data) {
this->mesh, dofs,
DataSource([](const size_type index, value_type *const data) {
data[0] = static_cast<value_type>(index);
data[1] = static_cast<value_type>(index) + increment;
});
}));
ASSERT_THAT(result.unwrap(), SizeIs(dofs * this->numberOfVertices));
EXPECT_THAT(result.unwrap(), AlmostEqIfLocal(0, 0.));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment