/*
 *  ticket-689.sli
 *
 *  This file is part of NEST.
 *
 *  Copyright (C) 2004 The NEST Initiative
 *
 *  NEST is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  NEST is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

/* BeginDocumentation

Name: testsuite::ticket-689 - GetConnections throws Segmentation Fault if hpc_synapses are used.

Synopsis: (ticket-689) run -> NEST exits if test fails

Description: 
Ensure that GetConnections works with hpc synapses. Script creates 2 neurons, connects them 
with an hpc synapse and tests whether GetConnections retrieves 1 connection without crashing.
 
Author: Susanne Kunkel, Maximilian Schmidt, 2012-02-19
 */

(unittest) run
/unittest using

M_ERROR setverbosity

0
<<
  /total_num_virtual_procs 1
>> SetStatus

/iaf_neuron 2 Create
1 2 /stdp_pl_synapse_hom_hpc Connect

{
  <<  /target [2] >> GetConnections Flatten length 1 eq
} assert_or_die

endusing
