-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw exception when connecting fails #693
Changes from 2 commits
89e46b8
699102f
86dc491
10b43d1
afb5531
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,11 +68,6 @@ n2 d4 << /weight 1. >> Connect | |
[g5 g5] [n1] Connect | ||
g5 n3 << /weight 1. >> Connect | ||
|
||
% device-device; but g5g5 should be ignored | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why did you remove this whole block? I think the connection g5 -> g4 is still valid, and actually created, so I would suggest just removing the first line ( |
||
[g5 g5] [d4 g5] /one_to_one Connect | ||
[g5 g5] [d4] Connect | ||
g5 d4 << /weight 1. >> Connect | ||
|
||
% neuron-globally receiving device (volume transmitter) | ||
n1 v6 Connect | ||
n2 v6 Connect | ||
|
@@ -83,7 +78,6 @@ n2 v6 Connect | |
/target_conn <[1 3 1] [2 3 1] [2 1 1] [3 1 1] [2 1 1] % neuron-neuron | ||
[1 4 1] [1 3 1] [2 4 0] [3 4 1] [2 4 0] % neuron-device | ||
[5 2 0] [5 3 1] [5 1 1] [5 1 1] [5 3 1] % device-neuron | ||
[5 4 0] [5 4 0] [5 4 0] [5 4 0] % device-device | ||
[1 6 0] [1 6 1] [2 6 0] [2 6 1]> def % neuron-globally receiving device | ||
|
||
conn { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,3 +177,52 @@ ResetKernel | |
Last /target get 6 eq assert_or_die | ||
|
||
} forall | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe it would make sense to get all devices from the modeldict and loop through all possible combinations instead of listing them manually here? this would avoid the need to add new tests here upon adding a new device and make sure that we do not forget a certain combination. |
||
(Running Connect tests with illegal combinations) = | ||
ResetKernel | ||
/generator /poisson_generator Create def | ||
/multimeter /multimeter Create def | ||
/recordable /iaf_psc_alpha Create def | ||
|
||
{ | ||
generator generator Connect | ||
} fail_or_die | ||
|
||
% removing items on stack | ||
pop pop pop pop | ||
|
||
{ | ||
generator multimeter Connect | ||
} fail_or_die | ||
|
||
% removing items on stack | ||
pop pop pop pop | ||
|
||
{ | ||
% recordable -> multimeter | ||
recordable multimeter Connect | ||
} fail_or_die | ||
|
||
% removing items on stack | ||
pop pop pop pop | ||
|
||
{ | ||
recordable generator Connect | ||
} fail_or_die | ||
|
||
% removing items on stack | ||
pop pop pop pop | ||
|
||
{ | ||
multimeter multimeter Connect | ||
} fail_or_die | ||
|
||
% removing items on stack | ||
pop pop pop pop | ||
|
||
{ | ||
multimeter generator Connect | ||
} fail_or_die | ||
|
||
% removing items on stack | ||
pop pop pop pop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we throw a similar error in line546?