]> git.sesse.net Git - vlc/blobdiff - test/pyunit.h
wx/interfaces.cpp: Add an option to display tool bar buton name.
[vlc] / test / pyunit.h
index 1b07165e7ac9e46fa52fadccc272fcdc5ad7be1b..f1284e0ef7e58a720d24f9a6b49efe9dc26a7ad8 100644 (file)
@@ -6,8 +6,14 @@
         Py_InitModule( #module, module##_methods );                     \
 }
 
-#define ASSERT_EXCEPTION if( libvlc_exception_raised( &exception ) ) { \
+#define ASSERT_NOEXCEPTION if( libvlc_exception_raised( &exception ) ) { \
          if( libvlc_exception_get_message( &exception ) )  PyErr_SetString( PyExc_AssertionError, libvlc_exception_get_message( &exception ) ); \
          else PyErr_SetString( PyExc_AssertionError, "Exception raised" ); return NULL; }
 
+#define ASSERT_EXCEPTION if( !libvlc_exception_raised( &exception ) ) { \
+         if( libvlc_exception_get_message( &exception ) )  PyErr_SetString( PyExc_AssertionError, libvlc_exception_get_message( &exception ) ); \
+         else PyErr_SetString( PyExc_AssertionError, "Exception not raised" ); return NULL; }
+
+
+
 #define DEF_METHOD( method, desc ) { #method, method, METH_VARARGS, desc},