File: polyExample.tst

package info (click to toggle)
scilab 5.3.3-10
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 330,656 kB
file content (24 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2009-2010 - DIGITEO - Scilab Consortium Operational Team
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================

// <-- JVM NOT MANDATORY -->
ilib_verbose(0);
mkdir(pathconvert(TMPDIR+"/polyExample"));
cd(pathconvert(TMPDIR+"/polyExample"));
copyfile(SCI+"/modules/api_scilab/tests/unit_tests/polyExample.c",pathconvert(TMPDIR+"/polyExample/polyExample.c",%F));
cflags = "-I"+SCI+"/modules/localization/includes";
ilib_build("polyExample",["polyExample","polyExample"],"polyExample.c",[],"","",cflags);
exec("loader.sce");

a = %s;
b = (2 + 3*%i) * %s;
c = [a, 2*a, 3*a;4*a, 5*a, 6*a];
d = [c + c * %i];
if polyExample(a) <> a then pause, end
if polyExample(b) <> b then pause, end
if polyExample(c) <> c then pause, end
if polyExample(d) <> d then pause, end