Discussion:
[Pdl-porters] PDL test suite clean-up
Zakariyya Mughal
2015-02-03 22:57:17 UTC
Permalink
Hello everyone,

I'm going to keep this thread open for discussion on the changes for
test cleanup that I am working on.

I am curious if some of the following lines are necessary in the tests:

- Enabling autoflush:

# for example in t/bool.t
$| = 1;

- Killing the test if debugging enabled. This is present in 37/93 of the
test files.

# PDL::Core::set_debugging(1);
kill INT,$$ if $ENV{UNDER_DEBUGGER}; # Useful for debugging.

Also, I'm adding Test::Exception the build dependencies, as this makes
the tests much more clear.

Regards,
- Zaki Mughal
Edward Baudrez
2015-02-04 08:03:06 UTC
Permalink
Post by Zakariyya Mughal
- Killing the test if debugging enabled. This is present in 37/93 of the
test files.
# PDL::Core::set_debugging(1);
kill INT,$$ if $ENV{UNDER_DEBUGGER}; # Useful for debugging.
I don't know the particular reason for this line, but AFAIK sending INT to
gdb breaks execution and hands over control to the user. It's not really
'killing' the test if that is what you mean. More a means to set a
breakpoint automatically. Don't know what it does in the Perl debugger.



Edward

Loading...