Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DIBitmap/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15562/t

Added Files:
        01_load.t 02_new.t 98_pod.t 99_pod_coverage.t 
Log Message:
Merge DIBitmap into core distribution

--- NEW FILE: 99_pod_coverage.t ---
#!perl -wT
# Win32::GUI::DIBitmap test suite.
# $Id: 99_pod_coverage.t,v 1.1 2006/06/11 16:34:48 robertemay Exp $

# Check the POD covers all method calls

use strict;
use warnings;

use Test::More;
eval "use Test::Pod::Coverage 1.04";
plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" 
if $@;
plan skip_all => "Pod Coverage tests for Win32::GUI::DIBitmap done by core" if 
$ENV{W32G_CORE};
all_pod_coverage_ok( { also_private => [ qr/^constant$/ ] } );

--- NEW FILE: 02_new.t ---
#!perl -wT
# Win32::GUI::DIBitmap test suite
# $Id: 02_new.t,v 1.1 2006/06/11 16:34:48 robertemay Exp $
#
# - check we can create a new DIBitmap object

use strict;
use warnings;

BEGIN { $| = 1 } # Autoflush

use Test::More tests => 2;
use Win32::GUI();
use Win32::GUI::DIBitmap();

my $W = Win32::GUI::Window->new();
can_ok('Win32::GUI::DIBitmap', 'new');
my $S = Win32::GUI::DIBitmap->newFromWindow($W);
isa_ok($S, 'Win32::GUI::DIBitmap', 'Correct object type created');

--- NEW FILE: 98_pod.t ---
#!perl -wT
# Win32::GUI::DIBitmap test suite.
# $Id: 98_pod.t,v 1.1 2006/06/11 16:34:48 robertemay Exp $

# Check that our pod documentation has valid syntax

use strict;
use warnings;

BEGIN { $| = 1 } # Autoflush

use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
plan skip_all => "Pod tests for Win32::GUI::DIBitmap done by core" if 
$ENV{W32G_CORE};
all_pod_files_ok();

--- NEW FILE: 01_load.t ---
#!perl -wT
# Win32::GUI::DIBitmap test suite
# $Id: 01_load.t,v 1.1 2006/06/11 16:34:47 robertemay Exp $
#
# - check pre-requsites
# - check module loads
# - check module has a version

use strict;
use warnings;

BEGIN { $| = 1 } # Autoflush

# Pre-requisites: Bail out if we havent got Test::More
eval "use Test::More";
if($@) {
    # As we haven't got Test::More, can't use diag()
    print "#\n# Test::More required to perform any Win32::GUI::Grid test\n";
    chomp $@;
    $@ =~ s/^/# /gm;
    print "[EMAIL PROTECTED]";
    print "Bail Out! Test::More not available\n";
    exit(1);
}

plan( tests => 3 );

# Pre-requisites: Check that we're on windows or cygwin
# bail out if we're not
if ( not ($^O =~ /MSwin32|cygwin/i)) {
    diag("\nWin32::GUI::DIBitmap can only run on MSWin32 or cygwin, not '$^O'");
    print "Bail out! Incompatible Operating System\n";
}
pass("Correct OS: $^O");
    
# Check that Win32::GUI::DIBitmap loads, and bail out of all
# tests if it doesn't
use_ok('Win32::GUI::DIBitmap')
  or print STDOUT "Bail out! Can't load Win32::GUI::DIBitmap";

# Check that Win32::GUI::DIBitmap has a version
ok(defined $Win32::GUI::DIBitmap::VERSION, "Win32::GUI::DIBitmap version 
check");


Reply via email to