Typo fix
[gitmo/Class-MOP.git] / t / 010_self_introspection.t
index eb00ac3..f2dcff2 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
@@ -89,9 +87,9 @@ my @class_mop_class_methods = qw(
 
 # check the class ...
 
-is_deeply([ sort @class_mop_class_methods ], [ sort $class_mop_class_meta->get_method_list ], '... got the correct method list for class');
+is_deeply([ sort $class_mop_class_meta->get_method_list ], [ sort @class_mop_class_methods ], '... got the correct method list for class');
 
-foreach my $method_name (@class_mop_class_methods) {
+foreach my $method_name (sort @class_mop_class_methods) {
     ok($class_mop_class_meta->has_method($method_name), '... Class::MOP::Class->has_method(' . $method_name . ')');
     {
         no strict 'refs';
@@ -103,9 +101,9 @@ foreach my $method_name (@class_mop_class_methods) {
 
 ## check the package ....
 
-is_deeply([ sort @class_mop_package_methods ], [ sort $class_mop_package_meta->get_method_list ], '... got the correct method list for package');
+is_deeply([ sort $class_mop_package_meta->get_method_list ], [ sort @class_mop_package_methods ], '... got the correct method list for package');
 
-foreach my $method_name (@class_mop_package_methods) {
+foreach my $method_name (sort @class_mop_package_methods) {
     ok($class_mop_package_meta->has_method($method_name), '... Class::MOP::Package->has_method(' . $method_name . ')');
     {
         no strict 'refs';
@@ -117,9 +115,9 @@ foreach my $method_name (@class_mop_package_methods) {
 
 ## check the module ....
 
-is_deeply([ sort @class_mop_module_methods ], [ sort $class_mop_module_meta->get_method_list ], '... got the correct method list for module');
+is_deeply([ sort $class_mop_module_meta->get_method_list ], [ sort @class_mop_module_methods ], '... got the correct method list for module');
 
-foreach my $method_name (@class_mop_module_methods) {
+foreach my $method_name (sort @class_mop_module_methods) {
     ok($class_mop_module_meta->has_method($method_name), '... Class::MOP::Module->has_method(' . $method_name . ')');
     {
         no strict 'refs';
@@ -165,16 +163,17 @@ my @class_mop_class_attributes = (
 # check class
 
 is_deeply(
-    [ sort @class_mop_class_attributes ],
     [ sort $class_mop_class_meta->get_attribute_list ],
-    '... got the right list of attributes');
+    [ sort @class_mop_class_attributes ],
+    '... got the right list of attributes'
+);
 
 is_deeply(
-    [ sort @class_mop_class_attributes ],
     [ sort keys %{$class_mop_class_meta->get_attribute_map} ],
+    [ sort @class_mop_class_attributes ],
     '... got the right list of attributes');
 
-foreach my $attribute_name (@class_mop_class_attributes) {
+foreach my $attribute_name (sort @class_mop_class_attributes) {
     ok($class_mop_class_meta->has_attribute($attribute_name), '... Class::MOP::Class->has_attribute(' . $attribute_name . ')');
     isa_ok($class_mop_class_meta->get_attribute($attribute_name), 'Class::MOP::Attribute');
 }
@@ -182,16 +181,16 @@ foreach my $attribute_name (@class_mop_class_attributes) {
 # check module
 
 is_deeply(
-    [ sort @class_mop_package_attributes ],
     [ sort $class_mop_package_meta->get_attribute_list ],
+    [ sort @class_mop_package_attributes ],
     '... got the right list of attributes');
 
 is_deeply(
-    [ sort @class_mop_package_attributes ],
     [ sort keys %{$class_mop_package_meta->get_attribute_map} ],
+    [ sort @class_mop_package_attributes ],
     '... got the right list of attributes');
 
-foreach my $attribute_name (@class_mop_package_attributes) {
+foreach my $attribute_name (sort @class_mop_package_attributes) {
     ok($class_mop_package_meta->has_attribute($attribute_name), '... Class::MOP::Package->has_attribute(' . $attribute_name . ')');
     isa_ok($class_mop_package_meta->get_attribute($attribute_name), 'Class::MOP::Attribute');
 }
@@ -199,16 +198,16 @@ foreach my $attribute_name (@class_mop_package_attributes) {
 # check package
 
 is_deeply(
-    [ sort @class_mop_module_attributes ],
     [ sort $class_mop_module_meta->get_attribute_list ],
+    [ sort @class_mop_module_attributes ],
     '... got the right list of attributes');
 
 is_deeply(
-    [ sort @class_mop_module_attributes ],
     [ sort keys %{$class_mop_module_meta->get_attribute_map} ],
+    [ sort @class_mop_module_attributes ],
     '... got the right list of attributes');
 
-foreach my $attribute_name (@class_mop_module_attributes) {
+foreach my $attribute_name (sort @class_mop_module_attributes) {
     ok($class_mop_module_meta->has_attribute($attribute_name), '... Class::MOP::Module->has_attribute(' . $attribute_name . ')');
     isa_ok($class_mop_module_meta->get_attribute($attribute_name), 'Class::MOP::Attribute');
 }