Xcos tests: remove messagebox redef and regen some blocks 60/18960/1
Paul Bignier [Thu, 26 Jan 2017 09:35:34 +0000 (10:35 +0100)]
 * Modified test_run in order to take all 5 messagebox inputs

Change-Id: I75563619198269f67c5b6cd6950623adfc329e43

24 files changed:
scilab/modules/development_tools/macros/test_run.sci
scilab/modules/xcos/tests/nonreg_tests/bug_11975.tst
scilab/modules/xcos/tests/nonreg_tests/bug_11975.unix.dia.ref
scilab/modules/xcos/tests/nonreg_tests/bug_12384.tst
scilab/modules/xcos/tests/nonreg_tests/bug_12384.unix.dia.ref
scilab/modules/xcos/tests/nonreg_tests/bug_12751.dia.ref [deleted file]
scilab/modules/xcos/tests/nonreg_tests/bug_12751.tst
scilab/modules/xcos/tests/nonreg_tests/bug_12751.unix.dia.ref
scilab/modules/xcos/tests/nonreg_tests/bug_13011.dia.ref
scilab/modules/xcos/tests/nonreg_tests/bug_13011.tst
scilab/modules/xcos/tests/nonreg_tests/bug_13396.tst
scilab/modules/xcos/tests/nonreg_tests/bug_13396.unix.dia.ref
scilab/modules/xcos/tests/nonreg_tests/bug_7770.dia.ref [deleted file]
scilab/modules/xcos/tests/nonreg_tests/bug_7770.tst
scilab/modules/xcos/tests/nonreg_tests/bug_8397.dia.ref
scilab/modules/xcos/tests/nonreg_tests/bug_8397.tst
scilab/modules/xcos/tests/nonreg_tests/bug_8674.dia.ref
scilab/modules/xcos/tests/nonreg_tests/bug_8674.tst
scilab/modules/xcos/tests/unit_tests/Integer/dflipflop.dia.ref
scilab/modules/xcos/tests/unit_tests/Integer/dflipflop.tst
scilab/modules/xcos/tests/unit_tests/Integer/dflipflop.zcos
scilab/modules/xcos/tests/unit_tests/Integer/dlatch.dia.ref
scilab/modules/xcos/tests/unit_tests/Integer/dlatch.tst
scilab/modules/xcos/tests/unit_tests/Integer/dlatch.zcos

index 921b875..c636f93 100644 (file)
@@ -738,7 +738,7 @@ function status = test_single(_module, _testPath, _testName)
     "   quit;" ;
     "endfunction"];
     if ~interactive then
-        head($+1) = "function []=messagebox(msg, msg_title, info), disp(''messagebox: '' + msg);endfunction";
+        head($+1) = "function []=messagebox(msg, msg_title, info, buttons, isModal), disp(''messagebox: '' + msg);endfunction";
     end
     head = [ head ;
     "predef(''all'');";
@@ -888,10 +888,10 @@ function status = test_single(_module, _testPath, _testName)
             tmp = mgetl(tmp_res)
             tmp(tmp=="") = []
             status.details = "   " + strsubst(..
-                [""
-                 "----- " + tmp_res + ": 10 last lines: -----"
-                 tmp(max(1,size(tmp,1)-9):$)
-                 ], TMPDIR, "TMPDIR")
+            [""
+            "----- " + tmp_res + ": 10 last lines: -----"
+            tmp(max(1,size(tmp,1)-9):$)
+            ], TMPDIR, "TMPDIR")
         end
         return;
     end
@@ -1084,7 +1084,7 @@ function status = test_single(_module, _testPath, _testName)
     // Comparaison ref <--> dia
 
     if   (reference=="check" & _module.reference=="check") | ..
-         (reference ~= "skip" & _module.reference=="create") then
+        (reference ~= "skip" & _module.reference=="create") then
         //  Do some modification in  dia file
 
         dia(grep(dia, "printf(''%s\n'',tmpdirToPrint);")) = [];
index 9a6aee1..4334397 100644 (file)
@@ -37,13 +37,6 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/IF_block.zcos"));
 [cpr, ok] = xcos_compile(scs_m);
 assert_checktrue(ok);
 
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
-endfunction
-funcprot(prot);
-
 // Hydraulics
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/ModelicaBlocks/Hydraulics.zcos"));
 [cpr, ok] = xcos_compile(scs_m);
