Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
0453922a
Commit
0453922a
authored
Dec 14, 2008
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jvlc: more libvlc_media unit tests added
parent
6bf00684
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaTest.java
...test/java/org/videolan/jvlc/internal/LibVlcMediaTest.java
+44
-2
No files found.
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaTest.java
View file @
0453922a
...
@@ -28,6 +28,7 @@ package org.videolan.jvlc.internal;
...
@@ -28,6 +28,7 @@ package org.videolan.jvlc.internal;
import
junit.framework.Assert
;
import
junit.framework.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.videolan.jvlc.internal.LibVlc.LibVlcEventManager
;
import
org.videolan.jvlc.internal.LibVlc.LibVlcMedia
;
import
org.videolan.jvlc.internal.LibVlc.LibVlcMedia
;
import
org.videolan.jvlc.internal.LibVlc.libvlc_exception_t
;
import
org.videolan.jvlc.internal.LibVlc.libvlc_exception_t
;
...
@@ -36,7 +37,7 @@ public class LibVlcMediaTest extends AbstractVLCInternalTest
...
@@ -36,7 +37,7 @@ public class LibVlcMediaTest extends AbstractVLCInternalTest
{
{
@Test
@Test
public
void
mediaDescriptor
New
()
throws
Exception
public
void
testMedia
New
()
throws
Exception
{
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
...
@@ -45,12 +46,53 @@ public class LibVlcMediaTest extends AbstractVLCInternalTest
...
@@ -45,12 +46,53 @@ public class LibVlcMediaTest extends AbstractVLCInternalTest
}
}
@Test
@Test
public
void
mediaDescriptor
GetMrl
()
public
void
testMedia
GetMrl
()
{
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
String
mdMrl
=
libvlc
.
libvlc_media_get_mrl
(
md
);
String
mdMrl
=
libvlc
.
libvlc_media_get_mrl
(
md
);
Assert
.
assertEquals
(
mrl
,
mdMrl
);
Assert
.
assertEquals
(
mrl
,
mdMrl
);
}
}
@Test
public
void
testMediaDuplicate
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
LibVlcMedia
md2
=
libvlc
.
libvlc_media_duplicate
(
md
);
Assert
.
assertNotSame
(
md
.
getPointer
(),
md2
.
getPointer
());
Assert
.
assertEquals
(
libvlc
.
libvlc_media_get_mrl
(
md2
),
libvlc
.
libvlc_media_get_mrl
(
md
));
}
@Test
public
void
testMediaEventManager
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
LibVlcEventManager
evManager
=
libvlc
.
libvlc_media_event_manager
(
md
,
exception
);
Assert
.
assertEquals
(
0
,
exception
.
raised
);
Assert
.
assertNotNull
(
evManager
);
}
@Test
public
void
testMediaGetState
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
int
state
=
libvlc
.
libvlc_media_get_state
(
md
,
exception
);
Assert
.
assertEquals
(
0
,
exception
.
raised
);
Assert
.
assertEquals
(
LibVlcState
.
libvlc_NothingSpecial
.
ordinal
(),
state
);
}
@Test
public
void
testMediaIsPreparsed
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMedia
md
=
libvlc
.
libvlc_media_new
(
libvlcInstance
,
mrl
,
exception
);
int
state
=
libvlc
.
libvlc_media_is_preparsed
(
md
,
exception
);
Assert
.
assertEquals
(
0
,
exception
.
raised
);
Assert
.
assertEquals
(
0
,
state
);
}
}
}
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