Skip to content

Commit

Permalink
Check top-level VERBATIM in SUFFIX nothing.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Oct 31, 2024
1 parent 220712e commit c779d53
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/codegen/codegen_neuron_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2677,6 +2677,7 @@ void CodegenNeuronCppVisitor::print_codegen_routines_nothing() {
print_headers_include();
print_namespace_start();
print_function_prototypes();
print_top_verbatim_blocks();
print_global_variables_for_hoc();
print_function_definitions();
print_mechanism_register();
Expand Down
11 changes: 11 additions & 0 deletions test/usecases/verbatim/nothing.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
NEURON { SUFFIX nothing }

VERBATIM
double foo = 42.0;
ENDVERBATIM

FUNCTION get_foo() {
VERBATIM
return foo;
ENDVERBATIM
}
9 changes: 9 additions & 0 deletions test/usecases/verbatim/test_nothing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from neuron import h, gui

def test_nothing():
assert h.get_foo() == 42.0

if __name__ == "__main__":
test_nothing()


0 comments on commit c779d53

Please sign in to comment.