Re: [Perlunit-users] Comparing deeply nested data structures.
Status: Beta
Brought to you by:
mca1001
From: Wagner B. <ber...@pr...> - 2007-06-26 07:56:04
|
On Fri, 25 May 2007 06:12:19 -0700 There was this post by Adrian Howard containing this example of the TestSuite: { package BlahTest; use base qw( Test::Unit::TestCase ); sub test_blah { my ( $self ) = @_; my $x = [ {'hello'=> 1 }, 1 ]; my $y = [ {'hello'=> 1 }, 2 ]; $self->assert_deep_equals( $x, $y ); } } { package AllTests; use base qw(Test::Unit::TestSuite); sub name { 'Testing assert_deep_equals' } sub include_tests { 'BlahTest' }; } use Test::Unit::TestRunner; Test::Unit::TestRunner->new->start( 'AllTests' ); Unfortunately, when I run this, I get another output than you describe, namely: .F Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) !!!FAILURES!!! Test Results: Run: 1 Failures: 1 Errors: 0 There was 1 failure: 1) warning(Test::Unit::TestSuite::_warning) Test::Unit::ExceptionFailure: Class AllTests is not a Test::Unit::TestCase How do I run this TestSuite? Thank you Bernhard |