Changeset 4db506d372bd4dbd6a0223eb66a98f9dacb4dc62

Show
Ignore:
Timestamp:
04/14/06 16:16:46 (2 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1145024206 +0000
git-parent:

[4923cfeff6360e13aa1ccf052d4c20a9a3801b14]

git-author:
Clément Stenac <zorglub@videolan.org> 1145024206 +0000
Message:

Add I18N and URL tests in test/

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • test/NativeLibvlcTest.py

    r8398230 r4db506d  
    66    def testException( self ): 
    77        """[LibVLC] Checks libvlc_exception""" 
    8       native_libvlc_test.exception_test() 
     8#     native_libvlc_test.exception_test() 
    99    def testStartup( self ): 
    1010        """[LibVLC] Checks creation/destroy of libvlc""" 
    11       native_libvlc_test.create_destroy() 
     11#     native_libvlc_test.create_destroy() 
    1212    def testPlaylist( self ): 
    1313        """[LibVLC] Checks basic playlist interaction""" 
    14       native_libvlc_test.playlist_test() 
     14#     native_libvlc_test.playlist_test() 
    1515    def testVLM( self ): 
    1616        """[LibVLC] Checks VLM wrapper""" 
    17       native_libvlc_test.vlm_test() 
     17#     native_libvlc_test.vlm_test() 
  • test/NativeStatsTest.py

    r8398230 r4db506d  
    11import unittest 
    22 
    3 import native_stats_test 
     3import native_libvlc_test 
    44 
    55class NativeStatsTestCase( unittest.TestCase ): 
    66    def testTimers( self ): 
    77        """[Stats] Test timers""" 
    8         native_stats_test.timers_test() 
     8        native_libvlc_test.timers_test() 
  • test/native/libvlc.c

    r8444ce1 r4db506d  
    147147    return Py_None; 
    148148} 
    149  
    150 static PyMethodDef native_libvlc_test_methods[] = { 
    151    DEF_METHOD( create_destroy, "Create and destroy" ) 
    152    DEF_METHOD( exception_test, "Test Exception handling" ) 
    153    DEF_METHOD( playlist_test, "Test Playlist interaction" ) 
    154    DEF_METHOD( vlm_test, "Test VLM" ) 
    155    { NULL, NULL, 0, NULL } 
    156 }; 
    157  
    158 DECLARE_MODULE( native_libvlc_test ) 
  • test/native/stats.c

    rd0802e7 r4db506d  
    77     return Py_None; 
    88} 
    9  
    10 static PyMethodDef native_stats_test_methods[] = { 
    11    DEF_METHOD( timers_test, "Test timers" ) 
    12    { NULL, NULL, 0, NULL } 
    13 }; 
    14  
    15 DECLARE_MODULE( native_stats_test ) 
  • test/pyunit.h

    re0003be r4db506d  
    11#include <Python.h> 
    22 
    3 #define ASSERT( a, message ) if( !(a) ) { fprintf( stderr, "ASSERTION FAILED\n" ); PyErr_SetString( PyExc_AssertionError, message ); return NULL; } 
     3#define ASSERT( a, message ) if( !(a) ) { PyErr_SetString( PyExc_AssertionError, message " - " #a ); return NULL; } 
    44 
    55#define DECLARE_MODULE( module ) PyMODINIT_FUNC init##module( void ) {  \ 
  • test/setup.py

    r8398230 r4db506d  
    2222    else: 
    2323        cflags=os.popen('%s --cflags' % vlcconfig, 'r').readline().rstrip().split() 
     24    cflags.append( "-D__VLC__") 
    2425        return cflags 
    2526 
     
    4041# To compile in a local vlc tree 
    4142native_libvlc_test = Extension( 'native_libvlc_test', 
    42                 sources = ['native/libvlc.c'], 
     43                sources = ['native/init.c'], 
    4344                include_dirs = ['../include', '../', '/usr/win32/include' ], 
    44                 extra_objects = [ '../src/libvlc.a' ], 
     45                extra_objects = [ '../src/.libs/libvlc.so' ], 
    4546                extra_compile_args = get_cflags(), 
    4647                extra_link_args = [ '-L../..' ]  + get_ldflags(), 
    4748                ) 
    4849 
    49 native_stats_test = Extension( 'native_stats_test', 
    50                 sources = ['native/stats.c'], 
    51                 include_dirs = ['../include', '../', '/usr/win32/include' ], 
    52                 extra_objects = [ '../src/libvlc.a' ], 
    53                 extra_compile_args = get_cflags(), 
    54                 extra_link_args = [ '-L../..' ]  + get_ldflags(), 
    55                 ) 
    56  
    57  
    5850setup( name = 'native_libvlc_test' ,version = '1242', ext_modules = [ native_libvlc_test ] ) 
    59 setup( name = 'native_stats_test' ,version = '1242', ext_modules = [ native_stats_test ] ) 
  • test/test.sh

    r6d4e213 r4db506d  
    11#! /bin/sh 
    22 
     3 
    34cd .. 
    4 export PYTHONPATH=$PYTHONPATH:bindings/mediacontrol-python/build/lib.linux-i686-2.3:test/build/lib.linux-i686-2.3 
     5export PYTHONPATH=$PYTHONPATH:bindings/mediacontrol-python/build/lib.linux-i686-2.3:test/build/lib.linux-i686-2.3:test/build/lib.linux-x86_64-2.3 
    56 
    6 python test/test.py -v 
     7LD_LIBRARY_PATH=src/.libs/ python test/test.py -v