lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r467453 - in /lucene/lucy/trunk/charmonizer/src/Charmonizer/Test: TestHandler.charm TestHandler.harm
Date Tue, 24 Oct 2006 19:48:56 GMT
Author: marvin
Date: Tue Oct 24 12:48:55 2006
New Revision: 467453

URL: http://svn.apache.org/viewvc?view=rev&rev=467453
Log:
Add Skip and Skip_Remaining.  Correct an erroneous comment about output.

Modified:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.charm?view=diff&rev=467453&r1=467452&r2=467453
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.charm Tue Oct 24 12:48:55
2006
@@ -16,6 +16,18 @@
     }
 }
 
+void
+chaz_TestHand_report_skip(const char *message, int test_num)
+{
+    printf("%-4d skip: %s\n", test_num, message);
+}
+
+void
+chaz_TestHand_report_skip_remaining(const char *message, int remaining)
+{
+    printf("Skipping all %d remaining tests: %s\n", remaining, message);
+}
+
 /**
  * Copyright 2006 The Apache Software Foundation
  *

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm?view=diff&rev=467453&r1=467452&r2=467453
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm Tue Oct 24 12:48:55
2006
@@ -44,11 +44,21 @@
 chaz_TestHand_test_VariadicMacros(
     int *num_tests, int *num_passed, int *num_failed, int *num_skipped);
 
-/* Print a message to stderr indicating pass/fail based on [value].
+/* Print a message indicating pass/fail based on [value].
  */
 chaz_bool_t
 chaz_TestHand_report(int value, const char *message, int test_num);
 
+/* Print a message indicating that a test was skipped.
+ */
+void
+chaz_TestHand_report_skip(const char *message, int test_num);
+
+/* Print a message indicating that all remaining tests will be skipped.
+ */
+void
+chaz_TestHand_report_skip_remaining(const char *message, int remaining);
+
 /* Wrap a call to report(), incrementing tallies based on the results of the
  * test.
  */
@@ -62,6 +72,18 @@
              (*num_failed)++; \
      } while (0)
 
+#define Chaz_TestHand_Skip(message) \
+    do { \
+        test_num++; \
+        chaz_TestHand_report_skip(message, test_num); \
+    } while (0)
+
+#define Chaz_TestHand_Skip_Remaining(message) \
+    do { \
+        chaz_TestHand_report_skip_remaining(message, *num_skipped); \
+        return; \
+    } while (0)
+
 #ifdef CHAZ_USE_SHORT_NAMES
 # define TestHand_test_FuncMacro        chaz_TestHand_test_FuncMacro
 # define TestHand_test_Integers         chaz_TestHand_test_Integers
@@ -69,7 +91,11 @@
 # define TestHand_test_UnusedVars       chaz_TestHand_test_UnusedVars
 # define TestHand_test_VariadicMacros   chaz_TestHand_test_VariadicMacros
 # define TestHand_report                chaz_TestHand_report
+# define TestHand_report_skip           chaz_TestHand_report_skip
+# define TestHand_report_skip_remaining chaz_TestHand_report_skip_remaining
 # define Assert_True                    Chaz_TestHand_Assert_True
+# define Skip                           Chaz_TestHand_Skip
+# define Skip_Remaining                 Chaz_TestHand_Skip_Remaining
 #endif
 
 #endif /* H_CHAZ_TEST_HANDLER */



Mime
View raw message