Skip to content
Snippets Groups Projects
Commit f4332146 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add tests for DiscreteFunctionDescriptorP0Vector

parent b2cfe7da
No related branches found
No related tags found
1 merge request!89Add missing compatibility check when affecting lists to R^d or R^dxd
......@@ -59,6 +59,7 @@ add_executable (unit_tests
test_DataVariant.cpp
test_Demangle.cpp
test_DiscreteFunctionDescriptorP0.cpp
test_DiscreteFunctionDescriptorP0Vector.cpp
test_DiscreteFunctionType.cpp
test_DoWhileProcessor.cpp
test_EmbeddedData.cpp
......
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_all.hpp>
#include <scheme/DiscreteFunctionDescriptorP0Vector.hpp>
// clazy:excludeall=non-pod-global-static
TEST_CASE("DiscreteFunctionDescriptorP0Vector", "[scheme]")
{
SECTION("type")
{
DiscreteFunctionDescriptorP0Vector descriptor;
REQUIRE(descriptor.type() == DiscreteFunctionType::P0Vector);
{
auto copy = [](const DiscreteFunctionDescriptorP0Vector& d) -> DiscreteFunctionDescriptorP0Vector { return d; };
DiscreteFunctionDescriptorP0Vector descriptor_copy{copy(descriptor)};
REQUIRE(descriptor_copy.type() == DiscreteFunctionType::P0Vector);
}
DiscreteFunctionDescriptorP0Vector descriptor_move{std::move(DiscreteFunctionDescriptorP0Vector{})};
REQUIRE(descriptor_move.type() == DiscreteFunctionType::P0Vector);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment