File: lazy_loader.t

package info (click to toggle)
libglib-perl 3%3A1.329-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,320 kB
  • sloc: perl: 4,938; ansic: 901; makefile: 7
file content (27 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (8)
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
#!/usr/bin/perl

#
# Test some aspects of the lazy loader
#

use strict;
use warnings;
use Glib;
use Test::More tests => 1;

SKIP: {
  skip 'need Glib::InitiallyUnowned', 1
    unless Glib->CHECK_VERSION(2, 10, 0);

  # Setup a strange hierarchy that tests whether the lazy loader can deal with
  # being invoked on a package that only indirectly inherits from a registered
  # package.
  @NotThere::ISA = ();
  @NotHere::ISA = ();
  @Foo::ISA = qw/NotThere Glib::InitiallyUnowned/;
  @Bar::ISA = qw/NotHere Foo/;
  ok (Bar->isa (qw/Glib::Object/),
      'the lazy loader correctly set up the hierarchy');
}