Bug #10404
logical.fromString does not set ERROR-STATUS:ERROR
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
History
#1 Updated by Andrei Iacob 11 months ago
Worked deferred from #10298. For the following logical constructors, ERROR flag is not set.
USING Progress.Lang.*.
USING OpenEdge.Core.Assert FROM PROPATH.
BLOCK-LEVEL ON ERROR UNDO, THROW.
CLASS unittests.TestLogicalFromString:
@Test.
METHOD PUBLIC VOID testLogical():
DEFINE VARIABLE l AS LOGICAL NO-UNDO.
l = LOGICAL("abcd", "abc/ ") NO-ERROR. testFailure().
l = LOGICAL("qwer", "abc/qwe ") NO-ERROR. testFailure().
END METHOD.
METHOD PRIVATE VOID testFailure():
Assert:IsTrue(ERROR-STATUS:ERROR).
Assert:Equals(1, ERROR-STATUS:NUM-MESSAGES).
END METHOD.
END CLASS.
Some work has been done in #10298 to address this, but it introduced a regression for and got reverted. Take this testcase into consideration:
LOGICAL(" ", " / ") NO-ERROR.
MESSAGE "Error status:" ERROR-STATUS:ERROR. // expected 'NO'