Skip to content

Commit

Permalink
Test VERBATIM globals.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Sep 19, 2024
1 parent 40cad46 commit b986231
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/usecases/verbatim/globals.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
NEURON {
SUFFIX globals
GLOBAL gbl
}

ASSIGNED {
gbl
}

FUNCTION get_gbl() {
VERBATIM
_lget_gbl = gbl;
ENDVERBATIM
}
13 changes: 13 additions & 0 deletions test/usecases/verbatim/test_globals.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from neuron import h, gui

def test_globals():
s = h.Section()
s.insert("globals")

h.gbl_globals = 654.0

assert h.globals.get_gbl() == h.gbl


if __name__ == "__main__":
test_globals()

0 comments on commit b986231

Please sign in to comment.