remove trailing whitespace
[gitmo/Moose.git] / t / 040_type_constraints / 014_type_notation_parser.t
index 03d1d76..bf48b5f 100644 (file)
@@ -18,17 +18,17 @@ Volunteers welcome :)
 
 ## check the containers
 
-ok(Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_), 
+ok(Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_),
    '... this correctly detected a container (' . $_ . ')')
     for (
     'ArrayRef[Foo]',
     'ArrayRef[Foo | Int]',
-    'ArrayRef[ArrayRef[Int]]', 
-    'ArrayRef[ArrayRef[Int | Foo]]', 
-    'ArrayRef[ArrayRef[Int|Str]]',     
+    'ArrayRef[ArrayRef[Int]]',
+    'ArrayRef[ArrayRef[Int | Foo]]',
+    'ArrayRef[ArrayRef[Int|Str]]',
 );
 
-ok(!Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_), 
+ok(!Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_),
    '... this correctly detected a non-container (' . $_ . ')')
     for (
     'ArrayRef[]',
@@ -39,12 +39,12 @@ ok(!Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_),
     my %split_tests = (
         'ArrayRef[Foo]'                 => [ 'ArrayRef', 'Foo' ],
         'ArrayRef[Foo | Int]'           => [ 'ArrayRef', 'Foo | Int' ],
-        'ArrayRef[Foo|Int]'             => [ 'ArrayRef', 'Foo|Int' ],        
-        # these will get processed with recusion, 
+        'ArrayRef[Foo|Int]'             => [ 'ArrayRef', 'Foo|Int' ],
+        # these will get processed with recusion,
         # so we only need to detect it once
-        'ArrayRef[ArrayRef[Int]]'       => [ 'ArrayRef', 'ArrayRef[Int]' ], 
+        'ArrayRef[ArrayRef[Int]]'       => [ 'ArrayRef', 'ArrayRef[Int]' ],
         'ArrayRef[ArrayRef[Int | Foo]]' => [ 'ArrayRef', 'ArrayRef[Int | Foo]' ],
-        'ArrayRef[ArrayRef[Int|Str]]'   => [ 'ArrayRef', 'ArrayRef[Int|Str]' ],        
+        'ArrayRef[ArrayRef[Int|Str]]'   => [ 'ArrayRef', 'ArrayRef[Int|Str]' ],
     );
 
     is_deeply(
@@ -56,45 +56,45 @@ ok(!Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_),
 
 ## now for the unions
 
-ok(Moose::Util::TypeConstraints::_detect_type_constraint_union($_), 
+ok(Moose::Util::TypeConstraints::_detect_type_constraint_union($_),
    '... this correctly detected union (' . $_ . ')')
     for (
     'Int | Str',
-    'Int|Str',    
+    'Int|Str',
     'ArrayRef[Foo] | Int',
-    'ArrayRef[Foo]|Int',    
+    'ArrayRef[Foo]|Int',
     'Int | ArrayRef[Foo]',
-    'Int|ArrayRef[Foo]',    
+    'Int|ArrayRef[Foo]',
     'ArrayRef[Foo | Int] | Str',
-    'ArrayRef[Foo|Int]|Str',    
-    'Str | ArrayRef[Foo | Int]', 
-    'Str|ArrayRef[Foo|Int]',     
-    'Some|Silly|Name|With|Pipes | Int',   
-    'Some|Silly|Name|With|Pipes|Int',       
+    'ArrayRef[Foo|Int]|Str',
+    'Str | ArrayRef[Foo | Int]',
+    'Str|ArrayRef[Foo|Int]',
+    'Some|Silly|Name|With|Pipes | Int',
+    'Some|Silly|Name|With|Pipes|Int',
 );
 
-ok(!Moose::Util::TypeConstraints::_detect_type_constraint_union($_), 
+ok(!Moose::Util::TypeConstraints::_detect_type_constraint_union($_),
    '... this correctly detected a non-union (' . $_ . ')')
     for (
     'Int',
     'ArrayRef[Foo | Int]',
-    'ArrayRef[Foo|Int]',    
+    'ArrayRef[Foo|Int]',
 );
 
 {
     my %split_tests = (
         'Int | Str'                        => [ 'Int', 'Str' ],
-        'Int|Str'                          => [ 'Int', 'Str' ],        
+        'Int|Str'                          => [ 'Int', 'Str' ],
         'ArrayRef[Foo] | Int'              => [ 'ArrayRef[Foo]', 'Int' ],
-        'ArrayRef[Foo]|Int'                => [ 'ArrayRef[Foo]', 'Int' ],        
+        'ArrayRef[Foo]|Int'                => [ 'ArrayRef[Foo]', 'Int' ],
         'Int | ArrayRef[Foo]'              => [ 'Int', 'ArrayRef[Foo]' ],
-        'Int|ArrayRef[Foo]'                => [ 'Int', 'ArrayRef[Foo]' ],        
+        'Int|ArrayRef[Foo]'                => [ 'Int', 'ArrayRef[Foo]' ],
         'ArrayRef[Foo | Int] | Str'        => [ 'ArrayRef[Foo | Int]', 'Str' ],
-        'ArrayRef[Foo|Int]|Str'            => [ 'ArrayRef[Foo|Int]', 'Str' ],        
-        'Str | ArrayRef[Foo | Int]'        => [ 'Str', 'ArrayRef[Foo | Int]' ],  
-        'Str|ArrayRef[Foo|Int]'            => [ 'Str', 'ArrayRef[Foo|Int]' ],          
-        'Some|Silly|Name|With|Pipes | Int' => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ],  
-        'Some|Silly|Name|With|Pipes|Int'   => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ],         
+        'ArrayRef[Foo|Int]|Str'            => [ 'ArrayRef[Foo|Int]', 'Str' ],
+        'Str | ArrayRef[Foo | Int]'        => [ 'Str', 'ArrayRef[Foo | Int]' ],
+        'Str|ArrayRef[Foo|Int]'            => [ 'Str', 'ArrayRef[Foo|Int]' ],
+        'Some|Silly|Name|With|Pipes | Int' => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ],
+        'Some|Silly|Name|With|Pipes|Int'   => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ],
     );
 
     is_deeply(