File: Rect.t

package info (click to toggle)
libcss-dom-perl 0.14-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 588 kB
  • sloc: perl: 7,277; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 689 bytes parent folder | download | duplicates (7)
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
#!/usr/bin/perl -T

use strict; use warnings;
our $tests;
BEGIN { ++$INC{'tests.pm'} }
sub tests'VERSION { $tests += pop };
use Test::More;
plan tests => $tests;

use CSS::DOM::Value::Primitive ':all';
my $prim = "CSS::DOM::Value::Primitive";


use tests 4;
{
 my $v = new $prim type => CSS_RECT, value => [
              [type=>CSS_PX,value=>1],
              [type=>CSS_EMS,value=>2],
              [type=>CSS_IDENT,value=>'auto'],
              [type=>CSS_CM,value=>4],
 ];
 is $v->top->cssText, '1px', 'top';
 is $v->right->cssText, '2em', 'right';
 is $v->bottom->cssText, 'auto', 'bottom';
 is $v->left->cssText, '4cm', 'left';
}

# ~~~ test for modifications of the cssText property