[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RIGHT("hello"; -0.1) _should_ be a test case
Eike Rathke has proposed changing some test cases, and I intend to restore them back. Here's my reasoning... but that doesn't make it right :-). Eike, others, does my reasoning make sense? One of the test cases is: =RIGHT("hello"; -0.1) This tests two things: (1) does the function correctly convert to an integer using INT(), and (2) does it correctly produce an error when given a negative length? Eike proposes changing to this: =RIGHT("hello"; -1) Which would test #2, but not #1. What I'm trying to prevent is implementations that use round-to-nearest or round-toward-zero semantics for LEFT/RIGHT/etc.... we should all use the same round-to-integer algorithm where we can gain agrement. Sound okay? --- David A. Wheeler
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]