Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
1e9a47f3
Commit
1e9a47f3
authored
Jan 29, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test some things
parent
4dfa4e63
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
6 deletions
+46
-6
test/NativeLibvlcTest.py
test/NativeLibvlcTest.py
+6
-2
test/TODO
test/TODO
+4
-2
test/native_libvlc/native_libvlc_test.c
test/native_libvlc/native_libvlc_test.c
+36
-1
test/test.sh
test/test.sh
+0
-1
No files found.
test/NativeLibvlcTest.py
View file @
1e9a47f3
...
@@ -4,5 +4,9 @@ import unittest
...
@@ -4,5 +4,9 @@ import unittest
import
native_libvlc_test
import
native_libvlc_test
class
NativeLibvlcTestCase
(
unittest
.
TestCase
):
class
NativeLibvlcTestCase
(
unittest
.
TestCase
):
def
testMe
(
self
):
def
testException
(
self
):
native_libvlc_test
.
create_destroy
()
"""Checks libvlc_exception"""
native_libvlc_test
.
exception_test
()
def
testStartup
(
self
):
"""Checks creation/destroy of libvlc"""
native_libvlc_test
.
create_destroy
()
test/TODO
View file @
1e9a47f3
* Write wrapper with output redirection / use of logger interface + log checker (look for error in log and fail if any)
- We can use this to test streams
*
Write wrapper around MediaControl with output redirection / use of logger interface + log checker (look for error in log and fail if any)
*
Invent something for testing streams
*
*
Test stats
test/native_libvlc/native_libvlc_test.c
View file @
1e9a47f3
#include "../pyunit.h"
#include "../pyunit.h"
#include <vlc/libvlc.h>
static
PyObject
*
exception_test
(
PyObject
*
self
,
PyObject
*
args
)
{
libvlc_exception_t
exception
;
libvlc_exception_init
(
&
exception
);
ASSERT
(
!
libvlc_exception_raised
(
&
exception
)
,
"Exception raised"
);
ASSERT
(
!
libvlc_exception_get_message
(
&
exception
)
,
"Exception raised"
);
libvlc_exception_raise
(
&
exception
,
NULL
);
ASSERT
(
!
libvlc_exception_get_message
(
&
exception
),
"Unexpected message"
);
ASSERT
(
libvlc_exception_raised
(
&
exception
),
"Exception not raised"
);
libvlc_exception_raise
(
&
exception
,
"test"
);
ASSERT
(
libvlc_exception_get_message
(
&
exception
),
"No Message"
);
ASSERT
(
libvlc_exception_raised
(
&
exception
),
"Exception not raised"
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
PyObject
*
create_destroy
(
PyObject
*
self
,
PyObject
*
args
)
static
PyObject
*
create_destroy
(
PyObject
*
self
,
PyObject
*
args
)
{
{
/* Test stuff here */
libvlc_instance_t
*
p_instance
;
char
*
argv
[]
=
{};
libvlc_exception_t
exception
;
libvlc_exception_init
(
&
exception
);
p_instance
=
libvlc_new
(
0
,
argv
,
&
exception
);
ASSERT
(
p_instance
!=
NULL
,
"Instance creation failed"
);
ASSERT
(
!
libvlc_exception_raised
(
&
exception
),
"Exception raised while creating instance"
);
libvlc_destroy
(
p_instance
);
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -10,6 +44,7 @@ static PyObject *create_destroy( PyObject *self, PyObject *args )
...
@@ -10,6 +44,7 @@ static PyObject *create_destroy( PyObject *self, PyObject *args )
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"
)
DEF_METHOD
(
exception_test
,
"Test Exception handling"
)
{
NULL
,
NULL
,
0
,
NULL
}
{
NULL
,
NULL
,
0
,
NULL
}
};
};
...
...
test/test.sh
View file @
1e9a47f3
#! /bin/sh
#! /bin/sh
# FIXME - Get real .so
cd
..
cd
..
export
PYTHONPATH
=
$PYTHONPATH
:bindings/python/build/lib.linux-i686-2.3:test/build/lib.linux-i686-2.3
export
PYTHONPATH
=
$PYTHONPATH
:bindings/python/build/lib.linux-i686-2.3:test/build/lib.linux-i686-2.3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment