Hi Philip,
It seems as though you are doing a lot of work to embed PerlUnit
into your development environment when you don't have to. There
is another project called CppUnit that would save you a lot of time
and headache.
http://cppunit.sourceforge.net
Cheers,
Kyle Brost
----
Senior Software Developer
Quest Software
909 - 11th Avenue SW, Suite 800
Office: 403.264.8322 ext. 234
Fax: 403.265.5307
www.quest.com
-----Original Message-----
From: Phlip [mailto:pl...@sy...]
Sent: Friday, November 08, 2002 11:28 AM
To: per...@li...
Subject: [Perlunit-users] Test-Unit on Win32: OutputDebugString at
'assert' failure time?
Perlies:
I like unit tests. My employers like Win32, VC++, and Perl. So here I am
writing an "acceptance test" rig for our VC++ code, and it calls
Perl embedded in the C++ code.
When an assertion fails, such as this one...
$self -> assert ($result =~ /LW is god/);
...I want the VC++ Output window to contain the file name, line number, and
spit-list of the failure:
c:\projects\testage.pm:14: get a clue, homey...
That way I can tap <F4> and go straight to the offending line in the editor.
No more reading & GotoLine-ing. That's the computer's job.
(Other Perl editors may support these kinds of features before the new
Millenium is old...)
So first I get OutputDebugString from here:
Win32-API-OutputDebugString-0.03.tar.gz
Now I feel like overriding Test::Unit::Debug::debug so it also pushes text
out OutputDebugString:
use Test::Unit::Debug;
{
package Test::Unit::Debug;
*Test::Unit::Debug::debug = sub {
my ($package, $filename, $line) = caller();
print $out "***************************************that's the facts,
Jack!\n";
print $out @_ if $DEBUG{$package};
}
}
That's as far as I can decipher the documentation on global hostile
takeover-style overrides. But even with "strict" and "-w" turned off,
Perl still screams at me: "Subroutine debug redefined..."
Then, if Perl think's it's "redefined" (past-tense), why don't Perl then
call it?
How am I expected to do this?
(BTW I can't "inherit" Test::Unit::Debug and then overload because the other
Test-Unit stuff won't call my derived class.)
--
Phlip
http://www.greencheese.org/NorovostokNovus
-- All sensors report Patti having a very good time --
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Perlunit-users mailing list
Per...@li...
https://lists.sourceforge.net/lists/listinfo/perlunit-users
|