X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F04_MRO.t;h=c7048df222af6291a60cc5ef6026c4fe413c9a69;hb=ef29cd706106f8ab6e7b0c25e8dc832bb337c5ed;hp=1543a84eee6a4f6c9c38560eea4c1f53512bbc5c;hpb=d401eda1e68a148b69c4e4992de7814fcaa44225;p=gitmo%2FClass-C3.git diff --git a/t/04_MRO.t b/t/04_MRO.t index 1543a84..c7048df 100644 --- a/t/04_MRO.t +++ b/t/04_MRO.t @@ -3,12 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; - -BEGIN { - use lib 'opt', '../opt', '..'; - use_ok('c3'); -} +use Test::More tests => 1; =pod @@ -38,34 +33,36 @@ example taken from: L { package Object; - use c3; + use Class::C3; package LifeForm; - use c3; + use Class::C3; use base 'Object'; package Sentient; - use c3; + use Class::C3; use base 'LifeForm'; package BiPedal; - use c3; + use Class::C3; use base 'LifeForm'; package Intelligent; - use c3; + use Class::C3; use base 'Sentient'; package Humanoid; - use c3; + use Class::C3; use base 'BiPedal'; package Vulcan; - use c3; + use Class::C3; use base ('Intelligent', 'Humanoid'); } +Class::C3::initialize(); + is_deeply( - [ c3::calculateMRO('Vulcan') ], + [ Class::C3::calculateMRO('Vulcan') ], [ qw(Vulcan Intelligent Sentient Humanoid BiPedal LifeForm Object) ], - '... got the right MRO for the Vulcan Dylan Example'); \ No newline at end of file + '... got the right MRO for the Vulcan Dylan Example');