/* * test_copymodel.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::test_copymodel - sli script to test if CopyModel works as expected Synopsis: (test_copymodel) run Description: This test generates several copies of node and synapse models, sets their parameters and compares the results for consistency. SeeAlso: CopyModel, GetDefaults, SetDefaults FirstVersion: September 2008 Author: Jochen Martin Eppler */ /unittest (7488) require /unittest using % Checks for consistent operation for node models /iaf_neuron /my_iaf_neuron1 CopyModel /neuron_params << /V_m -66.6 >> def /iaf_neuron /my_iaf_neuron2 neuron_params CopyModel /iaf_neuron GetDefaults /V_m get /my_iaf_neuron1 GetDefaults /V_m get eq assert_or_die /iaf_neuron neuron_params SetDefaults /iaf_neuron GetDefaults /V_m get /my_iaf_neuron2 GetDefaults /V_m get eq assert_or_die % Checks for consistent operation for synapse models /static_synapse /my_static_synapse1 CopyModel /synapse_params << /weight 66.6 >> def /static_synapse /my_static_synapse2 synapse_params CopyModel /static_synapse GetDefaults /weight get /my_static_synapse1 GetDefaults /weight get eq assert_or_die /static_synapse synapse_params SetDefaults /static_synapse GetDefaults /weight get /my_static_synapse2 GetDefaults /weight get eq assert_or_die endusing