/*
 *  test_Map.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_Map - check if Map function works

Synopsis: (test_Map) run -> 

Description:

Tests basic properties of Map. Note that the tests
are directly compiled from the the Examples section of
the documentation which is evaluated by the command 
/validate .
Future versions of NEST should generate this test 
directly from the Examples section.

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

(unittest) run
/unittest using

M_ERROR setverbosity


[1 2 3 4 5]  {2 mul} Map          [2 4 6 8 10]   eq  assert_or_die
[ [3. 4.] [7. 8.] ] {cvi} [2] Map [[3 4] [7 8]]  eq  assert_or_die
[3. 4. 7. 8.] {cvi} [1] Map       [3 4 7 8]      eq  assert_or_die

(abc) {1 add} Map                 (bcd)          eq  assert_or_die



