2 * test2300 - 2300 series of the regress.cal test suite
4 * Copyright (C) 1999 Landon Curt Noll
6 * Calc is open software; you can redistribute it and/or modify it under
7 * the terms of the version 2.1 of the GNU Lesser General Public License
8 * as published by the Free Software Foundation.
10 * Calc is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
13 * Public License for more details.
15 * A copy of version 2.1 of the GNU Lesser General Public License is
16 * distributed with calc under the filename COPYING-LGPL. You should have
17 * received a copy with calc; if not, write to Free Software Foundation, Inc.
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * @(#) $Revision: 30.1 $
21 * @(#) $Id: test2300.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
22 * @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test2300.cal,v $
24 * Under source code control: 1995/07/09 06:12:13
25 * File existed as early as: 1995
27 * chongo <was here> /\oo/\ http://www.isthe.com/chongo/
28 * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
36 * matrix_inc - increment the matrix inside the object
42 /* increment each matrix member */
43 for (i= 0; i < size(a.m); i++)
49 * matrix_dec - decrement the matrix inside the object
55 /* decrement each matrix member */
56 for (i= 0; i < size(a.m); i++)
62 * mkmat - load the matrix inside the object
71 quit "Need at least one argument";
73 /* create the matrix */
76 /* load the matrix with the args */
77 for (i = 0; i < s; i++)
80 /* create the object with the matrix */
87 * ckmat - check if the matrix inside an object has a set of given values
96 quit "Need at least two arguments";
98 /* get the object to test */
101 /* verify the matrix in the object is the right size */
102 if (size(a.m) != s-1) {
106 /* check each matrix element with the args passed */
107 for (i = 2; i <= s; i++) {
108 if (a.m[i-2] != param(i)) {
109 /* args do not match */
114 /* args match the matrix in the object */