/*
 *  ticket-777.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-777 - SLI conditional jump typecheck bool arg

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

Description:
Ensure that conditional jump instructions only accept /booltype as condition (as expected by the PostScript reference).

Author: Mikael Naveau, 2013-10-17
 */

(unittest) run
/unittest using

M_ERROR setverbosity

%% each test ensure that the conditional instruction fails if the condition is not a boolean

%% insert here each datatype you want to test
/tested_type [0 1.0 (hello) [] << >>] def

tested_type
{
/condition Set

%% if
{condition {} if}
({/) condition type cvs join ( /proc if} should not be allowed) join fail_or_die

%% elseif
{condition {} {} elseif}
({/) condition type cvs join ( /proc1 /proc2 elseif} should not be allowed) join fail_or_die

} forall %% tested_type
