diff --git a/src/codegen/codegen_neuron_cpp_visitor.cpp b/src/codegen/codegen_neuron_cpp_visitor.cpp index a6fcce801..49f345367 100644 --- a/src/codegen/codegen_neuron_cpp_visitor.cpp +++ b/src/codegen/codegen_neuron_cpp_visitor.cpp @@ -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(); diff --git a/test/usecases/verbatim/nothing.mod b/test/usecases/verbatim/nothing.mod new file mode 100644 index 000000000..e100e9ddb --- /dev/null +++ b/test/usecases/verbatim/nothing.mod @@ -0,0 +1,11 @@ +NEURON { SUFFIX nothing } + +VERBATIM +double foo = 42.0; +ENDVERBATIM + +FUNCTION get_foo() { +VERBATIM + return foo; +ENDVERBATIM +} diff --git a/test/usecases/verbatim/test_nothing.py b/test/usecases/verbatim/test_nothing.py new file mode 100644 index 000000000..ee4fb2cf5 --- /dev/null +++ b/test/usecases/verbatim/test_nothing.py @@ -0,0 +1,9 @@ +from neuron import h, gui + +def test_nothing(): + assert h.get_foo() == 42.0 + +if __name__ == "__main__": + test_nothing() + +