/*
 *  ticket-926.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-926 Ensure stdp_dopamine_synapse does not lead to segfault

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

Description:
This ticket ensures that stdp_dopamine_synapse does not lead to a segfault, even
if volume transmitter is not set.

Author: Hans Ekkehard Plesser, 2014-11-12
 */

% preparatory work for proper test code in case NEST is complied with MPI support
% For now we just ignore this test, this will later be replaced 
% by a restart of NEST with a serial binary.
statusdict/is_mpi :: {statusdict/exitcodes/success :: quit_i} if


(unittest) run
/unittest using

M_ERROR setverbosity

% the following code must execute without causing a segmentation fault
{ 
  /sg /spike_generator << /spike_times [ 5.0 ] >> Create def
  /pn /parrot_neuron Create def
  /nrn /iaf_neuron Create def 
  sg pn Connect
  pn nrn /stdp_dopamine_synapse Connect
  10 Simulate
} passorfailbutnocrash_or_die



endusing