Removed `-sched' tests. Reorganized so that we can theoretically have
authormdw <mdw>
Sun, 29 Apr 2001 17:39:15 +0000 (17:39 +0000)
committermdw <mdw>
Sun, 29 Apr 2001 17:39:15 +0000 (17:39 +0000)
multiple tests in the same file.  (This isn't so useful in production,
but it's handy when doing test builds.)

blkc.h

diff --git a/blkc.h b/blkc.h
index 1debf54..6e1ea0a 100644 (file)
--- a/blkc.h
+++ b/blkc.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: blkc.h,v 1.3 2000/06/17 10:47:06 mdw Exp $
+ * $Id: blkc.h,v 1.4 2001/04/29 17:39:15 mdw Exp $
  *
  * Common definitions for block ciphers
  *
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: blkc.h,v $
+ * Revision 1.4  2001/04/29 17:39:15  mdw
+ * Removed `-sched' tests.  Reorganized so that we can theoretically have
+ * multiple tests in the same file.  (This isn't so useful in production,
+ * but it's handy when doing test builds.)
+ *
  * Revision 1.3  2000/06/17 10:47:06  mdw
  * Slight support for 96-bit ciphers.  Support for counter-mode ciphers.
  *
 #include <mLib/quis.h>
 #include <mLib/testrig.h>
 
-#define BLKC_TEST(PRE, pre)                                            \
+#define BLKC_VERIFY(PRE, pre)                                          \
                                                                        \
-static int verify(dstr *v)                                             \
+static int pre##_verify(dstr *v)                                       \
 {                                                                      \
   pre##_ctx k;                                                         \
   uint32 p[PRE##_BLKSZ / 4];                                           \
@@ -306,11 +311,14 @@ static int verify(dstr *v)                                                \
   /* --- Return --- */                                                 \
                                                                        \
   return (ok);                                                         \
-}                                                                      \
+}
+
+#define BLKC_TEST(PRE, pre)                                            \
+                                                                       \
+BLKC_VERIFY(PRE, pre)                                                  \
                                                                        \
 static test_chunk defs[] = {                                           \
-  { #pre, verify, { &type_hex, &type_hex, &type_hex, 0 } },            \
-  { #pre "-sched", verify, { &type_hex, &type_hex, &type_hex, 0 } },   \
+  { #pre, pre##_verify, { &type_hex, &type_hex, &type_hex, 0 } },      \
   { 0, 0, { 0 } }                                                      \
 };                                                                     \
                                                                        \
@@ -321,6 +329,7 @@ int main(int argc, char *argv[])                                    \
 }
 
 #else
+#  define BLKC_VERIFY(PRE, pre)
 #  define BLKC_TEST(PRE, pre)
 #endif