From: "James Keenan via RT" <[EMAIL PROTECTED]> Date: Sat, 02 Jun 2007 05:12:41 -0700
On Fri Jun 01 19:46:40 2007, rgrjr wrote: > This is from the "Small tweak to Pmc2c.pm" I posted on 19-May and > committed as r18646 on 26-May. Note that lib/Parrot/Pmc2c.pm is not > actually doing anything different now, it's just telling you that none > of the code for these methods is being used in the generated C file. > So > they are certainly not being tested now, and possibly haven't been for > a > while. When the expected behavior of a block of code is to throw warnings, then tests should be written to make sure those warnings are, in fact, being thrown. We can do this in our Perl 5- based tests by using Parrot::IO::Capture::Mini to capture the warnings, then using Test::More::like() to determine if we got the warnings we expected. In r18763 I took this approach and applied the following patch to t/tools/pmc2cutils/05-gen_c.t . . . This seems like a lot of trouble just to keep dead code in the codebase. Is there some reason not to yank the useless methods? -- Bob