Revision: 1293
Author: [email protected]
Date: Thu Jun 10 01:46:14 2010
Log: Fix test to expect srclines_array to return undef when '-' file has no src.

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1293

Modified:
 /trunk/t/40-savesrc.t

=======================================
--- /trunk/t/40-savesrc.t       Mon May  3 13:49:06 2010
+++ /trunk/t/40-savesrc.t       Thu Jun 10 01:46:14 2010
@@ -30,13 +30,13 @@
         my $fi_s = $profile->fileinfo_of('-');
isa_ok $fi_s, 'Devel::NYTProf::FileInfo', 'should have fileinfo for "-"';

-        my $lines_s = $fi_s->srclines_array;
- isa_ok $lines_s, 'ARRAY', 'srclines_array should return an array ref';
-
         my $fi_e = $profile->fileinfo_of('(eval 1)[-:1]');
isa_ok $fi_e, 'Devel::NYTProf::FileInfo', 'should have fileinfo for "(eval 0)[-:1]"';

         if ($env->{savesrc}) {
+            my $lines_s = $fi_s->srclines_array;
+ isa_ok $lines_s, 'ARRAY', 'srclines_array should return an array ref';
+
             is $lines_s->[0], $src_code, 'source code line should match';
             my $lines_e = $fi_e->srclines_array;
             # perl adds a newline to eval strings
@@ -44,7 +44,7 @@
             #warn "@$lines_e";
         }
         else {
-            pass() for 1..2;
+            pass() for 1..3;
         }
     },
 });

--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to