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

Add tests for DiscreteFunctionDescriptorP0

parent 570ffc0b
No related branches found
No related tags found
1 merge request!89Add missing compatibility check when affecting lists to R^d or R^dxd
......@@ -58,6 +58,7 @@ add_executable (unit_tests
test_CRSMatrix.cpp
test_DataVariant.cpp
test_Demangle.cpp
test_DiscreteFunctionDescriptorP0.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/DiscreteFunctionDescriptorP0.hpp>
// clazy:excludeall=non-pod-global-static
TEST_CASE("DiscreteFunctionDescriptorP0", "[scheme]")
{
SECTION("type")
{
DiscreteFunctionDescriptorP0 descriptor;
REQUIRE(descriptor.type() == DiscreteFunctionType::P0);
{
auto copy = [](const DiscreteFunctionDescriptorP0& d) -> DiscreteFunctionDescriptorP0 { return d; };
DiscreteFunctionDescriptorP0 descriptor_copy{copy(descriptor)};
REQUIRE(descriptor_copy.type() == DiscreteFunctionType::P0);
}
DiscreteFunctionDescriptorP0 descriptor_move{std::move(DiscreteFunctionDescriptorP0{})};
REQUIRE(descriptor_move.type() == DiscreteFunctionType::P0);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment