File: GstGhostPad.t

package info (click to toggle)
libgstreamer-perl 0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 900 kB
  • ctags: 59
  • sloc: perl: 2,456; ansic: 32; makefile: 6
file content (36 lines) | stat: -rw-r--r-- 790 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 8;

# $Id$

use GStreamer -init;

my $pad = GStreamer::Pad -> new("urgs", "src");

my $gpad = GStreamer::GhostPad -> new("urgs", $pad);
SKIP: {
  skip 'new() returned undef', 4
    unless defined $gpad;

  isa_ok($gpad, "GStreamer::GhostPad");
  is($gpad -> get_target(), $pad);

  ok($gpad -> set_target($pad));
  is($gpad -> get_target(), $pad);
}

$pad = GStreamer::Pad -> new("urgs", "src");
$gpad = GStreamer::GhostPad -> new(undef, $pad);
SKIP: {
  skip 'new() returned undef', 2
    unless defined $gpad;

  isa_ok($gpad, "GStreamer::GhostPad");
  is($gpad -> get_target(), $pad);
}

$gpad = GStreamer::GhostPad -> new_no_target("urgs", "src");
isa_ok($gpad, "GStreamer::GhostPad");
is($gpad -> get_target(), undef);