Oops, fix last commit so that it also works with modf().
[gnulib.git] / tests / test-base64.c
index 8d4a0c6..06f0b02 100644 (file)
@@ -1,5 +1,5 @@
 /* Self tests for base64.
-   Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2008, 2009, 2010 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software: you can redistribute it and/or modify
 
 #include <config.h>
 
+#include "base64.h"
+
 #include <stddef.h>
-#include <stdio.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdint.h>
 
-#include "base64.h"
-
-#define ASSERT(expr)                                                   \
-  do                                                                   \
-    {                                                                  \
-      if (!(expr))                                                     \
-       {                                                               \
-         fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-         fflush (stderr);                                              \
-         abort ();                                                     \
-       }                                                               \
-    }                                                                  \
-  while (0)
+#include "macros.h"
 
 int
 main (void)
@@ -50,7 +39,7 @@ main (void)
 
   memset (out, 0x42, sizeof (out));
   base64_encode (in, 0, out, 0);
-  ASSERT(out[0] == '\x42');
+  ASSERT (out[0] == '\x42');
 
   memset (out, 0x42, sizeof (out));
   base64_encode (in, 1, out, 1);