Skip to content

Commit

Permalink
test for error in compartment synapses
Browse files Browse the repository at this point in the history
  • Loading branch information
pmendes committed May 24, 2024
1 parent dc46434 commit be117f6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/0504_CompartmentSynapse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 0504_CompartmentSynapse

attempting to create a set of compartments connected by chemical synapses

## tests

- 1D, 3 units, network, synaptic connection compartment ODE
23 changes: 23 additions & 0 deletions tests/0504_CompartmentSynapse/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# work out our folder name
test=${PWD##*/} # to assign to a variable
test=${test:-/} # to correct for the case where PWD=/

fail=0

# run sbmodelr
../../sbmodelr -s blob -n ../sources/1to2to3.gv ../sources/blob.cps 3 > output

# check that the an error is issued
if ! grep -q "ERROR: blob is a compartment ODE, but compartments cannot have synaptic links" output; then
printf 'FAIL %s\n' "${test}"
let "fail = 1"
fi

if [ "$fail" = 0 ] ; then
printf 'PASS %s\n' "${test}"
rm output
fi

exit $fail

0 comments on commit be117f6

Please sign in to comment.