index 3502e4c..8456341 100644 (file)
@@ -31,12 +31,6 @@ assert_checktrue(ok);
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/IF_block.zcos"));
 [cpr, ok] = xcos_compile(scs_m);
 assert_checktrue(ok);
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
-endfunction
-funcprot(prot);
 // Hydraulics
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/ModelicaBlocks/Hydraulics.zcos"));
 [cpr, ok] = xcos_compile(scs_m);
@@ -44,5 +38,32 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/demos/ModelicaBlocks/Hydrau
  Main Modelica : TMPDIR/Hydraulics_im.mo
  Flat Modelica : TMPDIR/Hydraulics_imf.mo
  Simulation C code :TMPDIR/Hydraulics_im.c
+!messagebox: Modelica blocks are reduced to a block with:             !
+!                                                                     !
+!messagebox: Number of differential states: 2                         !
+!                                                                     !
+!messagebox: Number of algebraic states: 5                            !
+!                                                                     !
+!messagebox: Number of discrete time states  : 0                      !
+!                                                                     !
+!messagebox: Number of zero-crossing surfaces: 19                     !
+!                                                                     !
+!messagebox: Number of modes  : 19                                    !
+!                                                                     !
+!messagebox: Number of inputs : 1                                     !
+!                                                                     !
+!messagebox: Number of outputs: 2                                     !
+!                                                                     !
+!messagebox: Input/output dependency:[F]                              !
+!                                                                     !
+!messagebox: Analytical Jacobian: enabled  (%Jacobian=%t)             !
+!                                                                     !
+!messagebox: Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
+!                                                                     !
+!messagebox:                                                          !
+!                                                                     !
+!messagebox: Generated files path: TMPDIR/         !
+!                                                                     !
+!messagebox:                                                          !
 WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
 assert_checktrue(ok);
index 57dc5ca..dae80cc 100644 (file)
 
 ilib_verbose(0);
 
-// Redefining messagebox() to avoid popup from c_pass2.sci
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, modal, msg_title)
-endfunction
-funcprot(prot);
-
 importXcosDiagram(SCI+"/modules/xcos/tests/nonreg_tests/bug_12384.zcos");
 Info = scicos_simulate(scs_m,list());
 
index 6ce5d6f..079b16d 100644 (file)
 // Algebraic loop error while compiling a diagram with a modelica part linked
 // to another modelica part with an explicit link (using a sensor).
 ilib_verbose(0);
-// Redefining messagebox() to avoid popup from c_pass2.sci
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, modal, msg_title)
-endfunction
-funcprot(prot);
 importXcosDiagram(SCI+"/modules/xcos/tests/nonreg_tests/bug_12384.zcos");
 Info = scicos_simulate(scs_m,list());
 --------------------------------------------\
  Main Modelica : TMPDIR/Loop_im.mo
  Flat Modelica : TMPDIR/Loop_imf.mo
  Simulation C code :TMPDIR/Loop_im.c
+!messagebox: Modelica blocks are reduced to a block with:             !
+!                                                                     !
+!messagebox: Number of differential states: 0                         !
+!                                                                     !
+!messagebox: Number of algebraic states: 1                            !
+!                                                                     !
+!messagebox: Number of discrete time states  : 0                      !
+!                                                                     !
+!messagebox: Number of zero-crossing surfaces: 0                      !
+!                                                                     !
+!messagebox: Number of modes  : 0                                     !
+!                                                                     !
+!messagebox: Number of inputs : 0                                     !
+!                                                                     !
+!messagebox: Number of outputs: 1                                     !
+!                                                                     !
+!messagebox: Input/output dependency:[T]                              !
+!                                                                     !
+!messagebox: Analytical Jacobian: enabled  (%Jacobian=%t)             !
+!                                                                     !
+!messagebox: Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
+!                                                                     !
+!messagebox:                                                          !
+!                                                                     !
+!messagebox: Generated files path: TMPDIR/         !
+!                                                                     !
+!messagebox:                                                          !
diff --git a/scilab/modules/xcos/tests/nonreg_tests/bug_12751.dia.ref b/scilab/modules/xcos/tests/nonreg_tests/bug_12751.dia.ref
deleted file mode 100644 (file)
index ed8ad1f..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2014 - Scilab Enterprises - Vladislav TRUBKIN
-//
-// This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- XCOS TEST -->
-//
-// <-- ENGLISH IMPOSED -->
-//
-// <-- Non-regression test for bug 12751 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=12751
-//
-// <-- Short Description -->
-// cdummy_ entry point not found when using Code Generation
-//
-assert_checktrue(importXcosDiagram(SCI + "/modules/xcos/tests/nonreg_tests/bug_12751.zcos"));
-xcos_simulate(scs_m, 4);
-prot = funcprot();
-funcprot(0);
-function str = x_mdialog(desc, labels, ini)
-    str = ["bug_12751"; TMPDIR+"/bug_12751/"; ""];
-endfunction
-function num = messagebox(strings, buttons, modal)
-    num = 1;
-endfunction
-funcprot(prot);
-[ok, XX] = do_compile_superblock42(scs_m.objs(1), [], [], %f);
-   Generate a loader file
-   Generate a Makefile
-   Running the Makefile
-   Compilation of bug_12751.c
-   Compilation of bug_12751_void_io.c
-   Compilation of bug_12751_Cblocks.c
-   Building shared library (be patient)
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-assert_checktrue(ok);
-rmdir(TMPDIR+"/bug_12751/","s");
index 8de1833..ebbd49f 100644 (file)
@@ -28,10 +28,6 @@ function str = x_mdialog(desc, labels, ini)
     str = ["bug_12751"; TMPDIR+"/bug_12751/"; ""];
 endfunction
 
