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

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

--- NEW FILE: 99_pod_coverage.t ---
#!perl -wT
# Win32::GUI::AxWindow test suite.
# $Id: 99_pod_coverage.t,v 1.1 2006/06/11 15:47:25 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::AxWindow done by core" if 
$ENV{W32G_CORE};

# REM: I'm not sure whether Invoke and GetMethodID are intended to be public
# or not, so making them private for now
all_pod_coverage_ok( { also_private => [ qr/^Invoke$/, qr/^GetMethodID$/, ], } 
);

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

use strict;
use warnings;

BEGIN { $| = 1 } # Autoflush

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

my $W = Win32::GUI::Window->new();
can_ok('Win32::GUI::AxWindow', 'new');
my $S = Win32::GUI::AxWindow->new(
    -name => 'AxWindow',
    -parent => $W,
    -control => "Shell.Explorer.2",
);
isa_ok($S, 'Win32::GUI::AxWindow', 'Correct object type created');

--- NEW FILE: 98_pod.t ---
#!perl -wT
# Win32::GUI::AxWindow test suite.
# $Id: 98_pod.t,v 1.1 2006/06/11 15:47:24 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::AxWindow done by core" if 
$ENV{W32G_CORE};
all_pod_files_ok();

--- NEW FILE: 01_load.t ---
#!perl -wT
# Win32::GUI::AxWindow test suite
# $Id: 01_load.t,v 1.1 2006/06/11 15:47:21 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::AxWindow loads, and bail out of all
# tests if it doesn't
use_ok('Win32::GUI::AxWindow')
  or print STDOUT "Bail out! Can't load Win32::GUI::AxWindow";

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


Reply via email to