File: GnomeColorPicker.t

package info (click to toggle)
libgnome2-perl 1.045-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 608 kB
  • ctags: 12
  • sloc: perl: 1,145; ansic: 16; makefile: 4
file content (38 lines) | stat: -rw-r--r-- 946 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
37
38
#!/usr/bin/perl -w
use strict;
use Gnome2;

use constant TESTS => 7;
use Test::More tests => TESTS;

# $Id$

###############################################################################

SKIP: {
  our $application;
  do "t/TestBoilerplate";

  #############################################################################

  my $picker = Gnome2::ColorPicker -> new();
  isa_ok($picker, "Gnome2::ColorPicker");

  $picker -> set_d(0.5, 0.5, 0.5, 0.5);
  is_deeply([$picker -> get_d()], [0.5, 0.5, 0.5, 0.5]);

  $picker -> set_i8(23, 23, 42, 42);
  is_deeply([$picker -> get_i8()], [23, 23, 42, 42]);

  $picker -> set_i16(23, 23, 42, 42);
  is_deeply([$picker -> get_i16()], [23, 23, 42, 42]);

  $picker -> set_dither(1);
  is($picker -> get_dither(), 1);

  $picker -> set_use_alpha(1);
  is($picker -> get_use_alpha(), 1);

  $picker -> set_title("May The Force Be With You!");
  is($picker -> get_title(), "May The Force Be With You!");
}