1#include <gtest/gtest.h>
13 char** argv =
nullptr;
14 ippl::initialize(argc, argv);
188 std::ostringstream oss;
190 std::string output = oss.str();
192 EXPECT_NE(output.find(
"BCHandler<3>"), std::string::npos);
193 EXPECT_NE(output.find(
"OPEN"), std::string::npos);
199 std::ostringstream oss;
201 std::string output = oss.str();
203 EXPECT_NE(output.find(
"BCHandler<3>"), std::string::npos);
204 EXPECT_NE(output.find(
"OPEN"), std::string::npos);
205 EXPECT_NE(output.find(
"PERIODIC"), std::string::npos);
206 EXPECT_NE(output.find(
"DIRICHLET"), std::string::npos);
212 std::ostringstream oss;
214 std::string output = oss.str();
216 EXPECT_NE(output.find(
"["), std::string::npos);
217 EXPECT_NE(output.find(
"]"), std::string::npos);
223 std::ostringstream oss;
225 std::string output = oss.str();
227 EXPECT_NE(output.find(
"BCHandler<1>"), std::string::npos);
233 std::ostringstream oss;
235 std::string output = oss.str();
237 EXPECT_NE(output.find(
"BCHandler<2>"), std::string::npos);
250 SUCCEED() <<
"toIPPLBConds() is hopefully tested indirectly through"
251 " FieldContainer and FieldSolver integration tests.";
272 std::ostringstream oss1, oss2;
276 EXPECT_EQ(oss1.str(), oss2.str());
294 FAIL() <<
"Expected OpalException to be thrown";
296 std::string msg = e.what();
297 EXPECT_NE(msg.find(
"Unknown boundary condition type"), std::string::npos);
TEST_F(BCHandlerTest, EnumValues)
static void TearDownTestSuite()
static void SetUpTestSuite()
Handler for boundary conditions per spatial dimension.
bool isAllEqual() const
Check whether all stored BCs are equal (all the same value).
static BCType strToBCType(const std::string &str)
Convert a textual boundary-condition name to BCType enum.
bool isAll(BCType bc_type) const
Return true if every stored BC equals bc_type.