1/* 2 * ticket-785.sli 3 * 4 * This file is part of NEST. 5 * 6 * Copyright (C) 2004 The NEST Initiative 7 * 8 * NEST is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * NEST is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with NEST. If not, see <http://www.gnu.org/licenses/>. 20 * 21 */ 22 23/** @BeginDocumentation 24 25Name: testsuite::ticket-785 - fail_or_die inconsistenly reports errors 26 27Synopsis: (ticket-785) run -> NEST exits if test fails 28 29Description: 30Test that fail_or_die reports errors consistently. There are two calls to fail_or_die. The first one passes, the second one fails to pass. 31 32Author: Marc-Oliver Gewaltig, 2013-12-25 33 */ 34 35(unittest) run 36/unittest using 37 38{ 1 div } fail_or_die % this one works 39clear 40 41% the next test shows that {1 neq} produces an error 42{1 neq } stopped {errordict /newerror false put} { 3 quit_i } ifelse 43clear 44 45% the next test shows that the error is not caught by fail_or_die 46{ 1 neq } fail_or_die % this one breaks 47 48 49 50