← Prev in month ← Prev in thread
Next in thread → Next in month →

[OASIS Issue Tracker] Commented: (OFFICE-358) Public Comment:Comment on test case for LEFT()

From
OASIS Issues Tracker <>
Date
2009-08-03T15:35:37+00:00
ID
1728171938.1249313737529.JavaMail.tomcat55@mw00
Thread
[OASIS Issue Tracker] Commented: (OFFICE-358) Public Comment:Comment on test case for LEFT()
[ http://tools.oasis-open.org/issues/browse/OFFICE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14869#action_14869 ] 

David Wheeler  commented on OFFICE-358:
---------------------------------------

The original comment was on the test case "=LEN(LEFT("xxx";-0.1))", which is supposed to return "Error".
======================
Comment: It makes no sense to request a negative number of characters.  Length 
is converted using INT, towards negative infinity, so Length becomes -1
That is a bit subtle, and doesn't just test LEFT(). In particular, it will 
fail if the implicit conversion goes to 0 instead of -1.
Suggest that the expression should be: =LEFT("xxx";-1)
which would just test LEFT.
======================

Disagree.  The purpose of the test case is SPECIFICALLY to test this
subtle error, namely, getting the conversion wrong.
The text of the function now makes clear that Length<0 is an error,
so a length of -0.1 is still an error.
The text of the test case makes it clear that this is intentional.



> Public Comment: Comment on test case for LEFT()
> -----------------------------------------------
>
>                 Key: OFFICE-358
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-358
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: Bug
>          Components: OpenFormula
>    Affects Versions: ODF 1.2
>            Reporter: Robert Weir 
>            Assignee: David Wheeler 
>            Priority: Minor
>             Fix For: ODF 1.2
>
>
> Copied from office-comment list
> Original author: Brad Hards <> 
> Original date: 21 Dec 2006 01:47:27 -0000
> Original URL: http://lists.oasis-open.org/archives/office-comment/200612/msg00004.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
← Prev in month ← Prev in thread
Next in thread → Next in month →