/*
 *  test_MapIndexed.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_MapIndexed - check if MapIndexed function works

Synopsis: (test_MapIndexed) run -> 

Description:

Tests whether MapIndexed works, in particular whether indices start
at 1 like in Mathematica. MapIndexed implements a subset of the 
functionality of Mathematica's MapIndexed fundction. 


Author:  130401, Diesmann
SeeAlso: MapIndexed, Map
*/

(unittest) run
/unittest using

M_ERROR setverbosity


[5] Range {eq} MapIndexed true exch {and} Fold   assert_or_die
[1 2 3 4 5]  {add} MapIndexed [2 4 6 8 10] eq    assert_or_die
(abcd) {add} MapIndexed (bdfh) eq                assert_or_die

