summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci4
-rw-r--r--tests/unit_tests/test_double_Length.sci32
-rw-r--r--tests/unit_tests/test_double_Type.sci8
3 files changed, 42 insertions, 2 deletions
diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
index 1eca0f30..970e033c 100644
--- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
+++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
@@ -1433,12 +1433,12 @@ PrintStringInfo('g2'+ArgSeparator+'s0',ClassFileName,'file','y');
PrintStringInfo('g2'+ArgSeparator+'d0',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
-FunctionName = 'length';
+FunctionName = 'length'; // AS : done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'both','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-FunctionName = 'type';
+FunctionName = 'type'; // AS : done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'both','y');
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
diff --git a/tests/unit_tests/test_double_Length.sci b/tests/unit_tests/test_double_Length.sci
new file mode 100644
index 00000000..8e8a8c52
--- /dev/null
+++ b/tests/unit_tests/test_double_Length.sci
@@ -0,0 +1,32 @@
+function test_double_Length()
+ disp(length(4));
+ disp(length(2+3*%i));
+ disp(length([1 2 3 ; 4 5 6]));
+ disp(length([1 2 3 ; 4 5 6]*%i));
+ e = %pi ;
+ disp(length(e)); // d0Lengthd0
+
+ f = e * %i;
+ disp(length(f));// z0Lengthd0
+
+ a = [1 2 3 ; 4 5 6];
+ disp(length(a));// d2Lengthd0
+
+ b = [1 2 3 ; 4 5 6] * %i;
+ disp(length(b));// z2Lengthd0
+
+
+ g = "pouet" ;
+ h = "a" ;
+
+ disp(length(g)); // g0Lengthd0
+ disp(length(h)); // g2Lengthd0
+
+ disp(length("pouet"));
+ disp(length("a"));
+
+
+
+
+
+endfunction
diff --git a/tests/unit_tests/test_double_Type.sci b/tests/unit_tests/test_double_Type.sci
new file mode 100644
index 00000000..4585c65d
--- /dev/null
+++ b/tests/unit_tests/test_double_Type.sci
@@ -0,0 +1,8 @@
+function test_double_Type()
+
+ disp(type(%pi));
+ disp(type(%pi + %i));
+ disp(type([%pi 4]));
+ disp(type([%pi %i]));
+
+endfunction