[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Patch for parsing dates and time

From: Holger Hans Peter Freyther
Subject: Re: [Help-smalltalk] Patch for parsing dates and time
Date: Tue, 24 Jul 2012 11:16:50 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jul 23, 2012 at 10:24:56PM +0200, Maarten van Beek wrote:
> The attached patch accepts negative dates and doesn't use position:
> anymore. I've removed the test cases that weren't possible to succeed
> because of this. This includes some test cases for DateTime, where
> DateTime skips over all separators to see if there's any usable
> content left. These separators are thrown away.


in general it is good to test what can be parsed and what can not
be parsed. E.g. if someone wants to parse 09:00::1234 as 9:00 and
it fails it easy to point him to the testcase that excludes this
behavior, Pharo1.4 will throw an exception when parsing the above
string as a Time, I think it would be acceptable to do the same.

Somehow I am not able to quote the attachment from within mutt but
you have some unused variables (e.g. you added 'pos' but don't make
use of it).

For Paolo I have included the diff of expout to stdout when using
the right stream for parsing and then comparing what is left inside
the stream. Maarten's test results are already a lot better.


Attachment: failed_tests.tx
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]