develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35968 - trunk/languages/unlambda/t

From:
bernhard
Date:
January 24, 2009 13:51
Subject:
[svn:parrot] r35968 - trunk/languages/unlambda/t
Message ID:
20090124215150.726AECB9AE@x12.develooper.com
Author: bernhard
Date: Sat Jan 24 13:51:49 2009
New Revision: 35968

Modified:
   trunk/languages/unlambda/t/examples.t

Log:
[unlambda] defined order of test cases

Modified: trunk/languages/unlambda/t/examples.t
==============================================================================
--- trunk/languages/unlambda/t/examples.t	(original)
+++ trunk/languages/unlambda/t/examples.t	Sat Jan 24 13:51:49 2009
@@ -38,14 +38,15 @@
 my $unlamba   = $parrot . q{ } . File::Spec->catfile( $FindBin::Bin,
                                                       File::Spec->updir(), 
                                                       'unl.pir' );
-my %expected = (
-    'newline.unl'  => "\n",
-    'h.unl'        => "h\n",
-    'hello.unl'    => "Hello world\n",
-    'k.unl'        => 'H',
+my @test_cases = (
+    [ 'newline.unl'  => "\n" ],
+    [ 'h.unl'        => "h\n" ],
+    [ 'k.unl'        => 'H' ],
+    [ 'hello.unl'    => "Hello world\n" ],
 );
 
-while ( my ($code_fn, $out) = each %expected ) {
+foreach (@test_cases) {
+    my ($code_fn, $out) = @{$_};
     my $prog = File::Spec->catfile( $FindBin::Bin,
                                     File::Spec->updir(),
                                     'examples',



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About