-function num = messagebox(strings, buttons, modal)
-    num = 1;
-endfunction
-
 funcprot(prot);
 
 [ok, XX] = do_compile_superblock42(scs_m.objs(1), [], [], %f);
index 9e8d9f6..30a86c2 100644 (file)
@@ -23,11 +23,11 @@ funcprot(0);
 function str = x_mdialog(desc, labels, ini)
     str = ["bug_12751"; TMPDIR+"/bug_12751/"; ""];
 endfunction
-function num = messagebox(strings, buttons, modal)
-    num = 1;
-endfunction
 funcprot(prot);
 [ok, XX] = do_compile_superblock42(scs_m.objs(1), [], [], %f);
+operation +: Warning adding a matrix with the empty matrix will give an empty matrix result.
+operation +: Warning adding a matrix with the empty matrix will give an empty matrix result.
+operation +: Warning adding a matrix with the empty matrix will give an empty matrix result.
    Generate a loader file
    Generate a Makefile
    ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
index ef48c06..8b3bace 100644 (file)
 // <-- Short Description -->
 // Fails under Mac OS X 10.9
 ilib_verbose(0);
-prot = funcprot();
-funcprot(0);
-// Stubbing the messagebox method
-function messagebox(msg, msg_title)
-endfunction
-funcprot(prot);
 importXcosDiagram(SCI+"/modules/xcos/tests/nonreg_tests/bug_12384.zcos");
 xcos_simulate(scs_m, 4);
 --------------------------------------------\
  Main Modelica : TMPDIR/Loop_im.mo
  Flat Modelica : TMPDIR/Loop_imf.mo
  Simulation C code :TMPDIR/Loop_im.c
+!messagebox: Modelica blocks are reduced to a block with:             !
+!                                                                     !
+!messagebox: Number of differential states: 0                         !
+!                                                                     !
+!messagebox: Number of algebraic states: 1                            !
+!                                                                     !
+!messagebox: Number of discrete time states  : 0                      !
+!                                                                     !
+!messagebox: Number of zero-crossing surfaces: 0                      !
+!                                                                     !
+!messagebox: Number of modes  : 0                                     !
+!                                                                     !
+!messagebox: Number of inputs : 0                                     !
+!                                                                     !
+!messagebox: Number of outputs: 1                                     !
+!                                                                     !
+!messagebox: Input/output dependency:[T]                              !
+!                                                                     !
+!messagebox: Analytical Jacobian: enabled  (%Jacobian=%t)             !
+!                                                                     !
+!messagebox: Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
+!                                                                     !
+!messagebox:                                                          !
+!                                                                     !
+!messagebox: Generated files path: TMPDIR/         !
+!                                                                     !
+!messagebox:                                                          !
 WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
index d967625..e3e7fc2 100644 (file)
 // Fails under Mac OS X 10.9
 
 ilib_verbose(0);
-prot = funcprot();
-funcprot(0);
-
-// Stubbing the messagebox method
-function messagebox(msg, msg_title)
-endfunction
-
-funcprot(prot);
 
 importXcosDiagram(SCI+"/modules/xcos/tests/nonreg_tests/bug_12384.zcos");
 xcos_simulate(scs_m, 4);
