/*
 *  ticket-643.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/>.
 *
 */

/*
   Test for Ticket 643.

   This test verifies that:

   If connection counts sometimes become zero due to
   incorrect counting, min_delay / max_delay get computed wrongly and the
   things tentatively called ring buffers are not allocated
   correctly. Subsequently, an out of bounds access crashes the
   simulation.

*/

(unittest) run
/unittest using

0 <<
/print_time true
/local_num_threads 256
>> SetStatus

/id_neuron /iaf_neuron 1 Create def
/id_generator /noise_generator 1 Create def

id_generator <<
/mean 200.0
/std 100.0
/dt 1.0
>> SetStatus

id_generator id_neuron Connect

1 Simulate
