Need for testing [was Re: one more time.lisp patch]
Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Thu, 24 Nov 2005 13:29:43 -0700
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <[email protected]> |
Aleksandar Bakic wrote: > Line numbers are wrt. my older local copy, but you can see that usec was > missing. Thanks for the patch, Alex. This is about the 4th or or 5th fix to the microsecond patch I accepted last year. While improvements to CLSQL are welcome, it is suboptimal to incorporate patches that have so many bugs. A robust approach, I think, would be to require patches to CLSQL to also add to the test suite. I read Beck's "Test-Driven Development" a few years ago. His stringent approach is only write code after one has written a test to verify the correct operation of the code. For CLSQL, a good adaption might be to only commit patches which also have tests that show the incorrect previous behavior and correct current behavior. Kevin case, I think a good ada > Alex > > @@ -932,9 +938,9 @@ > (print-date time style))) > > (defun print-date (time &optional (style :daytime)) > - (multiple-value-bind (usec second minute hour day month year dow) > + (multiple-value-bind (second minute hour day month year dow) > (decode-time time) > - (declare (ignore usec second)) > + (declare (ignore second)) > (multiple-value-bind (hours meridian) > (time-meridian hour) > (ecase style > @@ -967,9 +973,8 @@ > (format nil "~d/~d/~d" month day year)))))) > > (defun time-element (time element) > - (multiple-value-bind (usec second minute hour day month year dow) > + (multiple-value-bind (second minute hour day month year dow) > (decode-time time) > - (declare (ignore usec)) > (ecase element > (:seconds > second) > > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > _______________________________________________ > CLSQL-Devel mailing list > [email protected] > http://lists.b9.com/mailman/listinfo/clsql-devel -- Kevin Rosenberg kevin-HJRc7zDS/[email protected]