]> granicus.if.org Git - php/commitdiff
MFB: fix sprintf/printf %u tests so they work correctly on both 32-bit and 64-bit...
authorBrian Shire <shire@php.net>
Mon, 4 Jun 2007 01:23:22 +0000 (01:23 +0000)
committerBrian Shire <shire@php.net>
Mon, 4 Jun 2007 01:23:22 +0000 (01:23 +0000)
ext/standard/tests/array/bug35014_64bit.phpt
ext/standard/tests/strings/bug23894.phpt
ext/standard/tests/strings/bug26973.phpt
ext/standard/tests/strings/printf_64bit.phpt
ext/standard/tests/strings/sprintf_f_2.phpt

index aa2d7242a1bbfda9c3283dbad77ce9e49d7710ea..0f151c9753556ff0aa2d62c610af742caad3a818 100644 (file)
@@ -42,5 +42,5 @@ int(3)
 int(9)
 float(1)
 int(9999999800000001)
-float(2.8404260053903E+20)
-int(8589934590)
+float(1.219953680145E+30)
+float(3.6893488147419E+19)
index 0724f945f5a2f77990b3453d0d874e08e6bb2671..070304b589c8847f1f62c770aea820de45e4892d 100644 (file)
@@ -8,13 +8,13 @@ var_dump($test, bin2hex((binary)$test));
 $test = sprintf("% 13u", $a);
 var_dump($test, bin2hex((binary)$test));
 ?>
