1 // <-- Non-regression test for bug 614 -->
3 // <-- Bugzilla URL -->
4 // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=614
6 // <-- Short Description -->
7 // mxGetDimensions() from mex.h and mexlib.c do not work
8 // properly. The reason is that it returns a pointer to int
9 // like Matlab, but in fact, the dimensions in scilab are in
12 // Also occur in other OS's.
15 // Scilab Project - Serge Steer
16 // Copyright INRIA 2006
17 // Date : 10 janvier 2006
19 my_current_direcory = pwd();
22 mputl('ilib_mex_build(''libmex'',[''mexf16'',''mexfunction16'',''cmex''],[],[],''Makelib'','''','''','''')','builder.sce')
26 'void mexFunction(nlhs, plhs, nrhs, prhs)'
28 ' mxArray *plhs[]; mxArray *prhs[];'
30 ' int *dims = mxGetDimensions(prhs[0]);'
31 ' sciprint(""%d %d %d\n"",dims[0],dims[1],dims[2]);'
35 exec(TMPDIR+'/builder.sce');
36 exec(TMPDIR+'/loader.sce');
42 dia = mgetl('bug614.dia');
43 cd(my_current_direcory)
45 if find(dia == "2 3 2") == [] then pause,end