From ba854a588d40e79b0870175c15326b4acbfb8e20 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Fri, 18 Oct 2024 09:48:43 +0200 Subject: [PATCH] test nothing. --- test/usecases/suffix/suffix_nothing.mod | 11 +++++++++++ test/usecases/suffix/suffix_nothing_again.mod | 7 +++++++ test/usecases/suffix/test_suffix_nothing.py | 12 ++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 test/usecases/suffix/suffix_nothing.mod create mode 100644 test/usecases/suffix/suffix_nothing_again.mod create mode 100644 test/usecases/suffix/test_suffix_nothing.py diff --git a/test/usecases/suffix/suffix_nothing.mod b/test/usecases/suffix/suffix_nothing.mod new file mode 100644 index 000000000..b4bd9cf7f --- /dev/null +++ b/test/usecases/suffix/suffix_nothing.mod @@ -0,0 +1,11 @@ +NEURON { + SUFFIX nothing +} + +FUNCTION forty_two_plus_x(x) { + forty_two_plus_x = 42.0 + x +} + +FUNCTION twice_forty_two_plus_x(x) { + twice_forty_two_plus_x = 2.0 * forty_two_plus_x(x) +} diff --git a/test/usecases/suffix/suffix_nothing_again.mod b/test/usecases/suffix/suffix_nothing_again.mod new file mode 100644 index 000000000..7054e5dac --- /dev/null +++ b/test/usecases/suffix/suffix_nothing_again.mod @@ -0,0 +1,7 @@ +NEURON { + SUFFIX nothing +} + +FUNCTION forty_three() { + forty_three = 43.0 +} diff --git a/test/usecases/suffix/test_suffix_nothing.py b/test/usecases/suffix/test_suffix_nothing.py new file mode 100644 index 000000000..9cbc6d846 --- /dev/null +++ b/test/usecases/suffix/test_suffix_nothing.py @@ -0,0 +1,12 @@ +from neuron import h, gui + + +def test_nothing(): + x = 15.0 + assert h.forty_two_plus_x(x) == 42.0 + x + assert h.twice_forty_two_plus_x(x) == 2.0 * (42.0 + x) + assert h.forty_three() == 43.0 + + +if __name__ == "__main__": + test_nothing()