* Bug #7769 fixed - get_function_path didn't have an unit test. 02/10402/2
Charlotte HECQUET [Wed, 6 Feb 2013 09:49:31 +0000 (10:49 +0100)]
Change-Id: I71983fd3345b0a87849f4e6a461a1b88907f8d9d

scilab/CHANGES_5.4.X
scilab/modules/functions/tests/unit_tests/get_function_path.dia.ref [new file with mode: 0644]
scilab/modules/functions/tests/unit_tests/get_function_path.tst [new file with mode: 0644]

index 079cb33..2de187e 100644 (file)
@@ -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 (file)
index 0000000..36f896d
--- /dev/null
@@ -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 (file)
index 0000000..6813419
--- /dev/null
@@ -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);