X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F10_Inconsistent_hierarchy.t;fp=t%2F10_Inconsistent_hierarchy.t;h=0000000000000000000000000000000000000000;hb=fbe8c8c4b14d12e8f2e254abe7aab98c74391920;hp=2378ea3a4c564f0c54ac827541d668be9d3f23bf;hpb=8995e8271e0f7f7b9c0942a4425e8a44099bf608;p=gitmo%2FClass-C3-XS.git diff --git a/t/10_Inconsistent_hierarchy.t b/t/10_Inconsistent_hierarchy.t deleted file mode 100644 index 2378ea3..0000000 --- a/t/10_Inconsistent_hierarchy.t +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Test::More tests => 2; - -BEGIN { - use_ok('Class::C3'); -} - -=pod - -This example is take from: http://www.python.org/2.3/mro.html - -"Serious order disagreement" # From Guido -class O: pass -class X(O): pass -class Y(O): pass -class A(X,Y): pass -class B(Y,X): pass -try: - class Z(A,B): pass #creates Z(A,B) in Python 2.2 -except TypeError: - pass # Z(A,B) cannot be created in Python 2.3 - -=cut - -{ - package X; - use Class::C3; - - package Y; - use Class::C3; - - package XY; - use Class::C3; - use base ('X', 'Y'); - - package YX; - use Class::C3; - use base ('Y', 'X'); - - package Z; - # use Class::C3; << Dont do this just yet ... - use base ('XY', 'YX'); -} - -Class::C3::initialize(); - -eval { - # now try to calculate the MRO - # and watch it explode :) - Class::C3::calculateMRO('Z') -}; -#diag $@; -like($@, qr/^Inconsistent hierarchy/, '... got the right error with an inconsistent hierarchy');