From: Cedric Delamarre Date: Fri, 26 Jun 2015 09:30:08 +0000 (+0200) Subject: operator == fixed in Cell X-Git-Tag: 6.0.0-alpha-1~155 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=545293423c2953c0728178a4455d0c8bab1f29ea operator == fixed in Cell Change-Id: Ibec7f5f693f3cd54297ef216bced4483c5ff2756 --- diff --git a/scilab/modules/ast/src/cpp/types/cell.cpp b/scilab/modules/ast/src/cpp/types/cell.cpp index 509def9..1f03758 100644 --- a/scilab/modules/ast/src/cpp/types/cell.cpp +++ b/scilab/modules/ast/src/cpp/types/cell.cpp @@ -372,7 +372,7 @@ bool Cell::subMatrixToString(std::wostringstream& ostr, int* _piDims, int /*_iDi bool Cell::operator==(const InternalType& it) { - if (const_cast(it).isCell()) + if (const_cast(it).isCell() == false) { return false; } diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_9600.dia.ref b/scilab/modules/ast/tests/nonreg_tests/bug_9600.dia.ref index c62ac307..9c69d5a 100644 --- a/scilab/modules/ast/tests/nonreg_tests/bug_9600.dia.ref +++ b/scilab/modules/ast/tests/nonreg_tests/bug_9600.dia.ref @@ -20,7 +20,14 @@ assert_checkequal(l(1), []); l = list(); l(1) = {}; assert_checkequal(l, list({})); -size: Wrong number of input argument(s): 1 expected. -at line 116 of function assert_checkequal called by : -assert_checkequal(l, list({})) -at line 39 of exec file called by : +assert_checkequal(l(1), {}); +c = {}; +c{1} = []; +assert_checkequal(c, {[]}); +assert_checkequal(c{1}, []); +c{1} = {}; +assert_checkequal(c, {{}}); +assert_checkequal(c{1}, {}); +c{1} = list(); +assert_checkequal(c, {list()}); +assert_checkequal(c{1}, list());