perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r35434 - trunk/t/codingstd

Subject: [svn:parrot] r35434 - trunk/t/codingstd
From:
Date: Mon, 12 Jan 2009 04:20:29 -0800 PST
Newsgroups: perl.cvs.parrot

Author: cotto
Date: Mon Jan 12 04:20:28 2009
New Revision: 35434

Modified:
   trunk/t/codingstd/c_arg_assert.t

Log:
[t] make arg assert test's diagnostic output more useful


Modified: trunk/t/codingstd/c_arg_assert.t
==============================================================================
--- trunk/t/codingstd/c_arg_assert.t    (original)
+++ trunk/t/codingstd/c_arg_assert.t    Mon Jan 12 04:20:28 2009
@@ -46,7 +46,7 @@
         my @lines = ($file->read());
         foreach my $line (@lines) {
             if($line =~ /^#define ASSERT_ARGS_([_a-zA-Z0-9]+)\s/s) {
-                push(@defines, $1);
+                push(@defines, [$1, $path] );
             }
             if($line =~ /^\s+ASSERT_ARGS\(([_a-zA-Z0-9]+)\)$/) {
                 my $func = $1;
@@ -60,12 +60,12 @@
     }
 
     # next, cross reference them.
-    my @missing = grep { !exists($usages{$_}) } @defines;
+    my @missing = grep { !exists($usages{$_->[0]}) } @defines;
     ok(!scalar @missing);
     if(scalar @missing) {
         diag("unused assert macros found:");
         foreach my $missing (sort @missing) {
-            diag($missing);
+            diag($missing->[1] . ": " . $missing->[0]);
         }
         diag(scalar(@missing) . " unused assert macros found in total.");
     }

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r35434 - trunk/t/codingstd, cotto <=