Re: [Sbcl-devel] [Sbcl-commits] master: alien type improvement: handle offsets in unparse-alien-record-type

3 views
Skip to first unread message

Nikodemus Siivola

unread,
Nov 5, 2012, 2:37:43 AM11/5/12
to sbcl-...@lists.sourceforge.net, Cyrus Harmon
On 4 November 2012 19:48, Cyrus Harmon <sly...@users.sourceforge.net> wrote:

> Author: Cyrus Harmon <ch-g...@bobobeach.com>
> Date: Sun Oct 14 23:12:58 2012 -0700
>
> alien type improvement: handle offsets in unparse-alien-record-type
>
> Previously, when recomputing the offset to struct fields we would
> ignore the offset and attempt to recompute it, occasionally getting it
> wrong. Now store the offset in uparse-alien-record-field and use in
> parse-alien-record-fields.

Test-case?

Cheers,

-- Nikodemus

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Sbcl-devel mailing list
Sbcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel

Nikodemus Siivola

unread,
Nov 5, 2012, 2:59:29 AM11/5/12
to Cyrus Harmon, sbcl-...@lists.sourceforge.net
On 5 November 2012 09:48, Cyrus Harmon <ch-...@bobobeach.com> wrote:
> I was afraid of that… Check the bug:
> https://bugs.launchpad.net/sbcl/+bug/1028537
>
> I'm a bit out of practice in writing test cases that properly check to make
> sure things are/aren't broken, but that particular case was broken and is
> now fixed.

Add the define-alien-type from the bugreport to some appropriate
impure test file, and add a WITH-TEST with a body along the lines of:

;; Used to signal an error.
(compile nil `(lambda ...with contents of TEST from the bugreport...)))

For extra credit test the returned function with inputs of both
correct and incorrect types.

Not very formal. I'm a huge fan of "poke the bug with a stick" method
of testing. If it doesn't attack you, it's probably dead. :) Over time
we accumulate more and bigger sticks.

(I can deal with this as well, but if you're out of practise...)

Cyrus Harmon

unread,
Nov 5, 2012, 2:48:10 AM11/5/12
to Nikodemus Siivola, sbcl-...@lists.sourceforge.net
I was afraid of that… Check the bug: https://bugs.launchpad.net/sbcl/+bug/1028537

I'm a bit out of practice in writing test cases that properly check to make sure things are/aren't broken, but that particular case was broken and is now fixed.

Any volunteers out there looking to make a formal test case for this?

thanks,

Cyrus
Reply all
Reply to author
Forward
0 new messages