com php-src: Adjust serialization tests to not rely on auto-vivification order: ext/standard/tests/serialize/serialization_arrays_ 002.phpt
ext/standard/tests/serialize/serialization _objects_013.phpt

From: Date: Mon, 18 Aug 2014 16:20:34 +0000
Subject: com php-src: Adjust serialization tests to not rely on auto-vivification order: ext/standard/tests/serialize/serialization_arrays_ 002.phpt
ext/standard/tests/serialize/serialization _objects_013.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-80865@lists.php.net to get a copy of this message
Commit: ce9971231598f6a51a028ab8222063efdf403255 Author: Nikita Popov <nikic@php.net> Mon, 18 Aug 2014 18:20:34 +0200 Parents: ced6d3068acac3a259bb496ef62f95b73291689b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ce9971231598f6a51a028ab8222063efdf403255 Log: Adjust serialization tests to not rely on auto-vivification order Changed paths: M ext/standard/tests/serialize/serialization_arrays_002.phpt M ext/standard/tests/serialize/serialization_objects_013.phpt Diff: diff --git a/ext/standard/tests/serialize/serialization_arrays_002.phpt b/ext/standard/tests/serialize/serialization_arrays_002.phpt index f8cef78..c62ff6a 100644 --- a/ext/standard/tests/serialize/serialization_arrays_002.phpt +++ b/ext/standard/tests/serialize/serialization_arrays_002.phpt @@ -37,16 +37,16 @@ check($a); echo "\n\n--- 0 refs 1:\n"; $a = array(); -$a[0] = &$a[1]; $a[1] = 1; +$a[0] = &$a[1]; $a[2] = 1; check($a); echo "\n\n--- 0 refs 2:\n"; $a = array(); +$a[2] = 1; $a[0] = &$a[2]; $a[1] = 1; -$a[2] = 1; check($a); echo "\n\n--- 1 refs 0:\n"; @@ -59,8 +59,8 @@ check($a); echo "\n\n--- 1 refs 2:\n"; $a = array(); $a[0] = 1; -$a[1] = &$a[2]; $a[2] = 1; +$a[1] = &$a[2]; check($a); echo "\n\n--- 2 refs 0:\n"; @@ -79,15 +79,15 @@ check($a); echo "\n\n--- 0,1 ref 2:\n"; $a = array(); +$a[2] = 1; $a[0] = &$a[2]; $a[1] = &$a[2]; -$a[2] = 1; check($a); echo "\n\n--- 0,2 ref 1:\n"; $a = array(); -$a[0] = &$a[1]; $a[1] = 1; +$a[0] = &$a[1]; $a[2] = &$a[1]; check($a); @@ -541,4 +541,4 @@ array(3) { [2]=> &string(10) "b2.changed" } -Done \ No newline at end of file +Done diff --git a/ext/standard/tests/serialize/serialization_objects_013.phpt b/ext/standard/tests/serialize/serialization_objects_013.phpt index 01b623c..403f9de 100644 --- a/ext/standard/tests/serialize/serialization_objects_013.phpt +++ b/ext/standard/tests/serialize/serialization_objects_013..phpt @@ -32,16 +32,16 @@ function check(&$obj) { echo "\n\n--- a refs b:\n"; $obj = new stdClass; -$obj->a = &$obj->b; $obj->b = 1; +$obj->a = &$obj->b; $obj->c = 1; check($obj); echo "\n\n--- a refs c:\n"; $obj = new stdClass; +$obj->c = 1; $obj->a = &$obj->c; $obj->b = 1; -$obj->c = 1; check($obj); echo "\n\n--- b refs a:\n"; @@ -54,8 +54,8 @@ check($obj); echo "\n\n--- b refs c:\n"; $obj = new stdClass; $obj->a = 1; -$obj->b = &$obj->c; $obj->c = 1; +$obj->b = &$obj->c; check($obj); echo "\n\n--- c refs a:\n"; @@ -74,15 +74,15 @@ check($obj); echo "\n\n--- a,b refs c:\n"; $obj = new stdClass; +$obj->c = 1; $obj->a = &$obj->c; $obj->b = &$obj->c; -$obj->c = 1; check($obj); echo "\n\n--- a,c refs b:\n"; $obj = new stdClass; -$obj->a = &$obj->b; $obj->b = 1; +$obj->a = &$obj->b; $obj->c = &$obj->b; check($obj); @@ -491,4 +491,4 @@ object(stdClass)#%d (3) { ["c"]=> &string(14) "obj->c.changed" } -Done \ No newline at end of file +Done

« previous php.cvs (#80865) next »