Commit 59cd4c2c authored by Clément Stenac's avatar Clément Stenac

Clean-up test

parent 4db506d3
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
*****************************************************************************/ *****************************************************************************/
#include "../pyunit.h" #include "../pyunit.h"
#include <vlc/vlc.h>
#include "charset.h" #include "charset.h"
PyObject *i18n_atof_test( PyObject *self, PyObject *args )
static PyObject *i18n_atof_test( PyObject *self, PyObject *args )
{ {
const char dot9[] = "999999.999999"; const char dot9[] = "999999.999999";
const char comma9[] = "999999,999999"; const char comma9[] = "999999,999999";
......
#include "tests.h"
// TODO: Ugly, split correctly
#include "libvlc.c"
#include "stats.c"
#include "i18n.c"
#include "url.c"
static PyMethodDef native_libvlc_test_methods[] = { static PyMethodDef native_libvlc_test_methods[] = {
DEF_METHOD( create_destroy, "Create and destroy" ) DEF_METHOD( create_destroy, "Create and destroy" )
......
#include "../pyunit.h" #include "../pyunit.h"
#include <vlc/libvlc.h> #include <vlc/libvlc.h>
static PyObject *exception_test( PyObject *self, PyObject *args ) PyObject *exception_test( PyObject *self, PyObject *args )
{ {
libvlc_exception_t exception; libvlc_exception_t exception;
...@@ -24,7 +24,7 @@ static PyObject *exception_test( PyObject *self, PyObject *args ) ...@@ -24,7 +24,7 @@ static PyObject *exception_test( PyObject *self, PyObject *args )
return Py_None; return Py_None;
} }
static PyObject *create_destroy( PyObject *self, PyObject *args ) PyObject *create_destroy( PyObject *self, PyObject *args )
{ {
libvlc_instance_t *p_instance; libvlc_instance_t *p_instance;
char *argv[] = { "vlc", "--quiet" }; char *argv[] = { "vlc", "--quiet" };
...@@ -45,7 +45,7 @@ static PyObject *create_destroy( PyObject *self, PyObject *args ) ...@@ -45,7 +45,7 @@ static PyObject *create_destroy( PyObject *self, PyObject *args )
return Py_None; return Py_None;
} }
static PyObject *playlist_test( PyObject *self, PyObject *args ) PyObject *playlist_test( PyObject *self, PyObject *args )
{ {
libvlc_instance_t *p_instance; libvlc_instance_t *p_instance;
char *argv[] = { "vlc", "--quiet" }; char *argv[] = { "vlc", "--quiet" };
...@@ -89,7 +89,7 @@ static PyObject *playlist_test( PyObject *self, PyObject *args ) ...@@ -89,7 +89,7 @@ static PyObject *playlist_test( PyObject *self, PyObject *args )
return Py_None; return Py_None;
} }
static PyObject *vlm_test( PyObject *self, PyObject *args ) PyObject *vlm_test( PyObject *self, PyObject *args )
{ {
libvlc_instance_t *p_instance; libvlc_instance_t *p_instance;
char *argv[] = { "vlc", "--quiet" }; char *argv[] = { "vlc", "--quiet" };
......
#include "../pyunit.h" #include "../pyunit.h"
#include <vlc/vlc.h> #include <vlc/vlc.h>
static PyObject *timers_test( PyObject *self, PyObject *args ) PyObject *timers_test( PyObject *self, PyObject *args )
{ {
Py_INCREF( Py_None ); Py_INCREF( Py_None );
return Py_None; return Py_None;
......
#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 );
...@@ -19,13 +19,11 @@ ...@@ -19,13 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "../pyunit.h"
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include "vlc_url.h" #include "vlc_url.h"
#include <stdio.h> PyObject * test_decode (const char *in, const char *out)
#include <stdlib.h>
static PyObject * test_decode (const char *in, const char *out)
{ {
char *res; char *res;
...@@ -41,7 +39,7 @@ static PyObject * test_decode (const char *in, const char *out) ...@@ -41,7 +39,7 @@ static PyObject * test_decode (const char *in, const char *out)
return Py_None; 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); (void)setvbuf (stdout, NULL, _IONBF, 0);
if( !test_decode ("this_should_not_be_modified_1234", if( !test_decode ("this_should_not_be_modified_1234",
......
...@@ -40,7 +40,8 @@ def get_ldflags(): ...@@ -40,7 +40,8 @@ def get_ldflags():
# To compile in a local vlc tree # To compile in a local vlc tree
native_libvlc_test = Extension( 'native_libvlc_test', 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' ], include_dirs = ['../include', '../', '/usr/win32/include' ],
extra_objects = [ '../src/.libs/libvlc.so' ], extra_objects = [ '../src/.libs/libvlc.so' ],
extra_compile_args = get_cflags(), extra_compile_args = get_cflags(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment