On Sat, 19 Oct 2002, Leopold Toetsch wrote: > Andy Dougherty (via RT) wrote: > > > # New Ticket Created by Andy Dougherty > > # Please include the string: [perl #18008] > > # in the subject line of all future correspondence about this issue. > > # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=18008 > > > > 2. Can someone who understands the tests fix the casts in t/src/list.t? > > A hopefully working fix checked in.
It doesn't seem to be working for me at the moment :-( The version currently in CVS fails because the code won't even compile; this is due to a simple typo, and is easily fixed -- see patch at end. However, even when it compiles, the test fails; I get: The answer is 42. char b short -15 num 1234.560000 string Seems ok len now 0 string list string list 2 string list string list 2 delete 1 ok delete 2 ok delete 3 ok delete 4 ok Segmentation fault (core dumped) Closer investigation with gdb suggests it's failing on a call to list_get, but I can't see why. Simon --- t/src/list.t.old Sat Oct 19 13:44:04 2002 +++ t/src/list.t Sat Oct 19 13:44:36 2002 @@ -192,7 +192,7 @@ int main(int argc, char* argv[]) { } list_shift(interpreter, list, enum_type_char); list_insert(interpreter, list, 0, 3); - for (i = 0; i < 5; i++) + for (i = 0; i < 5; i++) { int c = 'A' + i; list_push(interpreter, list, (void*) c, enum_type_char); }