[svn:parrot] r47475 - trunk/t/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Tue Jun 8 19:55:11 UTC 2010


Author: NotFound
Date: Tue Jun  8 19:55:11 2010
New Revision: 47475
URL: https://trac.parrot.org/parrot/changeset/47475

Log:
make packfile test 'pack produced same result twice' independant of platform/config and untodo it

Modified:
   trunk/t/pmc/packfile.t

Modified: trunk/t/pmc/packfile.t
==============================================================================
--- trunk/t/pmc/packfile.t	Tue Jun  8 19:19:50 2010	(r47474)
+++ trunk/t/pmc/packfile.t	Tue Jun  8 19:55:11 2010	(r47475)
@@ -295,27 +295,30 @@
 # Packfile.pack.
 # Check that unpack-pack produce correct result.
 .sub 'test_pack'
-    .local string filename, first
+    .local string filename, orig
     push_eh load_error
     $S0 = '_filename'()
     $P0 = new ['FileHandle']
     $P0.'open'($S0, 'r')
 
-    first = $P0.'readall'()
+    orig = $P0.'readall'()
 
     .local pmc packfile
     packfile = new 'Packfile'
-    packfile = first
+    packfile = orig
     pop_eh
 
-    # Packed file should be exactly the same as loaded
-    .local string second
+    # Loaded packfile can be from different platform/config,
+    # packing and unpacking again to avoid that differences.
+    .local string first, second
     # Pack
-    second = packfile
+    first = packfile
+    .local pmc packfilesecond
+    packfilesecond = new 'Packfile'
+    packfilesecond = first
+    second = packfilesecond
 
-    $I0 = cmp first, second
-    $I0 = not $I0
-    todo($I0, 'pack produced same result twice: TT #1614')
+    is(first, second, 'pack produced same result twice: TT #1614')
     .return()
 load_error:
     .get_results($P0)
@@ -325,6 +328,7 @@
 .end
 
 # Test pack/set_string unpack/get_string equivalency
+
 .sub 'test_synonyms'
     .local pmc pf
     push_eh load_error


More information about the parrot-commits mailing list