1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2010 - DIGITEO - Clément DAVID
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
10 // <-- Non-regression test for bug 8397 -->
12 // <-- Bugzilla URL -->
13 // http://bugzilla.scilab.org/show_bug.cgi?id=8397
15 // <-- Short Description -->
16 // After detection of variable/equation difference, the error message should be
17 // printed on the scilab console but must not deactivate xcos simulation.
21 src_file = TMPDIR + "/sample_imf.mo";
22 function_file = TMPDIR + "/sample_imf_functions.mo";
23 xml_file = TMPDIR + "/sample_imSim.xml";
24 c_file = TMPDIR + "/sample_im.c";
26 // unsolvable system of equation
38 // Creating source content
39 fd = mopen(src_file, "wt");
40 mputl(mo_content, fd);
43 // override messagebox method
44 previous_ptr = funptr("messagebox");
45 clearfun("messagebox");
46 function messagebox(msg, Title, icon, isModal), endfunction
49 ok = modelicac(src_file, function_file, xml_file, %t, c_file, %f);
50 assert_checkequal(ok, %f);
53 newfun("messagebox", previous_ptr);
54 clear("previous_ptr");