/*
 *  test_cva.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_cva - check if cva function works

Synopsis: (test_cva) run -> 

Description:

Tests basic properties of cva. Note that the tests
are directly compiled from 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:  130603, Diesmann
SeeAlso: cva
*/

(unittest) run
/unittest using

M_ERROR setverbosity

<< /a 1 /b 2>> cva          [/a 1 /b 2] eq           assert_or_die
/square trie [/doubletype] { dup mul } addtotrie exch pop cva [/doubletype [{dup mul}]] eq assert_or_die
[ << /a 1 >> << /b 2>>] cva [[/a 1] [/b 2]] eq       assert_or_die
[1 3 -5 2] cv_iv cva        [1 3 -5 2] eq            assert_or_die
[1. 3. -5. 2.] cv_dv cva    [1. 3. -5. 2.] eq        assert_or_die
[2 10] RangeIterator cva    [2 3 4 5 6 7 8 9 10] eq  assert_or_die

