[Seaside-dev] seaside portability improvements (gst)

Paolo Bonzini bonzini at gnu.org
Tue Feb 12 10:20:03 UTC 2008


Here are my first findings.

1) WACodecTest should be separated in a Seaside-Adapters-Tests package. 
  Maybe it's overkill, though.

2) There are NULL characters in testUtf16.  It would be nice if the 
strings there could be expressed as byte-arrays or, even better, created 
from the ISO-8859-1 strings using something like:

    utf16 := String new: iso88591 size * 2.
    iso88591 with: (2 to: utf16 size by: 2) do: [ :ch :index |
        utf16 at: index put: ch ].

3) in the WAPlatformTest #testNewDayMonthNumberYear, Date>>#day is 
expected to return the day of year; in GNU Smalltalk it returns the day 
of month.  I suggest creating an extension Date>>#dayOfYear and using 
it.  Nowhere else in Seaside I see Date>>#day called.

4) in WAPlatformTest>>#testDaysInMonthForYear, Month is sent a message. 
  There is no such class in GNU Smalltalk; I suggest creating an 
extension Date class>>#daysInMonthNumber:forYear:.

5) in #testToString, I have rounding errors on "0.1 toString asNumber"; 
this is my fault of course, but anyway I find it brittle to perform 
equality test on floating-point numbers.  Maybe it's better to test an 
integer there.

6) Seaside relies on a Color class provided by the system.  GNU 
Smalltalk does not have one.  If you provide me with a list of required 
methods, I can write a WAColor class for Seaside 2.9.

Thanks!

Paolo



More information about the seaside-dev mailing list