File: 61-textbox.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 (20 lines) | stat: -rw-r--r-- 556 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
use strict;
use Test::More tests => 7;

use Graphics::Primitive::Font;

BEGIN {
    use_ok('Graphics::Primitive::TextBox');
}

my $tb = Graphics::Primitive::TextBox->new;
isa_ok($tb, 'Graphics::Primitive::TextBox');

cmp_ok($tb->prepared, '==', 0, 'not prepared');
$tb->prepared(1);
cmp_ok($tb->prepared, '==', 1, 'prepared');
$tb->text('Different');
cmp_ok($tb->prepared, '==', 0, 'not prepared');

cmp_ok($tb->horizontal_alignment, 'eq', 'left', 'default horizontal alignment');
cmp_ok($tb->vertical_alignment, 'eq', 'top', 'default vertical alignment');