summaryrefslogtreecommitdiffstats
path: root/scilab/modules/javasci
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-01-07 09:10:30 +0100
committerAllan CORNET <allan.cornet@scilab.org>2010-01-07 09:10:30 +0100
commit3e0a8bce9711741bf197e7a0a0eca2fae312eea5 (patch)
tree8903e84ffbae10d1846e70ad427f79963e2a2b9e /scilab/modules/javasci
parent64c76c5899c57af2872ab7b3ba3a1ef21fc47378 (diff)
parent474c9494856c6e2fff3fcc2087c2479b011ba39e (diff)
downloadscilab-3e0a8bce9711741bf197e7a0a0eca2fae312eea5.zip
scilab-3e0a8bce9711741bf197e7a0a0eca2fae312eea5.tar.gz
Merge commit 'refs/remotes/origin/5.2'
Diffstat (limited to 'scilab/modules/javasci')
-rw-r--r--scilab/modules/javasci/src/c/javasci_SciAbstractArray.c11
-rw-r--r--scilab/modules/javasci/tests/nonreg_tests/bug_6388.dia.ref21
-rw-r--r--scilab/modules/javasci/tests/nonreg_tests/bug_6388.java26
-rw-r--r--scilab/modules/javasci/tests/nonreg_tests/bug_6388.tst13
4 files changed, 67 insertions, 4 deletions
diff --git a/scilab/modules/javasci/src/c/javasci_SciAbstractArray.c b/scilab/modules/javasci/src/c/javasci_SciAbstractArray.c
index d2f4c21..ecb6278 100644
--- a/scilab/modules/javasci/src/c/javasci_SciAbstractArray.c
+++ b/scilab/modules/javasci/src/c/javasci_SciAbstractArray.c
@@ -62,9 +62,11 @@ JNIEXPORT jint JNICALL Java_javasci_SciAbstractArray_getNumberOfRowsFromScilab(J
62 sciErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]); 62 sciErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
63 if(sciErr.iErr) 63 if(sciErr.iErr)
64 { 64 {
65 fprintf(stderr,"%s", getErrorMessage(sciErr)); 65 // bug 6388
66 // fprintf(stderr,"%s", getErrorMessage(sciErr));
67 // fprintf(stderr,"Error in Java_javasci_SciAbstractArray_Get (1).\n");
66 (*env)->ReleaseStringUTFChars(env, name , cname); 68 (*env)->ReleaseStringUTFChars(env, name , cname);
67 fprintf(stderr,"Error in Java_javasci_SciAbstractArray_Get (1).\n"); 69
68 return -1; 70 return -1;
69 } 71 }
70 72
@@ -92,9 +94,10 @@ JNIEXPORT jint JNICALL Java_javasci_SciAbstractArray_getNumberOfColsFromScilab(J
92 sciErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]); 94 sciErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
93 if(sciErr.iErr) 95 if(sciErr.iErr)
94 { 96 {
95 fprintf(stderr,"%s", getErrorMessage(sciErr)); 97 // bug 6388
98 // fprintf(stderr,"%s", getErrorMessage(sciErr));
99 // fprintf(stderr,"Error in Java_javasci_SciAbstractArray_Get (1).\n");
96 (*env)->ReleaseStringUTFChars(env, name , cname); 100 (*env)->ReleaseStringUTFChars(env, name , cname);
97 fprintf(stderr,"Error in Java_javasci_SciAbstractArray_Get (1).\n");
98 return -1; 101 return -1;
99 } 102 }
100 103
diff --git a/scilab/modules/javasci/tests/nonreg_tests/bug_6388.dia.ref b/scilab/modules/javasci/tests/nonreg_tests/bug_6388.dia.ref
new file mode 100644
index 0000000..244cf05
--- /dev/null
+++ b/scilab/modules/javasci/tests/nonreg_tests/bug_6388.dia.ref
@@ -0,0 +1,21 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Allan CORNET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7java_file_to_test = "bug_6388.java";
8my_test_path = pathconvert(SCI+"/modules/javasci/tests/nonreg_tests",%f,%f);
9my_file_path = pathconvert(my_test_path+"/"+java_file_to_test,%f,%f);
10exec (my_test_path+"/test_java.sci",-1);
11if test_java(my_file_path) <> %T then bugmes();quit;end;
12
13!Name: v !
14! !
15!Value: 2.0 !
16! !
17!double v= !
18! !
19! !
20! !
21! 2. !
diff --git a/scilab/modules/javasci/tests/nonreg_tests/bug_6388.java b/scilab/modules/javasci/tests/nonreg_tests/bug_6388.java
new file mode 100644
index 0000000..0becaea
--- /dev/null
+++ b/scilab/modules/javasci/tests/nonreg_tests/bug_6388.java
@@ -0,0 +1,26 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2010 - DIGITEO - Allan CORNET
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 *
11 */
12
13import javasci.* ;
14class bug_6388 {
15
16 public static void main(String[] args) {
17 SciDouble U=new SciDouble("u",1.0);
18 SciDouble V=new SciDouble("v");
19 Scilab.Exec("v = u + 1;");
20 System.out.println("Name: " + V.getName());
21 System.out.println("Value: " + V.getData());
22 V.disp();
23 Scilab.Finish();
24 }
25}
26
diff --git a/scilab/modules/javasci/tests/nonreg_tests/bug_6388.tst b/scilab/modules/javasci/tests/nonreg_tests/bug_6388.tst
new file mode 100644
index 0000000..2f50281
--- /dev/null
+++ b/scilab/modules/javasci/tests/nonreg_tests/bug_6388.tst
@@ -0,0 +1,13 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Allan CORNET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8java_file_to_test = "bug_6388.java";
9
10my_test_path = pathconvert(SCI+"/modules/javasci/tests/nonreg_tests",%f,%f);
11my_file_path = pathconvert(my_test_path+"/"+java_file_to_test,%f,%f);
12exec (my_test_path+"/test_java.sci",-1);
13if test_java(my_file_path) <> %T then pause,end;