From 47036196e94e57a6ee785d16748e768be380760f Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 17 Jul 2009 13:03:35 +0000 Subject: added test for trace function updated INIT_FillSCI2LibCDirs --- macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci | 6 +++--- tests/unit_tests/test_double_Trace.sci | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 tests/unit_tests/test_double_Trace.sci diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index d458eafd..4f1df8cd 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -1687,14 +1687,14 @@ PrintStringInfo('c2'+ArgSeparator+'c0',ClassFileName,'file','y'); PrintStringInfo('z2'+ArgSeparator+'z0',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- -FunctionName = 'trace'; +FunctionName = 'trace'; // AS : Done PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'both','y'); INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); //NUT det is a little bit complex but for the moment we assume that //NUT that det works as trace function. -FunctionName = 'det'; +FunctionName = 'det'; // PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'both','y'); INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); @@ -1805,7 +1805,7 @@ PrintStringInfo('z2d2d0d2'+ArgSeparator,ClassFileName,'file','y'); PrintStringInfo('z2d2d2d2'+ArgSeparator,ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- -FunctionName = 'OpIns'; +FunctionName = 'OpIns'; // 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_Trace.sci b/tests/unit_tests/test_double_Trace.sci new file mode 100644 index 00000000..722c75a5 --- /dev/null +++ b/tests/unit_tests/test_double_Trace.sci @@ -0,0 +1,13 @@ +function test_double_Trace() + + a = [1 2 3; 4 %pi 5; 4.5 -3 2]; + disp(trace(a)); + + b = %i * [1 2 3; 4 %pi 5; 4.5 -3 2]; + disp(trace(b)); + + + disp(trace(5)); + + disp(trace(%i)); +endfunction -- cgit