index 08395d0..2e54d29 100644 (file)
@@ -54,8 +54,6 @@ function str = x_mdialog(desc, labels, ini)
         str = []; // cancelling
     end
 endfunction
-function messagebox(msg, msg_title)
-endfunction
 
 // set the path for external file
 for i = 1:size(scs_m.objs)
index 2df88d9..49cd88e 100644 (file)
@@ -48,8 +48,6 @@ function str = x_mdialog(desc, labels, ini)
         str = []; // cancelling
     end
 endfunction
-function messagebox(msg, msg_title)
-endfunction
 // set the path for external file
 for i = 1:size(scs_m.objs)
     if typeof(scs_m.objs(i)) == "Block" & scs_m.objs(i).gui == "MBLOCK" then
@@ -65,6 +63,33 @@ end
  Main Modelica : TMPDIR/bug_13396_im.mo
  Flat Modelica : TMPDIR/bug_13396_imf.mo
  Simulation C code :TMPDIR/bug_13396_im.c
+!messagebox: Modelica blocks are reduced to a block with:             !
+!                                                                     !
+!messagebox: Number of differential states: 0                         !
+!                                                                     !
+!messagebox: Number of algebraic states: 1                            !
+!                                                                     !
+!messagebox: Number of discrete time states  : 0                      !
+!                                                                     !
+!messagebox: Number of zero-crossing surfaces: 1                      !
+!                                                                     !
+!messagebox: Number of modes  : 1                                     !
+!                                                                     !
+!messagebox: Number of inputs : 0                                     !
+!                                                                     !
+!messagebox: Number of outputs: 1                                     !
+!                                                                     !
+!messagebox: Input/output dependency:[T]                              !
+!                                                                     !
+!messagebox: Analytical Jacobian: enabled  (%Jacobian=%t)             !
+!                                                                     !
+!messagebox: Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
+!                                                                     !
+!messagebox:                                                          !
+!                                                                     !
+!messagebox: Generated files path: TMPDIR/         !
+!                                                                     !
+!messagebox:                                                          !
 WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
 assert_checktrue(ok);
 // simulate the diagram
@@ -73,6 +98,33 @@ xcos_simulate(scs_m, 4);
  Main Modelica : TMPDIR/bug_13396_im.mo
  Flat Modelica : TMPDIR/bug_13396_imf.mo
  Simulation C code :TMPDIR/bug_13396_im.c
+!messagebox: Modelica blocks are reduced to a block with:             !
+!                                                                     !
+!messagebox: Number of differential states: 0                         !
+!                                                                     !
+!messagebox: Number of algebraic states: 1                            !
+!                                                                     !
+!messagebox: Number of discrete time states  : 0                      !
+!                                                                     !
+!messagebox: Number of zero-crossing surfaces: 1                      !
+!                                                                     !
+!messagebox: Number of modes  : 1                                     !
+!                                                                     !
+!messagebox: Number of inputs : 0                                     !
+!                                                                     !
+!messagebox: Number of outputs: 1                                     !
+!                                                                     !
+!messagebox: Input/output dependency:[T]                              !
+!                                                                     !
+!messagebox: Analytical Jacobian: enabled  (%Jacobian=%t)             !
+!                                                                     !
+!messagebox: Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
+!                                                                     !
+!messagebox:                                                          !
+!                                                                     !
+!messagebox: Generated files path: TMPDIR/         !
+!                                                                     !
+!messagebox:                                                          !
 WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
 WARNING: Diagram has been compiled for implicit solver
 WARNING: switching to implicit Solver
diff --git a/scilab/modules/xcos/tests/nonreg_tests/bug_7770.dia.ref b/scilab/modules/xcos/tests/nonreg_tests/bug_7770.dia.ref
deleted file mode 100644 (file)
index 8bd507b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2010 - DIGITEO - Jérôme Picard
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-//
-// <-- XCOS TEST -->
-// <-- ENGLISH IMPOSED -->
-// <-- NO CHECK REF -->
-//
-// <-- Non-regression test for bug 7770 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=7770
-//
-// <-- Short Description -->
-// It was not possible to compile a xcos diagram
-// containing Modelica blocks
-funcprot(0);
-// Stubbing the messagebox method
-function [btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal)
-    btn=1;
-endfunction
-ilib_verbose(0);
-// import a diagram of a Modelica demo in Scilab
-result= importXcosDiagram(SCI+"/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.zcos");
-if ~result then bugmes();quit;end
-// compile the diagram
-[%cpr,ok] = xcos_compile(scs_m);
---------------------------------------------\
- Main Modelica : TMPDIR/RLC_Modelica_im.mo
- Flat Modelica : TMPDIR/RLC_Modelica_imf.mo
- Simulation C code :TMPDIR/RLC_Modelica_im.c
-WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
-if ~ok then bugmes();quit;end
index e583227..627bc24 100644 (file)
 // It was not possible to compile a xcos diagram
 // containing Modelica blocks
 
