Procházet zdrojové kódy

libdpkg: Make sure NDEBUG is never defined for the test suite

Guillem Jover před 14 roky
rodič
revize
e22a6f1095
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      lib/dpkg/test.h

+ 3 - 2
lib/dpkg/test.h

@@ -2,7 +2,7 @@
  * libdpkg - Debian packaging suite library routines
  * libdpkg - Debian packaging suite library routines
  * test.h - test suite support
  * test.h - test suite support
  *
  *
- * Copyright © 2009 Guillem Jover <guillem@debian.org>
+ * Copyright © 2009-2012 Guillem Jover <guillem@debian.org>
  *
  *
  * This is free software; you can redistribute it and/or modify
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * it under the terms of the GNU General Public License as published by
@@ -28,7 +28,8 @@
 #include <dpkg/ehandle.h>
 #include <dpkg/ehandle.h>
 #endif
 #endif
 
 
-/* XXX: Using assert is problematic with NDEBUG. */
+/* Make sure NDEBUG is never defined, as we rely on the assert() macro. */
+#undef NDEBUG
 
 
 #define test_pass(a)			assert((a))
 #define test_pass(a)			assert((a))
 #define test_fail(a)			assert(!(a))
 #define test_fail(a)			assert(!(a))