[Bps-public-commit] r12676 - pie/branches/named-params/t

jesse at bestpractical.com jesse at bestpractical.com
Sun May 25 01:24:59 EDT 2008


Author: jesse
Date: Sun May 25 01:24:57 2008
New Revision: 12676

Modified:
   pie/branches/named-params/t/builder.t

Log:
* hacky deep check of the built data structure

Modified: pie/branches/named-params/t/builder.t
==============================================================================
--- pie/branches/named-params/t/builder.t	(original)
+++ pie/branches/named-params/t/builder.t	Sun May 25 01:24:57 2008
@@ -21,9 +21,25 @@
 
 #warn Dumper($script);use Data::Dumper;
 # XXX: ensure $script structure
-is(scalar @{$script->progn->nodes}, 1);
-isa_ok($script->progn->nodes->[0], 'PIE::Expression::ProgN');
-is(scalar @{$script->progn->nodes->[0]->nodes}, 2);
+use Data::Dumper;
+is_deeply($script->progn->nodes, 
+        [ 
+          bless( {
+                   'signature' => {},
+                   'name' => 'ProgN',
+                   'args' => {},
+                   'nodes' => [
+                                bless( {
+                                         'signature' => {},
+                                         'name' => 'True',
+                                         'args' => {}
+                                       }, 'PIE::Expression::True' ),
+                                bless( {
+                                         'signature' => {},
+                                         'name' => 'False',
+                                         'args' => {}
+                                       }, 'PIE::Expression::False' )
+                              ]
+                 }, 'PIE::Expression::ProgN' )
 
-isa_ok($script->progn->nodes->[0]->nodes->[0], 'PIE::Expression::True');
-isa_ok($script->progn->nodes->[0]->nodes->[1], 'PIE::Expression::False');
+        ]                );



More information about the Bps-public-commit mailing list