---EXPECT--
-string(4) "-012"
-string(8) "2d303132"
-string(13) "   4294967284"
-string(26) "20202034323934393637323834"
---UEXPECT--
-unicode(4) "-012"
-unicode(8) "2d303132"
-unicode(13) "   4294967284"
-unicode(26) "20202034323934393637323834"
+--EXPECTREGEX--
+string\(4\) \"-012\"
+string\(8\) \"2d303132\"
+(string\(13\) \"   4294967284\"|string\(20\) \"18446744073709551604\")
+(string\(26\) \"20202034323934393637323834\"|string\(40\) \"3138343436373434303733373039353531363034\")
+--UEXPECTREGEX--
+unicode\(4\) \"-012\"
+unicode\(8\) \"2d303132\"
+(unicode\(13\) \"   4294967284\"|unicode\(20\) \"18446744073709551604\")
+(unicode\(26\) \"20202034323934393637323834\"|unicode\(40\) \"3138343436373434303733373039353531363034\")
index 4a586ecaa28dc74761b66246d9f97a101915a1e7..9de3be492911abf5403edaabc9469b9e16a42a37 100644 (file)
@@ -18,17 +18,17 @@ printf("%05u\n", 200);
 printf("%05u\n", -200);
 
 ?>
---EXPECT--
-+0200
--0200
-+200.000000
--200.000000
+--EXPECTREGEX--
+\+0200
+\-0200
+\+200\.000000
+\-200\.000000
 00200
-4294967096
+(4294967096|18446744073709551416)
 ---
 00200
--0200
-200.000000
--200.000000
+\-0200
+200\.000000
+\-200\.000000
 00200
-4294967096
+(4294967096|18446744073709551416)
index 9d78d0c7a46765abb5fb592a4d68515162ea7721..10ea360c0430bf56092d76983c8da31b81cf9918 100755 (executable)
@@ -531,11 +531,11 @@ Array
 
 0
 1
-4294967295
+18446744073709551615
 2
-4294967294
+18446744073709551614
 23333333
-4271633963
+18446744073686218283
 1234
 
 *** Output for octal type ***
index 1c391f312275401fe473753f912ccb877bc69579..f6681939fcf7f3a522d279c052df1f1f84afb4be 100755 (executable)
@@ -80,71 +80,71 @@ $number = 362525200;
  
 var_dump(sprintf("%.3e", $number)); // outputs 3.63e+8
 ?>
---EXPECT--
-string(7) "100.426"
-string(6) "100.43"
-string(3) "100"
-string(3) "100"
-string(3) "144"
-string(3) "144"
-string(34) "There are 100 monkeys in the world"
-string(28) "The 100.1 contains 0 monkeys"
-string(30) "The world contains 100 monkeys"
-string(76) "The world contains 100 monkeys.
-    That's a nice world full of 100 monkeys."
-string(33) "%b = '10100111101010011010101101'"
-string(8) "%c = 'A'"
-string(15) "%d = '43951789'"
-string(18) "%e = '4.395179e+7'"
-string(15) "%u = '43951789'"
-string(17) "%u = '4251015507'"
-string(22) "%f = '43951789.000000'"
-string(16) "%o = '247523255'"
-string(15) "%s = '43951789'"
-string(14) "%x = '29ea6ad'"
-string(14) "%X = '29EA6AD'"
-string(17) "%+d = '+43951789'"
-string(17) "%+d = '-43951789'"
-string(8) "[monkey]"
-string(12) "[    monkey]"
-string(12) "[monkey    ]"
-string(12) "[0000monkey]"
-string(12) "[####monkey]"
-string(12) "[many monke]"
-string(10) "2006-12-18"
-string(6) "123.10"
-string(8) "3.625e+8"
---UEXPECT--
-unicode(7) "100.426"
-unicode(6) "100.43"
-unicode(3) "100"
-unicode(3) "100"
-unicode(3) "144"
-unicode(3) "144"
-unicode(34) "There are 100 monkeys in the world"
-unicode(28) "The 100.1 contains 0 monkeys"
-unicode(30) "The world contains 100 monkeys"
-unicode(76) "The world contains 100 monkeys.
-    That's a nice world full of 100 monkeys."
-unicode(33) "%b = '10100111101010011010101101'"
-unicode(8) "%c = 'A'"
-unicode(15) "%d = '43951789'"
-unicode(18) "%e = '4.395179e+7'"
-unicode(15) "%u = '43951789'"
-unicode(17) "%u = '4251015507'"
-unicode(22) "%f = '43951789.000000'"
-unicode(16) "%o = '247523255'"
-unicode(15) "%s = '43951789'"
-unicode(14) "%x = '29ea6ad'"
-unicode(14) "%X = '29EA6AD'"
-unicode(17) "%+d = '+43951789'"
-unicode(17) "%+d = '-43951789'"
-unicode(8) "[monkey]"
-unicode(12) "[    monkey]"
-unicode(12) "[monkey    ]"
-unicode(12) "[0000monkey]"
-unicode(12) "[####monkey]"
-unicode(12) "[many monke]"
-unicode(10) "2006-12-18"
-unicode(6) "123.10"
-unicode(8) "3.625e+8"
+--EXPECTREGEX--
+string\(7\) \"100\.426\"
+string\(6\) \"100\.43\"
+string\(3\) \"100\"
+string\(3\) \"100\"
+string\(3\) \"144\"
+string\(3\) \"144\"
+string\(34\) \"There are 100 monkeys in the world\"
+string\(28\) \"The 100\.1 contains 0 monkeys\"
+string\(30\) \"The world contains 100 monkeys\"
+string\(76\) \"The world contains 100 monkeys.
+    That's a nice world full of 100 monkeys\.\"
+string\(33\) \"%b = '10100111101010011010101101'\"
+string\(8\) \"%c = 'A'\"
+string\(15\) \"%d = '43951789'\"
+string\(18\) \"%e = '4\.395179e\+7'\"
+string\(15\) \"%u = '43951789'\"
+(string\(17\) \"%u = '4251015507'\"|string\(27\) \"%u = '18446744073665599827'\")
+string\(22\) \"%f = '43951789\.000000'\"
+string\(16\) \"%o = '247523255'\"
+string\(15\) \"%s = '43951789'\"
+string\(14\) \"%x = '29ea6ad'\"
+string\(14\) \"%X = '29EA6AD'\"
+string\(17\) \"%\+d = '\+43951789'\"
+string\(17\) \"%\+d = '-43951789'\"
+string\(8\) \"\[monkey\]\"
+string\(12\) \"\[    monkey\]\"
+string\(12\) \"\[monkey    \]\"
+string\(12\) \"\[0000monkey\]\"
+string\(12\) \"\[####monkey\]\"
+string\(12\) \"\[many monke\]\"
+string\(10\) \"2006-12-18\"
+string\(6\) \"123\.10\"
+string\(8\) \"3\.625e\+8\"
+--UEXPECTREGEX--
+unicode\(7\) \"100\.426\"
+unicode\(6\) \"100\.43\"
+unicode\(3\) \"100\"
+unicode\(3\) \"100\"
+unicode\(3\) \"144\"
+unicode\(3\) \"144\"
+unicode\(34\) \"There are 100 monkeys in the world\"
+unicode\(28\) \"The 100\.1 contains 0 monkeys\"
+unicode\(30\) \"The world contains 100 monkeys\"
+unicode\(76\) \"The world contains 100 monkeys.
+    That's a nice world full of 100 monkeys\.\"
+unicode\(33\) \"%b = '10100111101010011010101101'\"
+unicode\(8\) \"%c = 'A'\"
+unicode\(15\) \"%d = '43951789'\"
+unicode\(18\) \"%e = '4\.395179e\+7'\"
+unicode\(15\) \"%u = '43951789'\"
+(unicode\(17\) \"%u = '4251015507'\"|unicode\(27\) \"%u = '18446744073665599827'\")
+unicode\(22\) \"%f = '43951789\.000000'\"
+unicode\(16\) \"%o = '247523255'\"
+unicode\(15\) \"%s = '43951789'\"
+unicode\(14\) \"%x = '29ea6ad'\"
+unicode\(14\) \"%X = '29EA6AD'\"
+unicode\(17\) \"%\+d = '\+43951789'\"
+unicode\(17\) \"%\+d = '-43951789'\"
+unicode\(8\) \"\[monkey\]\"
+unicode\(12\) \"\[    monkey\]\"
+unicode\(12\) \"\[monkey    \]\"
+unicode\(12\) \"\[0000monkey\]\"
+unicode\(12\) \"\[####monkey\]\"
+unicode\(12\) \"\[many monke\]\"
+unicode\(10\) \"2006-12-18\"
+unicode\(6\) \"123\.10\"
+unicode\(8\) \"3\.625e\+8\"