File: 00-constants.t

package info (click to toggle)
libnet-dbus-perl 0.33.6-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 724 kB
  • ctags: 417
  • sloc: perl: 4,714; sh: 34; makefile: 6
file content (41 lines) | stat: -rw-r--r-- 1,076 bytes parent folder | download | duplicates (9)
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
39
40
41
# -*- perl -*-
use Test::More tests => 6;
BEGIN { 
	use_ok('Net::DBus::Binding::Watch');
	use_ok('Net::DBus::Binding::Message');
	use_ok('Net::DBus::Binding::Bus');
	 };


my $fail = 0;
foreach my $constname (qw(
        SYSTEM SESSION STARTER)) {
  next if (eval "my \$a = &Net::DBus::Binding::Bus::$constname; 1");
  print "# fail: $@";
  $fail = 1;
}
ok( $fail == 0 , 'Net::DBus::Binding::Bus Constants' );

$fail = 0;
foreach my $constname (qw(
        TYPE_ARRAY TYPE_BOOLEAN
	TYPE_BYTE TYPE_DOUBLE TYPE_STRUCT
        TYPE_INT32 TYPE_INT64 TYPE_DICT_ENTRY
	TYPE_INVALID TYPE_SIGNATURE TYPE_OBJECT_PATH
	TYPE_STRING TYPE_UINT32 TYPE_UINT64)) {
  next if (eval "my \$a = &Net::DBus::Binding::Message::$constname; 1");
  print "# fail: $@";
  $fail = 1;
}
ok( $fail == 0 , 'Net::DBus::Binding::Message Constants' );

$fail = 0;
foreach my $constname (qw(
        READABLE WRITABLE
        ERROR HANGUP)) {
  next if (eval "my \$a = &Net::DBus::Binding::Watch::$constname; 1");
  print "# fail: $@";
  $fail = 1;
}

ok( $fail == 0 , 'Net::DBus::Binding::Watch Constants' );