]> git.sesse.net Git - vlc/blobdiff - test/pyunit.h
C++ fun
[vlc] / test / pyunit.h
index 726ca8d446a646316e5e97decd8b4a1965d2890e..9ca6c6a0b7532b37cb3f8405c0127cb9b47c3ba6 100644 (file)
@@ -2,7 +2,7 @@
 
 extern int asserts;
 
-#define ASSERT( a, message ) asserts++;if( !(a) ) { PyErr_SetString( PyExc_AssertionError, message " - " #a ); return NULL; }
+#define ASSERT( a, message ) asserts++;if( !(a) ) { fprintf( stderr, "Assert failed at %s:%i\n", __FILE__, __LINE__); PyErr_SetString( PyExc_AssertionError, message  " - " #a ); return NULL; }
 
 #define DECLARE_MODULE( module ) PyMODINIT_FUNC init##module( void ) {  \
         Py_InitModule( #module, module##_methods );                     \