]> git.sesse.net Git - vlc/commitdiff
Clean-up test
authorClément Stenac <zorglub@videolan.org>
Fri, 14 Apr 2006 14:25:26 +0000 (14:25 +0000)
committerClément Stenac <zorglub@videolan.org>
Fri, 14 Apr 2006 14:25:26 +0000 (14:25 +0000)
test/native/i18n.c
test/native/init.c
test/native/libvlc.c
test/native/stats.c
test/native/tests.h [new file with mode: 0644]
test/native/url.c
test/setup.py

index fef1f83911287f47a26192df27815823bb43f78c..3de5437dd95cdcd28a3ae224a74cfb200b5f5b8d 100644 (file)
  *****************************************************************************/
 
 #include "../pyunit.h"
+#include <vlc/vlc.h>
 #include "charset.h"
 
-
-static PyObject *i18n_atof_test( PyObject *self, PyObject *args )
+PyObject *i18n_atof_test( PyObject *self, PyObject *args )
 {
     const char dot9[] = "999999.999999";
     const char comma9[] = "999999,999999";
index 352e5e13dbd55975aaf7dadb05b493b0e5b39fed..902e56a77989a1f959113469f7d7158ebc10a3c8 100644 (file)
@@ -1,9 +1,4 @@
-
-// TODO: Ugly, split correctly 
-#include "libvlc.c"
-#include "stats.c"
-#include "i18n.c"
-#include "url.c"
+#include "tests.h"
 
 static PyMethodDef native_libvlc_test_methods[] = {
    DEF_METHOD( create_destroy, "Create and destroy" )
index 6a6b48211bc2ced95ff6bd82548c4e62fec1bd24..5611ae5c779b1065404d551473907edbad0b1a5e 100644 (file)
@@ -1,7 +1,7 @@
 #include "../pyunit.h"
 #include <vlc/libvlc.h>
 
-static PyObject *exception_test( PyObject *self, PyObject *args )
+ PyObject *exception_test( PyObject *self, PyObject *args )
 {
      libvlc_exception_t exception;
 
@@ -24,7 +24,7 @@ static PyObject *exception_test( PyObject *self, PyObject *args )
      return Py_None;
 }
 
-static PyObject *create_destroy( PyObject *self, PyObject *args )
+ PyObject *create_destroy( PyObject *self, PyObject *args )
 {
     libvlc_instance_t *p_instance;
     char *argv[] = { "vlc", "--quiet" };
@@ -45,7 +45,7 @@ static PyObject *create_destroy( PyObject *self, PyObject *args )
     return Py_None;
 }
 
-static PyObject *playlist_test( PyObject *self, PyObject *args )
+ PyObject *playlist_test( PyObject *self, PyObject *args )
 {
     libvlc_instance_t *p_instance;
     char *argv[] = { "vlc", "--quiet" };
@@ -89,7 +89,7 @@ static PyObject *playlist_test( PyObject *self, PyObject *args )
     return Py_None;
 }
 
-static PyObject *vlm_test( PyObject *self, PyObject *args )
+ PyObject *vlm_test( PyObject *self, PyObject *args )
 {
     libvlc_instance_t *p_instance;
     char *argv[] = { "vlc", "--quiet" };
index d48575e0a2c74b956aa46d7360c8e97a8d2e94c1..3a20702da8ada2d4069e735175be2a13e54cee7a 100644 (file)
@@ -1,7 +1,7 @@
 #include "../pyunit.h"
 #include <vlc/vlc.h>
 
-static PyObject *timers_test( PyObject *self, PyObject *args )
+PyObject *timers_test( PyObject *self, PyObject *args )
 {
      Py_INCREF( Py_None );
      return Py_None;
diff --git a/test/native/tests.h b/test/native/tests.h
new file mode 100644 (file)
index 0000000..3ff4f2e
--- /dev/null
@@ -0,0 +1,12 @@
+#include "../pyunit.h"
+
+PyObject *exception_test( PyObject *self, PyObject *args );
+PyObject *create_destroy( PyObject *self, PyObject *args );
+PyObject *playlist_test( PyObject *self, PyObject *args );
+PyObject *vlm_test( PyObject *self, PyObject *args );
+
+PyObject *timers_test( PyObject *self, PyObject *args );
+
+PyObject *url_decode_test( PyObject *self, PyObject *args );
+
+PyObject *i18n_atof_test( PyObject *self, PyObject *args );
index eed90d2b48821f67c4287f97e56d8588961308cb..8fb65fc5f7b12fdbadb18e3f8acb2e1dd7a52735 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#include "../pyunit.h"
 #include <vlc/vlc.h>
 #include "vlc_url.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-
-static PyObject * test_decode (const char *in, const char *out)
+ PyObject * test_decode (const char *in, const char *out)
 {
     char *res;
 
@@ -41,7 +39,7 @@ static PyObject * test_decode (const char *in, const char *out)
     return Py_None;
 }
 
-static PyObject *url_decode_test( PyObject *self, PyObject *args )
+ PyObject *url_decode_test( PyObject *self, PyObject *args )
 {
     (void)setvbuf (stdout, NULL, _IONBF, 0);
     if( !test_decode ("this_should_not_be_modified_1234",
index d1baa4099838e871baeda9253157a8535a9db650..dc43b12754d584a39f61d583b69205ed65835bf4 100644 (file)
@@ -40,7 +40,8 @@ def get_ldflags():
 
 # To compile in a local vlc tree
 native_libvlc_test = Extension( 'native_libvlc_test',
-                sources = ['native/init.c'],
+                sources = ['native/init.c', 'native/url.c', 'native/i18n.c',
+                          'native/stats.c', 'native/libvlc.c'],
                 include_dirs = ['../include', '../', '/usr/win32/include' ],
                 extra_objects = [ '../src/.libs/libvlc.so' ],
                 extra_compile_args = get_cflags(),