1 #include <../../nrnconf.h>
6 #include <catch2/catch_test_macros.hpp>
15 TEST_CASE(
"Cover #2675 ivoc/symdir.cpp",
"[SymDirectory]") {
18 "// Create a POINT_PROCESS sufficient to cover SymDirectoryImpl::load_mechanism\n"
19 "begintemplate Mech1\n"
21 " double b[3], c[8]\n"
24 "make_mechanism(\"mech1\", \"Mech1\")\n"
28 "ic = new IClamp(.5) // just to cover one line.\n",
30 std::string parent_path{
""};
33 auto symdir =
new SymDirectory(parent_path,
nullptr, somasym, 0, 0);
34 for (
int i = 0;
i < symdir->count(); ++
i) {
35 printf(
"%d %s\n",
i, symdir->name(
i).c_str());
37 REQUIRE(symdir->count() == 10);
38 REQUIRE(symdir->name(4) ==
"c_mech1[all]( 0.5 )");
40 REQUIRE(
hoc_valid_stmt(
"objref ic\nsoma { delete_section() }",
nullptr) == 1);
TEST_CASE("Cover #2675 ivoc/symdir.cpp", "[SymDirectory]")
bool hoc_valid_stmt(const char *, Object *)
Symbol * hoc_lookup(const char *)
HOC interpreter function declarations (included by hocdec.h)