From: Charlotte HECQUET Date: Wed, 6 Feb 2013 09:49:31 +0000 (+0100) Subject: * Bug #7769 fixed - get_function_path didn't have an unit test. X-Git-Tag: 5.4.1~521 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=a2b61b30cd59e0c54a53c430e1c0f110dcabab7a;hp=141a1779181cbd26ba42f8af0766e0b4eec83287 * Bug #7769 fixed - get_function_path didn't have an unit test. Change-Id: I71983fd3345b0a87849f4e6a461a1b88907f8d9d --- diff --git a/scilab/CHANGES_5.4.X b/scilab/CHANGES_5.4.X index 079cb33..2de187e 100644 --- a/scilab/CHANGES_5.4.X +++ b/scilab/CHANGES_5.4.X @@ -177,6 +177,8 @@ Bug fixes * Bug #7583 fixed - binomial function moved in the distribution function chapter. +* Bug #7769 fixed - get_function_path didn't have an unit test. + * Bug #8213 fixed - geom3d had no examples. * Bug #8395 fixed - dft has been deprecated to fft. diff --git a/scilab/modules/functions/tests/unit_tests/get_function_path.dia.ref b/scilab/modules/functions/tests/unit_tests/get_function_path.dia.ref new file mode 100644 index 0000000..36f896d --- /dev/null +++ b/scilab/modules/functions/tests/unit_tests/get_function_path.dia.ref @@ -0,0 +1,20 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// unit tests for get_function_path() function +// ============================================================================= +assert_checkequal(get_function_path('abcd'),SCI+'/modules/cacsd/macros/abcd.sci'); +assert_checkequal(get_function_path('dae'),SCI+'/modules/differential_equations/macros/dae.sci'); +assert_checkequal(get_function_path('acosd'),SCI+'/modules/elementary_functions/macros/acosd.sci'); +assert_checkequal(get_function_path('dir'),SCI+'/modules/fileio/macros/dir.sci'); +assert_checkequal(get_function_path('get_function_path'),SCI+'/modules/functions/macros/get_function_path.sci'); +assert_checkequal(get_function_path('get_param'),SCI+'/modules/parameters/macros/get_param.sci'); +assert_checkequal(get_function_path('median'),SCI+'/modules/statistics/macros/median.sci'); +assert_checkequal(get_function_path('calendar'),SCI+'/modules/time/macros/calendar.sci'); +assert_checkequal(get_function_path('eigs.sci'),[]); +assert_checkfalse(execstr("get_function_path()","errcatch")==0); +assert_checkfalse(execstr("get_function_path(eigs)","errcatch")==0); diff --git a/scilab/modules/functions/tests/unit_tests/get_function_path.tst b/scilab/modules/functions/tests/unit_tests/get_function_path.tst new file mode 100644 index 0000000..6813419 --- /dev/null +++ b/scilab/modules/functions/tests/unit_tests/get_function_path.tst @@ -0,0 +1,24 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> + +// unit tests for get_function_path() function +// ============================================================================= + +assert_checkequal(get_function_path('abcd'),SCI+'/modules/cacsd/macros/abcd.sci'); +assert_checkequal(get_function_path('dae'),SCI+'/modules/differential_equations/macros/dae.sci'); +assert_checkequal(get_function_path('acosd'),SCI+'/modules/elementary_functions/macros/acosd.sci'); +assert_checkequal(get_function_path('dir'),SCI+'/modules/fileio/macros/dir.sci'); +assert_checkequal(get_function_path('get_function_path'),SCI+'/modules/functions/macros/get_function_path.sci'); +assert_checkequal(get_function_path('get_param'),SCI+'/modules/parameters/macros/get_param.sci'); +assert_checkequal(get_function_path('median'),SCI+'/modules/statistics/macros/median.sci'); +assert_checkequal(get_function_path('calendar'),SCI+'/modules/time/macros/calendar.sci'); + +assert_checkequal(get_function_path('eigs.sci'),[]); +assert_checkfalse(execstr("get_function_path()","errcatch")==0); +assert_checkfalse(execstr("get_function_path(eigs)","errcatch")==0);