From: Alexandre HERISSE Date: Wed, 31 Jul 2013 12:19:47 +0000 (+0200) Subject: * Bug #12414 fixed - SWITCH_m block had different behaviors X-Git-Tag: 5.5.0-beta-1~361 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=31b161a0532d4277e4e8fd13d2e1e53ab0f678a7 * Bug #12414 fixed - SWITCH_m block had different behaviors for different types of inputs. Change-Id: Ibc514cff4a458925257bd90142ab568212feb00f --- diff --git a/scilab/CHANGES_5.5.X b/scilab/CHANGES_5.5.X index a4893ad..78f95e0 100644 --- a/scilab/CHANGES_5.5.X +++ b/scilab/CHANGES_5.5.X @@ -121,6 +121,9 @@ Xcos * Bug #12387 fixed - Setup menu option "Modelica initialize" did not blur during simulation. +* Bug #12414 fixed - SWITCH_m block had different behaviors + for different types of inputs. + * Bug #12424 fixed - Calling lincos on a Derivative block made scilab crash. * Bug #12460 fixed - xcosPalGenerateAllIcons sometimes crashed Scilab. diff --git a/scilab/modules/xcos/tests/nonreg_tests/bug_12414.dia.ref b/scilab/modules/xcos/tests/nonreg_tests/bug_12414.dia.ref new file mode 100644 index 0000000..a14af32 --- /dev/null +++ b/scilab/modules/xcos/tests/nonreg_tests/bug_12414.dia.ref @@ -0,0 +1,19 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Alexandre HERISSE +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- XCOS TEST --> +// +// <-- Non-regression test for bug 12414 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=12414 +// +// <-- Short Description --> +// SWITCH_m block had different behaviors for different types of inputs. +assert_checktrue(importXcosDiagram(SCI + "/modules/xcos/tests/nonreg_tests/bug_12414.xcos")); +Info = scicos_simulate(scs_m, list()); +assert_checkequal(A.values($), uint16(1)); +assert_checkequal(B.values($), 1.0); diff --git a/scilab/modules/xcos/tests/nonreg_tests/bug_12414.tst b/scilab/modules/xcos/tests/nonreg_tests/bug_12414.tst new file mode 100644 index 0000000..fea23e6 --- /dev/null +++ b/scilab/modules/xcos/tests/nonreg_tests/bug_12414.tst @@ -0,0 +1,23 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Alexandre HERISSE +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- XCOS TEST --> +// +// <-- Non-regression test for bug 12414 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=12414 +// +// <-- Short Description --> +// SWITCH_m block had different behaviors for different types of inputs. + +assert_checktrue(importXcosDiagram(SCI + "/modules/xcos/tests/nonreg_tests/bug_12414.xcos")); +Info = scicos_simulate(scs_m, list()); + +assert_checkequal(A.values($), uint16(1)); +assert_checkequal(B.values($), 1.0); + diff --git a/scilab/modules/xcos/tests/nonreg_tests/bug_12414.xcos b/scilab/modules/xcos/tests/nonreg_tests/bug_12414.xcos new file mode 100644 index 0000000..fdb676a Binary files /dev/null and b/scilab/modules/xcos/tests/nonreg_tests/bug_12414.xcos differ