You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2006/10/24 20:00:13 UTC

svn commit: r467409 - in /lucene/lucy/trunk: charmonizer/charm_test.c perl/t/100-charmonizer.t

Author: marvin
Date: Tue Oct 24 11:00:13 2006
New Revision: 467409

URL: http://svn.apache.org/viewvc?view=rev&rev=467409
Log:
Add comments to charm_test.c; make parsing a little more robust in perl
wrapper.

Modified:
    lucene/lucy/trunk/charmonizer/charm_test.c
    lucene/lucy/trunk/perl/t/100-charmonizer.t

Modified: lucene/lucy/trunk/charmonizer/charm_test.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/charm_test.c?view=diff&rev=467409&r1=467408&r2=467409
==============================================================================
--- lucene/lucy/trunk/charmonizer/charm_test.c (original)
+++ lucene/lucy/trunk/charmonizer/charm_test.c Tue Oct 24 11:00:13 2006
@@ -1,14 +1,15 @@
 #include <stdio.h>
 #include "Charmonizer/Test/TestHandler.h"
 
+/* this is the signature for all Charmonizer test functions */
 typedef void
 (*t_func)(int *num_tests, int *num_passed, int *num_failed, int *num_skipped);
 
+/* create an array of test functions to loop through */
 typedef struct TestGroup {
     const char *name;
     t_func func;
 } TestGroup;
-
 TestGroup tests[] = {
     { "FuncMacro", chaz_TestHand_test_FuncMacro },
     { "Integers", chaz_TestHand_test_Integers },
@@ -23,6 +24,7 @@
     int total_skipped = 0;
     int i;
 
+    /* loop through test functions, accumulating results */
     for (i = 0; tests[i].name != NULL; i++) {
         t_func test_func = tests[i].func;
         const char *name = tests[i].name;
@@ -38,8 +40,9 @@
             num_tests, num_passed, num_failed, num_skipped);
     }
     
+    /* print totals */
     printf("=============================\n");
-    printf("TOTAL TESTS: %d\nTOTAL PASSED: %d\nTOTAL FAILED: %d\n"
+    printf("TOTAL TESTS:   %d\nTOTAL PASSED:  %d\nTOTAL FAILED:  %d\n"
         "TOTAL SKIPPED: %d\n", 
         total_tests, total_passed, total_failed, total_skipped);
     return 0;

Modified: lucene/lucy/trunk/perl/t/100-charmonizer.t
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/perl/t/100-charmonizer.t?view=diff&rev=467409&r1=467408&r2=467409
==============================================================================
--- lucene/lucy/trunk/perl/t/100-charmonizer.t (original)
+++ lucene/lucy/trunk/perl/t/100-charmonizer.t Tue Oct 24 11:00:13 2006
@@ -10,7 +10,7 @@
 
 # capture and parse output of 'charm_test' 
 my $charm_test_output = qx|charm_test|;
-$charm_test_output =~ /TOTAL FAILED: (\d+)/ 
+$charm_test_output =~ /TOTAL FAILED:\s*(\d+)/ 
     or die "Didn't receive expected output from 'charm_test'";
 my $total_failed = $1;