-funcprot(0);
-// Stubbing the messagebox method
-function [btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal)
-    btn=1;
-endfunction
-
 ilib_verbose(0);
 // import a diagram of a Modelica demo in Scilab
 result= importXcosDiagram(SCI+"/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.zcos");
index fb2fec6..c9f9803 100644 (file)
@@ -34,13 +34,8 @@ mo_content = [..
 fd = mopen(src_file, "wt");
 mputl(mo_content, fd);
 mclose(fd);
-// override messagebox method
-save_messagebox = messagebox;
-p = funcprot();
-funcprot(0);
-function messagebox(msg, Title, icon, isModal), endfunction
-funcprot(p);
 // modelicac call
 ok = modelicac(src_file, function_file, xml_file, %t, c_file, %f);
+ messagebox: Fatal error: exception Failure("The number of equations do 
+ esn't match the number of variables: 2 equations and 3 variables.")   
 assert_checkequal(ok, %f);
-messagebox = save_messagebox;
index 7d2300d..6b97ad8 100644 (file)
@@ -40,15 +40,6 @@ fd = mopen(src_file, "wt");
 mputl(mo_content, fd);
 mclose(fd);
 
-// override messagebox method
-save_messagebox = messagebox;
-p = funcprot();
-funcprot(0);
-function messagebox(msg, Title, icon, isModal), endfunction
-funcprot(p);
-
 // modelicac call
 ok = modelicac(src_file, function_file, xml_file, %t, c_file, %f);
 assert_checkequal(ok, %f);
-
-messagebox = save_messagebox;
index 23f2289..11a7773 100644 (file)
 //
 // <-- Short Description -->
 // Check that an erroneous "From workspace" block does not produce an error.
-// 
+//
 result = importXcosDiagram(SCI + "/modules/xcos/tests/nonreg_tests/bug_8674.zcos");
 if (result <> %T) then bugmes();quit;end
 // overwrtie dialogs
 prot = funcprot();
 funcprot(0);
-function [btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal)
-    btn = 1;
-endfunction
 function result = dialog(labels,valueini)
     result = valueini;
 endfunction
 funcprot(prot);
 %cpr = xcos_simulate(scs_m, 4);
- The 'V' variable does not exist.   
+!messagebox: Not enough information to find port sizes.  !
+!                                                        !
+!messagebox: I try to find the problem.                  !
+ <html><body><em>Please update the diagram to avoid this warning.</em>< 
+ br />Block output port has a non-determined size:<ul><li>Output port 1 
+  size is: 1</li><li>Input port 1 size is: 1</li></ul></body></html>   
+ <html><body><em>Please update the diagram to avoid this warning.</em>< 
+ br />Block input port has a non-determined size:<ul><li>Output port 1  
+ size is: 1</li><li>Input port 1 size is: 1</li></ul></body></html>    
+ The 'V' variable does not exist.
+ <html><body>Initialisation problem: <br/>The 'V' variable does not exi 
+ st.</body></html>                                                     
index bd480fa..14dad34 100644 (file)
@@ -15,7 +15,7 @@
 //
 // <-- Short Description -->
 // Check that an erroneous "From workspace" block does not produce an error.
-// 
+//
 
 result = importXcosDiagram(SCI + "/modules/xcos/tests/nonreg_tests/bug_8674.zcos");
 if (result <> %T) then pause,end
@@ -24,10 +24,6 @@ if (result <> %T) then pause,end
 prot = funcprot();
 funcprot(0);
 
-function [btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal)
-    btn = 1;
-endfunction
-
 function result = dialog(labels,valueini)
     result = valueini;
 endfunction
index 0e25992..98dc06f 100644 (file)
@@ -8,24 +8,19 @@
 // <-- XCOS TEST -->
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Integer/dflipflop.zcos"));
-// Redefining messagebox() to avoid popup from c_pass2.sci
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, modal, msg_title)
-    disp(msg);
-endfunction
-funcprot(prot);
 A_ref = int8(zeros(128,1));
 try scicos_simulate(scs_m, 'nw'); catch disp(lasterror()); end
-!No continuous-time state. Thresholds are ignored; this             !
-!                                                                   !
-!may be OK if you don't generate external events with them.         !
-!                                                                   !
-!If you want to reactivate the thresholds, then you need            !
-!                                                                   !
-!                                                                   !
-!                                                                   !
-!to include a block with continuous-time state in your diagram.     !
-!                                                                   !
-!   You can for example include DUMMY CLSS block (linear palette).  !
+!messagebox: No continuous-time state. Thresholds are ignored; this    !
+!                                                                      !
+!messagebox: may be OK if you don't generate external events with them.!
+!                                                                      !
+!messagebox: If you want to reactivate the thresholds, then you need   !
+!                                                                      !
+!messagebox:                                                           !
+!                                                                      !
+!messagebox: to include a block with continuous-time state in your diag!
+!ram.                                                                  !
+!                                                                      !
+!messagebox:    You can for example include DUMMY CLSS block (linear pa!
+!lette).                                                               !
 assert_checkequal(A.values, A_ref);
index f8ae1d7..10fbf2e 100644 (file)
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Integer/dflipflop.zcos"));
 
-// Redefining messagebox() to avoid popup from c_pass2.sci
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, modal, msg_title)
-    disp(msg);
-endfunction
-funcprot(prot);
-
 A_ref = int8(zeros(128,1));
 
