There are four ways to check the status of threads, Thread#status, Thread#inspect, Thread#alive?, and Thread#stop?. Any objection to adding a single shared file which checks the result of all the four APIs? It won''t follow the standard pattern of it_behaves_like for aliases since these are all different APIs and not aliases. However, it will help check all of them consistently. I wanted to check if this idea made sense before pushing in that direction. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090107/fe7a06b9/attachment.html>
I would rather implement them all separately. They all act differently. Status returns a simple string, inspect returns an inspection string, and alive and stop are Boolean. I would leave the shared pattern for the way it is now. You can probably take advantage of sharing methods in the fixtures. JD From: Shri Borde Sent: Wednesday, January 07, 2009 12:43 AM To: Jim Deville Cc: ironruby-core at rubyforge.org Subject: Thread status tests There are four ways to check the status of threads, Thread#status, Thread#inspect, Thread#alive?, and Thread#stop?. Any objection to adding a single shared file which checks the result of all the four APIs? It won''t follow the standard pattern of it_behaves_like for aliases since these are all different APIs and not aliases. However, it will help check all of them consistently. I wanted to check if this idea made sense before pushing in that direction. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090107/7039a68b/attachment.html>
Yeah, I can probably unify the fixtures but leave the expectations in the individual spec files. From: Jim Deville Sent: Wednesday, January 07, 2009 11:25 AM To: Shri Borde Cc: ironruby-core at rubyforge.org Subject: RE: Thread status tests I would rather implement them all separately. They all act differently. Status returns a simple string, inspect returns an inspection string, and alive and stop are Boolean. I would leave the shared pattern for the way it is now. You can probably take advantage of sharing methods in the fixtures. JD From: Shri Borde Sent: Wednesday, January 07, 2009 12:43 AM To: Jim Deville Cc: ironruby-core at rubyforge.org Subject: Thread status tests There are four ways to check the status of threads, Thread#status, Thread#inspect, Thread#alive?, and Thread#stop?. Any objection to adding a single shared file which checks the result of all the four APIs? It won''t follow the standard pattern of it_behaves_like for aliases since these are all different APIs and not aliases. However, it will help check all of them consistently. I wanted to check if this idea made sense before pushing in that direction. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090107/4926375a/attachment-0001.html>