File: 60-driver.t

package info (click to toggle)
libgraphics-primitive-perl 0.67-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 372 kB
  • sloc: perl: 2,586; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 581 bytes parent folder | download | duplicates (5)
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
use lib 't/lib', 'lib';
use strict;

use Test::More tests => 4;

use Graphics::Primitive::Component;
use Graphics::Primitive::Container;

BEGIN {
    use_ok('Graphics::Primitive::Driver');
    use_ok('DummyDriver');
}

my $driver = DummyDriver->new;
isa_ok($driver, 'DummyDriver');

my $container = Graphics::Primitive::Container->new;
my $comp = Graphics::Primitive::Component->new;
$container->add_component($comp, 'c');

$driver->prepare($container);
$driver->finalize($container);
$driver->draw($container);
cmp_ok($driver->draw_component_called, '==', 2, 'component draws');