-try scicos_simulate(scs_m, 'nw'); catch disp(lasterror()); end
+try scicos_simulate(scs_m, "nw"); catch disp(lasterror()); end
 
 assert_checkequal(A.values, A_ref);
index dc6365a..8bf8dda 100644 (file)
Binary files a/scilab/modules/xcos/tests/unit_tests/Integer/dflipflop.zcos and b/scilab/modules/xcos/tests/unit_tests/Integer/dflipflop.zcos differ
index 9a9d172..0218bfa 100644 (file)
@@ -12,25 +12,20 @@ A_ref1 = int8(ones(7,1));
 A_ref2 = int8(zeros(24,1));
 A_ref3 = int8(ones(15,1));
 A_ref4 = int8(zeros(26,1));
-// Redefining messagebox() to avoid popup from c_pass2.sci
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, modal, msg_title)
-    disp(msg);
-endfunction
-funcprot(prot);
 try scicos_simulate(scs_m, 'nw'); catch disp(lasterror()); end
-!No continuous-time state. Thresholds are ignored; this             !
-!                                                                   !
-!may be OK if you don't generate external events with them.         !
-!                                                                   !
-!If you want to reactivate the thresholds, then you need            !
-!                                                                   !
-!                                                                   !
-!                                                                   !
-!to include a block with continuous-time state in your diagram.     !
-!                                                                   !
-!   You can for example include DUMMY CLSS block (linear palette).  !
+!messagebox: No continuous-time state. Thresholds are ignored; this    !
+!                                                                      !
+!messagebox: may be OK if you don't generate external events with them.!
+!                                                                      !
+!messagebox: If you want to reactivate the thresholds, then you need   !
+!                                                                      !
+!messagebox:                                                           !
+!                                                                      !
+!messagebox: to include a block with continuous-time state in your diag!
+!ram.                                                                  !
+!                                                                      !
+!messagebox:    You can for example include DUMMY CLSS block (linear pa!
+!lette).                                                               !
 assert_checkequal(A.values(1:7),   A_ref1);
 assert_checkequal(A.values(8:31),  A_ref2);
 assert_checkequal(A.values(32:46), A_ref3);
index bc702c5..5f0c2b2 100644 (file)
@@ -16,15 +16,7 @@ A_ref2 = int8(zeros(24,1));
 A_ref3 = int8(ones(15,1));
 A_ref4 = int8(zeros(26,1));
 
-// Redefining messagebox() to avoid popup from c_pass2.sci
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, modal, msg_title)
-    disp(msg);
-endfunction
-funcprot(prot);
-
-try scicos_simulate(scs_m, 'nw'); catch disp(lasterror()); end
+try scicos_simulate(scs_m, "nw"); catch disp(lasterror()); end
 
 assert_checkequal(A.values(1:7),   A_ref1);
 assert_checkequal(A.values(8:31),  A_ref2);
index 258fb48..47fe37e 100644 (file)
Binary files a/scilab/modules/xcos/tests/unit_tests/Integer/dlatch.zcos and b/scilab/modules/xcos/tests/unit_tests/Integer/dlatch.zcos differ