Skip to content
Snippets Groups Projects
Commit 2080f493 authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Split and rename tests

parent 815ae0c7
No related branches found
No related tags found
1 merge request!229Add some more tests to GridScalingManager and BCKernelManager
...@@ -19,55 +19,85 @@ protected: ...@@ -19,55 +19,85 @@ protected:
} }
}; };
TEST_F(BCKernelManagerTest_BCsNotSpecified, velocityBoundaryConditionPost_NotSpecified) TEST_F(BCKernelManagerTest_BCsNotSpecified, velocityBoundaryConditionPostNotSpecified_noBoundaryNodes_doesNotThrow)
{
para->getParD(0)->velocityBC.numberOfBCnodes = 0;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory));
}
TEST_F(BCKernelManagerTest_BCsNotSpecified, velocityBoundaryConditionPostNotSpecified_withBoundaryNodes_throws)
{ {
para->getParD(0)->velocityBC.numberOfBCnodes = 1; para->getParD(0)->velocityBC.numberOfBCnodes = 1;
EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error); EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error);
para->getParD(0)->velocityBC.numberOfBCnodes = 0; }
TEST_F(BCKernelManagerTest_BCsNotSpecified, noSlipBoundaryConditionPostNotSpecified_noBoundaryNodes_doesNotThrow)
{
para->getParD(0)->noSlipBC.numberOfBCnodes = 0;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); EXPECT_NO_THROW(BCKernelManager(para, &bcFactory));
} }
TEST_F(BCKernelManagerTest_BCsNotSpecified, noSlipBoundaryConditionPost_NotSpecified) TEST_F(BCKernelManagerTest_BCsNotSpecified, noSlipBoundaryConditionPostNotSpecified_withBoundaryNodes_doesNotThrow)
{ {
para->getParD(0)->noSlipBC.numberOfBCnodes = 1; para->getParD(0)->noSlipBC.numberOfBCnodes = 1;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); // no throw, as a default is specified EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); // no throw, as a default is specified
para->getParD(0)->noSlipBC.numberOfBCnodes = 0; }
TEST_F(BCKernelManagerTest_BCsNotSpecified, slipBoundaryConditionPostNotSpecified_noBoundaryNodes_doesNotThrow)
{
para->getParD(0)->slipBC.numberOfBCnodes = 0;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); EXPECT_NO_THROW(BCKernelManager(para, &bcFactory));
} }
TEST_F(BCKernelManagerTest_BCsNotSpecified, slipBoundaryConditionPost_NotSpecified) TEST_F(BCKernelManagerTest_BCsNotSpecified, slipBoundaryConditionPostNotSpecified_withBoundaryNodes_throws)
{ {
para->getParD(0)->slipBC.numberOfBCnodes = 1; para->getParD(0)->slipBC.numberOfBCnodes = 1;
EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error); EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error);
para->getParD(0)->slipBC.numberOfBCnodes = 0; }
TEST_F(BCKernelManagerTest_BCsNotSpecified, pressureBoundaryConditionPreNotSpecified_noBoundaryNodes_doesNotThrow)
{
para->getParD(0)->pressureBC.numberOfBCnodes = 0;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); EXPECT_NO_THROW(BCKernelManager(para, &bcFactory));
} }
TEST_F(BCKernelManagerTest_BCsNotSpecified, pressureBoundaryConditionPre_NotSpecified) TEST_F(BCKernelManagerTest_BCsNotSpecified, pressureBoundaryConditionPreNotSpecified_withBoundaryNodes_throws)
{ {
para->getParD(0)->pressureBC.numberOfBCnodes = 1; para->getParD(0)->pressureBC.numberOfBCnodes = 1;
EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error); EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error);
para->getParD(0)->pressureBC.numberOfBCnodes = 0; }
TEST_F(BCKernelManagerTest_BCsNotSpecified, geometryBoundaryConditionPostNotSpecified_noBoundaryNodes_doesNotThrow)
{
para->getParD(0)->geometryBC.numberOfBCnodes = 0;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); EXPECT_NO_THROW(BCKernelManager(para, &bcFactory));
} }
TEST_F(BCKernelManagerTest_BCsNotSpecified, geometryBoundaryConditionPost_NotSpecified) TEST_F(BCKernelManagerTest_BCsNotSpecified, geometryBoundaryConditionPostNotSpecified_withBoundaryNodes_doesNotThrow)
{ {
para->getParD(0)->geometryBC.numberOfBCnodes = 1; para->getParD(0)->geometryBC.numberOfBCnodes = 1;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); // no throw, as a default is specified EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); // no throw, as a default is specified
para->getParD(0)->geometryBC.numberOfBCnodes = 0; }
TEST_F(BCKernelManagerTest_BCsNotSpecified, stressBoundaryConditionPostNotSpecified_noBoundaryNodes_doesNotThrow)
{
para->getParD(0)->stressBC.numberOfBCnodes = 0;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); EXPECT_NO_THROW(BCKernelManager(para, &bcFactory));
} }
TEST_F(BCKernelManagerTest_BCsNotSpecified, stressBoundaryConditionPost_NotSpecified) TEST_F(BCKernelManagerTest_BCsNotSpecified, stressBoundaryConditionPostNotSpecified_withBoundaryNodes_throws)
{ {
para->getParD(0)->stressBC.numberOfBCnodes = 1; para->getParD(0)->stressBC.numberOfBCnodes = 1;
EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error); EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error);
para->getParD(0)->stressBC.numberOfBCnodes = 0; }
TEST_F(BCKernelManagerTest_BCsNotSpecified, precursorBoundaryConditionPostNotSpecified_noBoundaryNodes_doesNotThrow)
{
para->getParD(0)->precursorBC.numberOfBCnodes = 0;
EXPECT_NO_THROW(BCKernelManager(para, &bcFactory)); EXPECT_NO_THROW(BCKernelManager(para, &bcFactory));
} }
TEST_F(BCKernelManagerTest_BCsNotSpecified, precursorBoundaryConditionPost_NotSpecified) TEST_F(BCKernelManagerTest_BCsNotSpecified, precursorBoundaryConditionPostNotSpecified_withBoundaryNodes_throws)
{ {
para->getParD(0)->precursorBC.numberOfBCnodes = 1; para->getParD(0)->precursorBC.numberOfBCnodes = 1;
EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error); EXPECT_THROW(BCKernelManager(para, &bcFactory), std::runtime_error);
......
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