Skip to content
Snippets Groups Projects
Commit 99cd3fc1 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[test.grid-function] extend

parent 87c8fc32
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,21 @@ ...@@ -17,6 +17,21 @@
#include <dune/xt/functions/grid-function.hh> #include <dune/xt/functions/grid-function.hh>
GTEST_TEST(ScalarGridFunction, constructible_from_grid_function_rvalueref)
{
using namespace Dune;
using namespace Dune::XT::Functions;
using G = CUBEGRID_2D;
using E = XT::Grid::extract_entity_t<G>;
const GenericGridFunction<E> scalar_grid_function{0, [](auto&) {}, [](auto&, auto&) { return 1.; }, {}, "THE_NAME"};
GridFunction<E> func{scalar_grid_function};
EXPECT_EQ(std::string("THE_NAME"), func.name());
} // GTEST_TEST(ScalarGridFunction, constructible_from_grid_function_rvalueref)
GTEST_TEST(MatrixGridFunction, constructible_from_scalar_grid_function_rvalueref) GTEST_TEST(MatrixGridFunction, constructible_from_scalar_grid_function_rvalueref)
{ {
using namespace Dune; using namespace Dune;
...@@ -25,7 +40,7 @@ GTEST_TEST(MatrixGridFunction, constructible_from_scalar_grid_function_rvalueref ...@@ -25,7 +40,7 @@ GTEST_TEST(MatrixGridFunction, constructible_from_scalar_grid_function_rvalueref
using G = CUBEGRID_2D; using G = CUBEGRID_2D;
using E = XT::Grid::extract_entity_t<G>; using E = XT::Grid::extract_entity_t<G>;
const GenericGridFunction<E> scalar_grid_function{0}; const GenericGridFunction<E> scalar_grid_function{0, [](auto&) {}, [](auto&, auto&) { return 1.; }, {}, "THE_NAME"};
GridFunction<E, 2, 2> DXTC_UNUSED(func){scalar_grid_function}; GridFunction<E, 2, 2> DXTC_UNUSED(func){scalar_grid_function};
} // GTEST_TEST(MatrixGridFunction, constructible_from_scalar_grid_function_rvalueref) } // GTEST_TEST(MatrixGridFunction, constructible_from_scalar_grid_function_rvalueref)
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