Xcos tests: pass blocks_set 49/17049/1
Paul Bignier [Tue, 21 Jul 2015 07:24:03 +0000 (09:24 +0200)]
 * https://codereview.scilab.org/#/c/16756 forgot to deprecate func_block in blocks_set.tst

 * In YaSp, save() supports string arguments

Change-Id: I4319d5c69cbfc88824d095bd22b9fe571c15b5e1

scilab/modules/scicos_blocks/macros/Misc/DEBUG.sci
scilab/modules/xcos/tests/unit_tests/blocks_set.dia.ref
scilab/modules/xcos/tests/unit_tests/blocks_set.tst

index 5aceb38..925ccf5 100644 (file)
@@ -39,10 +39,7 @@ function [x,y,typ]=DEBUG(job,arg1,arg2)
                 tt=["block=debug_scicos(block,flag)"]
 
                 if execstr("deff(tt,txt)","errcatch")==0 then
-                    warnMode = warning("query");
-                    warning("off");
-                    save(TMPDIR+"/debug_scicos", debug_scicos)
-                    warning(warnMode);
+                    save(TMPDIR+"/debug_scicos", "debug_scicos")
                     exprs(2)=txt
                     if (scicos_debug()<>2 & scicos_debug()<>3) then
                         scicos_debug(2)
index c3d37d9..477621b 100644 (file)
@@ -6,34 +6,35 @@
 // ============================================================================
 //
 // <-- ENGLISH IMPOSED -->
+// <-- XCOS TEST -->
 //
 // <-- Short Description -->
 // Blocks must have valid dimensions for their settings.
 // Some dimensions were not coherents between theirs "set" and "define" method.
 defaultlibs = ["Branching",
-               "Electrical",
-               "Hydraulics",
-               "Linear",
-               "Sources",
-               "Misc",
-               "Events",
-               "Integerop",
-               "Matrixop",
-               "Nonlinear",
-               "Sinks",
-               "Threshold"];
+"Electrical",
+"Hydraulics",
+"Linear",
+"Sources",
+"Misc",
+"Events",
+"Integerop",
+"Matrixop",
+"Nonlinear",
+"Sinks",
+"Threshold"];
 defaultlibs  = defaultlibs + "lib";
 notTested = ["DSUPER" "SUPER_f" "TEXT_f" "PAL_f" ,..   // Specific blocks
-            , ..                                       // native blocks
-            "CBLOCK" "CBLOCK4" "c_block" "fortran_block",..
-            ,..                                        // not interface function
-            "WFILE_f", ..                              // Deprecated blocks
-            "vanne_inputs" "vanne_outputs" "vanne_draw_ports" ,..
-            "source_inputs" "source_outputs" "source_draw_ports" ,..
-            "puit_inputs" "puit_outputs" "puit_draw_ports" ,..
-            "bache_inputs" "bache_outputs" "bache_draw_ports" ,..
-            "tkscaleblk", "m_sin", "bplatform2", "anim_pen" ,..
-            "BARXY_sim" ];
+, ..                                       // native blocks
+"CBLOCK" "CBLOCK4" "c_block" "fortran_block",..
+,..                                        // not interface function
+"WFILE_f", "func_block", ..                // Deprecated blocks
+"vanne_inputs" "vanne_outputs" "vanne_draw_ports" ,..
+"source_inputs" "source_outputs" "source_draw_ports" ,..
+"puit_inputs" "puit_outputs" "puit_draw_ports" ,..
+"bache_inputs" "bache_outputs" "bache_draw_ports" ,..
+"tkscaleblk", "m_sin", "bplatform2", "anim_pen" ,..
+"BARXY_sim" ];
 funcprot(0);
 ilib_verbose(0);
 // Stubbing global scicos flags
@@ -48,7 +49,7 @@ for i = 1:size(defaultlibs,"*")
         interfunction = macros(j);
         // Not tested blocks (Xcos customs)
         if or(interfunction == notTested) then
-          continue;
+            continue;
         end
         // Test scs_m = BLOCK("define") then scs_m = BLOCK("set", scs_m)
         [status, message] = xcosValidateBlockSet(interfunction);
index 0c9b00e..1948341 100644 (file)
 // Blocks must have valid dimensions for their settings.
 // Some dimensions were not coherents between theirs "set" and "define" method.
 
-
 defaultlibs = ["Branching",
-               "Electrical",
-               "Hydraulics",
-               "Linear",
-               "Sources",
-               "Misc",
-               "Events",
-               "Integerop",
-               "Matrixop",
-               "Nonlinear",
-               "Sinks",
-               "Threshold"];
+"Electrical",
+"Hydraulics",
+"Linear",
+"Sources",
+"Misc",
+"Events",
+"Integerop",
+"Matrixop",
+"Nonlinear",
+"Sinks",
+"Threshold"];
 
 defaultlibs  = defaultlibs + "lib";
 notTested = ["DSUPER" "SUPER_f" "TEXT_f" "PAL_f" ,..   // Specific blocks
-            , ..                                       // native blocks
-            "CBLOCK" "CBLOCK4" "c_block" "fortran_block",..
-            ,..                                        // not interface function
-            "WFILE_f", ..                              // Deprecated blocks
-            "vanne_inputs" "vanne_outputs" "vanne_draw_ports" ,..
-            "source_inputs" "source_outputs" "source_draw_ports" ,..
-            "puit_inputs" "puit_outputs" "puit_draw_ports" ,..
-            "bache_inputs" "bache_outputs" "bache_draw_ports" ,..
-            "tkscaleblk", "m_sin", "bplatform2", "anim_pen" ,..
-            "BARXY_sim" ];
+, ..                                       // native blocks
+"CBLOCK" "CBLOCK4" "c_block" "fortran_block",..
+,..                                        // not interface function
+"WFILE_f", "func_block", ..                // Deprecated blocks
+"vanne_inputs" "vanne_outputs" "vanne_draw_ports" ,..
+"source_inputs" "source_outputs" "source_draw_ports" ,..
+"puit_inputs" "puit_outputs" "puit_draw_ports" ,..
+"bache_inputs" "bache_outputs" "bache_draw_ports" ,..
+"tkscaleblk", "m_sin", "bplatform2", "anim_pen" ,..
+"BARXY_sim" ];
 
 funcprot(0);
 ilib_verbose(0);
@@ -55,7 +54,7 @@ for i = 1:size(defaultlibs,"*")
 
         // Not tested blocks (Xcos customs)
         if or(interfunction == notTested) then
-          continue;
+            continue;
         end
 
         // Test scs_m = BLOCK("define") then scs_m = BLOCK("set", scs_m)