Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
cc838150
Commit
cc838150
authored
Oct 20, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc-control smoke test. Feel free to extend
parent
255cdb14
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
1 deletion
+89
-1
src/Makefile.am
src/Makefile.am
+5
-1
src/control/testapi.c
src/control/testapi.c
+84
-0
No files found.
src/Makefile.am
View file @
cc838150
...
@@ -351,7 +351,7 @@ misc/revision.c:
...
@@ -351,7 +351,7 @@ misc/revision.c:
###############################################################################
###############################################################################
# Unit/regression test
# Unit/regression test
###############################################################################
###############################################################################
check_PROGRAMS
=
test_i18n_atof test_url test_utf8
check_PROGRAMS
=
test_i18n_atof test_url test_utf8
test_control
TESTS
=
$(check_PROGRAMS)
TESTS
=
$(check_PROGRAMS)
CFLAGS_tests
=
`
$(VLC_CONFIG)
--cflags
libvlc
`
CFLAGS_tests
=
`
$(VLC_CONFIG)
--cflags
libvlc
`
...
@@ -367,6 +367,10 @@ test_utf8_SOURCES = test/utf8.c
...
@@ -367,6 +367,10 @@ test_utf8_SOURCES = test/utf8.c
test_utf8_LDADD
=
libvlc.la
test_utf8_LDADD
=
libvlc.la
test_utf8_CFLAGS
=
$(CFLAGS_tests)
test_utf8_CFLAGS
=
$(CFLAGS_tests)
test_control_SOURCES
=
control/testapi.c
test_control_LDADD
=
libvlc-control.la
test_control_CFLAGS
=
$(CFLAGS_tests)
FORCE
:
FORCE
:
@
echo
"Generated source cannot be phony. Go away."
>
&2
@
echo
"Generated source cannot be phony. Go away."
>
&2
@
exit
1
@
exit
1
...
...
src/control/testapi.c
0 → 100644
View file @
cc838150
/*
* testapi.c - libvlc-control smoke test
*
* $Id$
*/
/**********************************************************************
* Copyright (C) 2007 Rémi Denis-Courmont. *
* This program is free software; you can redistribute and/or modify *
* it under the terms of the GNU General Public License as published *
* by the Free Software Foundation; version 2 of the license, or (at *
* your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, you can get it from: *
* http://www.gnu.org/copyleft/gpl.html *
**********************************************************************/
#include <vlc/mediacontrol.h>
#include <assert.h>
int
main
(
int
argc
,
char
*
argv
[])
{
mediacontrol_Exception
ex
;
mediacontrol_Instance
*
mc
,
*
mc2
;
libvlc_instance_t
*
vlc
;
mediacontrol_exception_init
(
&
ex
);
mc
=
mediacontrol_new
(
argc
,
argv
,
&
ex
);
assert
(
mc
);
assert
(
!
ex
.
code
);
mediacontrol_exception_cleanup
(
&
ex
);
/* Duplication test */
vlc
=
mediacontrol_get_libvlc_instance
(
mc
);
assert
(
vlc
);
assert
(
!
ex
.
code
);
mediacontrol_exception_init
(
&
ex
);
mc2
=
mediacontrol_new_from_instance
(
vlc
,
&
ex
);
assert
(
mc2
);
assert
(
!
ex
.
code
);
mediacontrol_exception_cleanup
(
&
ex
);
//mediacontrol_exit (mc2);
/* Input tests */
mediacontrol_exception_init
(
&
ex
);
mediacontrol_resume
(
mc
,
NULL
,
&
ex
);
assert
(
ex
.
code
);
/* should fail: we have no input */
mediacontrol_exception_cleanup
(
&
ex
);
mediacontrol_exception_init
(
&
ex
);
mediacontrol_pause
(
mc
,
NULL
,
&
ex
);
assert
(
ex
.
code
);
/* should fail: we have no input */
mediacontrol_exception_cleanup
(
&
ex
);
mediacontrol_exception_init
(
&
ex
);
mediacontrol_stop
(
mc
,
NULL
,
&
ex
);
mediacontrol_exception_cleanup
(
&
ex
);
/* Playlist tests */
mediacontrol_exception_init
(
&
ex
);
mediacontrol_playlist_clear
(
mc
,
&
ex
);
assert
(
!
ex
.
code
);
mediacontrol_exception_cleanup
(
&
ex
);
mediacontrol_exception_init
(
&
ex
);
mediacontrol_playlist_add_item
(
mc
,
"/dev/null"
,
&
ex
);
mediacontrol_exception_cleanup
(
&
ex
);
mediacontrol_exception_init
(
&
ex
);
mediacontrol_playlist_clear
(
mc
,
&
ex
);
assert
(
!
ex
.
code
);
mediacontrol_exception_cleanup
(
&
ex
);
mediacontrol_exit
(
mc
);
return
0
;
}
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