diff --git a/tests/bson-corpus/decimal128-5-valid-027.phpt b/tests/bson-corpus/decimal128-5-valid-027.phpt index 33834b516..051b15e29 100644 --- a/tests/bson-corpus/decimal128-5-valid-027.phpt +++ b/tests/bson-corpus/decimal128-5-valid-027.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq414] clamped zeros... (Clamped) +Decimal128: clamped zeros with a large negative exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000000000000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "0E+6111"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "0E+6112"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000000000'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "0E-6176"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "0E-999999999999"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000000000000000000000000000fe5f00 -180000001364000000000000000000000000000000fe5f00 -{"d":{"$numberDecimal":"0E+6111"}} -{"d":{"$numberDecimal":"0E+6111"}} -180000001364000000000000000000000000000000fe5f00 -180000001364000000000000000000000000000000fe5f00 -180000001364000000000000000000000000000000fe5f00 -180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000000000 +180000001364000000000000000000000000000000000000 +{"d":{"$numberDecimal":"0E-6176"}} +{"d":{"$numberDecimal":"0E-6176"}} +180000001364000000000000000000000000000000000000 +180000001364000000000000000000000000000000000000 +180000001364000000000000000000000000000000000000 +180000001364000000000000000000000000000000000000 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-028.phpt b/tests/bson-corpus/decimal128-5-valid-028.phpt index 1d4ad2e03..33834b516 100644 --- a/tests/bson-corpus/decimal128-5-valid-028.phpt +++ b/tests/bson-corpus/decimal128-5-valid-028.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq416] clamped zeros... (Clamped) +Decimal128: [decq414] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -11,7 +11,7 @@ require_once __DIR__ . '/../utils/basic.inc'; $canonicalBson = hex2bin('180000001364000000000000000000000000000000FE5F00'); $canonicalExtJson = '{"d" : {"$numberDecimal" : "0E+6111"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "0E+6144"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "0E+6112"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; diff --git a/tests/bson-corpus/decimal128-5-valid-029.phpt b/tests/bson-corpus/decimal128-5-valid-029.phpt index a348b6777..1d4ad2e03 100644 --- a/tests/bson-corpus/decimal128-5-valid-029.phpt +++ b/tests/bson-corpus/decimal128-5-valid-029.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq418] clamped zeros... (Clamped) +Decimal128: [decq416] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -11,7 +11,7 @@ require_once __DIR__ . '/../utils/basic.inc'; $canonicalBson = hex2bin('180000001364000000000000000000000000000000FE5F00'); $canonicalExtJson = '{"d" : {"$numberDecimal" : "0E+6111"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "0E+8000"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "0E+6144"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; diff --git a/tests/bson-corpus/decimal128-5-valid-030.phpt b/tests/bson-corpus/decimal128-5-valid-030.phpt index 9c8f7f71e..a348b6777 100644 --- a/tests/bson-corpus/decimal128-5-valid-030.phpt +++ b/tests/bson-corpus/decimal128-5-valid-030.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq420] negative zeros (Clamped) +Decimal128: [decq418] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000000000000000000000000000008000'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E-6176"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E-8000"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "0E+6111"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "0E+8000"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000000000000000000000000000008000 -180000001364000000000000000000000000000000008000 -{"d":{"$numberDecimal":"-0E-6176"}} -{"d":{"$numberDecimal":"-0E-6176"}} -180000001364000000000000000000000000000000008000 -180000001364000000000000000000000000000000008000 -180000001364000000000000000000000000000000008000 -180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000fe5f00 +{"d":{"$numberDecimal":"0E+6111"}} +{"d":{"$numberDecimal":"0E+6111"}} +180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-031.phpt b/tests/bson-corpus/decimal128-5-valid-031.phpt index 670cbf4f5..9e6e024c5 100644 --- a/tests/bson-corpus/decimal128-5-valid-031.phpt +++ b/tests/bson-corpus/decimal128-5-valid-031.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq421] negative zeros (Clamped) +Decimal128: clamped zeros with a large positive exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000000000000000000000000000008000'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E-6176"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E-6177"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "0E+6111"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "0E+999999999999"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000000000000000000000000000008000 -180000001364000000000000000000000000000000008000 -{"d":{"$numberDecimal":"-0E-6176"}} -{"d":{"$numberDecimal":"-0E-6176"}} -180000001364000000000000000000000000000000008000 -180000001364000000000000000000000000000000008000 -180000001364000000000000000000000000000000008000 -180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000fe5f00 +{"d":{"$numberDecimal":"0E+6111"}} +{"d":{"$numberDecimal":"0E+6111"}} +180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000fe5f00 +180000001364000000000000000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-032.phpt b/tests/bson-corpus/decimal128-5-valid-032.phpt index 3fb3d04d3..9c8f7f71e 100644 --- a/tests/bson-corpus/decimal128-5-valid-032.phpt +++ b/tests/bson-corpus/decimal128-5-valid-032.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq434] clamped zeros... (Clamped) +Decimal128: [decq420] negative zeros (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000000000000000000000000000FEDF00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E+6111"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E+6112"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000008000'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E-6176"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E-8000"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -{"d":{"$numberDecimal":"-0E+6111"}} -{"d":{"$numberDecimal":"-0E+6111"}} -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +{"d":{"$numberDecimal":"-0E-6176"}} +{"d":{"$numberDecimal":"-0E-6176"}} +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-033.phpt b/tests/bson-corpus/decimal128-5-valid-033.phpt index 3d3718e7b..670cbf4f5 100644 --- a/tests/bson-corpus/decimal128-5-valid-033.phpt +++ b/tests/bson-corpus/decimal128-5-valid-033.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq436] clamped zeros... (Clamped) +Decimal128: [decq421] negative zeros (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000000000000000000000000000FEDF00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E+6111"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E+6144"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000008000'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E-6176"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E-6177"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -{"d":{"$numberDecimal":"-0E+6111"}} -{"d":{"$numberDecimal":"-0E+6111"}} -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +{"d":{"$numberDecimal":"-0E-6176"}} +{"d":{"$numberDecimal":"-0E-6176"}} +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-034.phpt b/tests/bson-corpus/decimal128-5-valid-034.phpt index 985c33c78..f00b9f06a 100644 --- a/tests/bson-corpus/decimal128-5-valid-034.phpt +++ b/tests/bson-corpus/decimal128-5-valid-034.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq438] clamped zeros... (Clamped) +Decimal128: clamped negative zeros with a large negative exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000000000000000000000000000FEDF00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E+6111"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E+8000"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000008000'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E-6176"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E-999999999999"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -{"d":{"$numberDecimal":"-0E+6111"}} -{"d":{"$numberDecimal":"-0E+6111"}} -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 -180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +{"d":{"$numberDecimal":"-0E-6176"}} +{"d":{"$numberDecimal":"-0E-6176"}} +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 +180000001364000000000000000000000000000000008000 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-035.phpt b/tests/bson-corpus/decimal128-5-valid-035.phpt index 23dd970a0..3fb3d04d3 100644 --- a/tests/bson-corpus/decimal128-5-valid-035.phpt +++ b/tests/bson-corpus/decimal128-5-valid-035.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq601] fold-down full sequence (Clamped) +Decimal128: [decq434] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000000000A5BC138938D44C64D31FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000000000000000E+6144"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6144"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000FEDF00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E+6111"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E+6112"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000000000a5bc138938d44c64d31fe5f00 -18000000136400000000000a5bc138938d44c64d31fe5f00 -{"d":{"$numberDecimal":"1.000000000000000000000000000000000E+6144"}} -{"d":{"$numberDecimal":"1.000000000000000000000000000000000E+6144"}} -18000000136400000000000a5bc138938d44c64d31fe5f00 -18000000136400000000000a5bc138938d44c64d31fe5f00 -18000000136400000000000a5bc138938d44c64d31fe5f00 -18000000136400000000000a5bc138938d44c64d31fe5f00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +{"d":{"$numberDecimal":"-0E+6111"}} +{"d":{"$numberDecimal":"-0E+6111"}} +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-036.phpt b/tests/bson-corpus/decimal128-5-valid-036.phpt index 6b2e3a9a9..3d3718e7b 100644 --- a/tests/bson-corpus/decimal128-5-valid-036.phpt +++ b/tests/bson-corpus/decimal128-5-valid-036.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq603] fold-down full sequence (Clamped) +Decimal128: [decq436] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000000081EFAC855B416D2DEE04FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000000000000000E+6143"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6143"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000FEDF00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E+6111"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E+6144"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000000081efac855b416d2dee04fe5f00 -180000001364000000000081efac855b416d2dee04fe5f00 -{"d":{"$numberDecimal":"1.00000000000000000000000000000000E+6143"}} -{"d":{"$numberDecimal":"1.00000000000000000000000000000000E+6143"}} -180000001364000000000081efac855b416d2dee04fe5f00 -180000001364000000000081efac855b416d2dee04fe5f00 -180000001364000000000081efac855b416d2dee04fe5f00 -180000001364000000000081efac855b416d2dee04fe5f00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +{"d":{"$numberDecimal":"-0E+6111"}} +{"d":{"$numberDecimal":"-0E+6111"}} +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-037.phpt b/tests/bson-corpus/decimal128-5-valid-037.phpt index 25e9a0487..985c33c78 100644 --- a/tests/bson-corpus/decimal128-5-valid-037.phpt +++ b/tests/bson-corpus/decimal128-5-valid-037.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq605] fold-down full sequence (Clamped) +Decimal128: [decq438] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000000080264B91C02220BE377E00FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000000000000000E+6142"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6142"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000FEDF00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E+6111"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E+8000"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000000080264b91c02220be377e00fe5f00 -1800000013640000000080264b91c02220be377e00fe5f00 -{"d":{"$numberDecimal":"1.0000000000000000000000000000000E+6142"}} -{"d":{"$numberDecimal":"1.0000000000000000000000000000000E+6142"}} -1800000013640000000080264b91c02220be377e00fe5f00 -1800000013640000000080264b91c02220be377e00fe5f00 -1800000013640000000080264b91c02220be377e00fe5f00 -1800000013640000000080264b91c02220be377e00fe5f00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +{"d":{"$numberDecimal":"-0E+6111"}} +{"d":{"$numberDecimal":"-0E+6111"}} +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-038.phpt b/tests/bson-corpus/decimal128-5-valid-038.phpt index ac433ca4a..4da69020c 100644 --- a/tests/bson-corpus/decimal128-5-valid-038.phpt +++ b/tests/bson-corpus/decimal128-5-valid-038.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq607] fold-down full sequence (Clamped) +Decimal128: clamped negative zeros with a large positive exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000000040EAED7446D09C2C9F0C00FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000000000000E+6141"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6141"}}'; +$canonicalBson = hex2bin('180000001364000000000000000000000000000000FEDF00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "-0E+6111"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "-0E+999999999999"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000000040eaed7446d09c2c9f0c00fe5f00 -1800000013640000000040eaed7446d09c2c9f0c00fe5f00 -{"d":{"$numberDecimal":"1.000000000000000000000000000000E+6141"}} -{"d":{"$numberDecimal":"1.000000000000000000000000000000E+6141"}} -1800000013640000000040eaed7446d09c2c9f0c00fe5f00 -1800000013640000000040eaed7446d09c2c9f0c00fe5f00 -1800000013640000000040eaed7446d09c2c9f0c00fe5f00 -1800000013640000000040eaed7446d09c2c9f0c00fe5f00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +{"d":{"$numberDecimal":"-0E+6111"}} +{"d":{"$numberDecimal":"-0E+6111"}} +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 +180000001364000000000000000000000000000000fedf00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-039.phpt b/tests/bson-corpus/decimal128-5-valid-039.phpt index b6c68de9e..23dd970a0 100644 --- a/tests/bson-corpus/decimal128-5-valid-039.phpt +++ b/tests/bson-corpus/decimal128-5-valid-039.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq609] fold-down full sequence (Clamped) +Decimal128: [decq601] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000000A0CA17726DAE0F1E430100FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000000000000E+6140"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6140"}}'; +$canonicalBson = hex2bin('18000000136400000000000A5BC138938D44C64D31FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000000000000000E+6144"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6144"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000000a0ca17726dae0f1e430100fe5f00 -18000000136400000000a0ca17726dae0f1e430100fe5f00 -{"d":{"$numberDecimal":"1.00000000000000000000000000000E+6140"}} -{"d":{"$numberDecimal":"1.00000000000000000000000000000E+6140"}} -18000000136400000000a0ca17726dae0f1e430100fe5f00 -18000000136400000000a0ca17726dae0f1e430100fe5f00 -18000000136400000000a0ca17726dae0f1e430100fe5f00 -18000000136400000000a0ca17726dae0f1e430100fe5f00 +18000000136400000000000a5bc138938d44c64d31fe5f00 +18000000136400000000000a5bc138938d44c64d31fe5f00 +{"d":{"$numberDecimal":"1.000000000000000000000000000000000E+6144"}} +{"d":{"$numberDecimal":"1.000000000000000000000000000000000E+6144"}} +18000000136400000000000a5bc138938d44c64d31fe5f00 +18000000136400000000000a5bc138938d44c64d31fe5f00 +18000000136400000000000a5bc138938d44c64d31fe5f00 +18000000136400000000000a5bc138938d44c64d31fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-040.phpt b/tests/bson-corpus/decimal128-5-valid-040.phpt index 99403188b..6b2e3a9a9 100644 --- a/tests/bson-corpus/decimal128-5-valid-040.phpt +++ b/tests/bson-corpus/decimal128-5-valid-040.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq611] fold-down full sequence (Clamped) +Decimal128: [decq603] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000000106102253E5ECE4F200000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000000000000E+6139"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6139"}}'; +$canonicalBson = hex2bin('180000001364000000000081EFAC855B416D2DEE04FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000000000000000E+6143"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6143"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000000106102253e5ece4f200000fe5f00 -18000000136400000000106102253e5ece4f200000fe5f00 -{"d":{"$numberDecimal":"1.0000000000000000000000000000E+6139"}} -{"d":{"$numberDecimal":"1.0000000000000000000000000000E+6139"}} -18000000136400000000106102253e5ece4f200000fe5f00 -18000000136400000000106102253e5ece4f200000fe5f00 -18000000136400000000106102253e5ece4f200000fe5f00 -18000000136400000000106102253e5ece4f200000fe5f00 +180000001364000000000081efac855b416d2dee04fe5f00 +180000001364000000000081efac855b416d2dee04fe5f00 +{"d":{"$numberDecimal":"1.00000000000000000000000000000000E+6143"}} +{"d":{"$numberDecimal":"1.00000000000000000000000000000000E+6143"}} +180000001364000000000081efac855b416d2dee04fe5f00 +180000001364000000000081efac855b416d2dee04fe5f00 +180000001364000000000081efac855b416d2dee04fe5f00 +180000001364000000000081efac855b416d2dee04fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-041.phpt b/tests/bson-corpus/decimal128-5-valid-041.phpt index 1adab98aa..25e9a0487 100644 --- a/tests/bson-corpus/decimal128-5-valid-041.phpt +++ b/tests/bson-corpus/decimal128-5-valid-041.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq613] fold-down full sequence (Clamped) +Decimal128: [decq605] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000000E83C80D09F3C2E3B030000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000000000E+6138"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6138"}}'; +$canonicalBson = hex2bin('1800000013640000000080264B91C02220BE377E00FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000000000000000E+6142"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6142"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000000e83c80d09f3c2e3b030000fe5f00 -18000000136400000000e83c80d09f3c2e3b030000fe5f00 -{"d":{"$numberDecimal":"1.000000000000000000000000000E+6138"}} -{"d":{"$numberDecimal":"1.000000000000000000000000000E+6138"}} -18000000136400000000e83c80d09f3c2e3b030000fe5f00 -18000000136400000000e83c80d09f3c2e3b030000fe5f00 -18000000136400000000e83c80d09f3c2e3b030000fe5f00 -18000000136400000000e83c80d09f3c2e3b030000fe5f00 +1800000013640000000080264b91c02220be377e00fe5f00 +1800000013640000000080264b91c02220be377e00fe5f00 +{"d":{"$numberDecimal":"1.0000000000000000000000000000000E+6142"}} +{"d":{"$numberDecimal":"1.0000000000000000000000000000000E+6142"}} +1800000013640000000080264b91c02220be377e00fe5f00 +1800000013640000000080264b91c02220be377e00fe5f00 +1800000013640000000080264b91c02220be377e00fe5f00 +1800000013640000000080264b91c02220be377e00fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-042.phpt b/tests/bson-corpus/decimal128-5-valid-042.phpt index 67514d295..ac433ca4a 100644 --- a/tests/bson-corpus/decimal128-5-valid-042.phpt +++ b/tests/bson-corpus/decimal128-5-valid-042.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq615] fold-down full sequence (Clamped) +Decimal128: [decq607] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000000E4D20CC8DCD2B752000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000000000E+6137"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6137"}}'; +$canonicalBson = hex2bin('1800000013640000000040EAED7446D09C2C9F0C00FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000000000000E+6141"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6141"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000000e4d20cc8dcd2b752000000fe5f00 -18000000136400000000e4d20cc8dcd2b752000000fe5f00 -{"d":{"$numberDecimal":"1.00000000000000000000000000E+6137"}} -{"d":{"$numberDecimal":"1.00000000000000000000000000E+6137"}} -18000000136400000000e4d20cc8dcd2b752000000fe5f00 -18000000136400000000e4d20cc8dcd2b752000000fe5f00 -18000000136400000000e4d20cc8dcd2b752000000fe5f00 -18000000136400000000e4d20cc8dcd2b752000000fe5f00 +1800000013640000000040eaed7446d09c2c9f0c00fe5f00 +1800000013640000000040eaed7446d09c2c9f0c00fe5f00 +{"d":{"$numberDecimal":"1.000000000000000000000000000000E+6141"}} +{"d":{"$numberDecimal":"1.000000000000000000000000000000E+6141"}} +1800000013640000000040eaed7446d09c2c9f0c00fe5f00 +1800000013640000000040eaed7446d09c2c9f0c00fe5f00 +1800000013640000000040eaed7446d09c2c9f0c00fe5f00 +1800000013640000000040eaed7446d09c2c9f0c00fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-043.phpt b/tests/bson-corpus/decimal128-5-valid-043.phpt index 66ccb03df..b6c68de9e 100644 --- a/tests/bson-corpus/decimal128-5-valid-043.phpt +++ b/tests/bson-corpus/decimal128-5-valid-043.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq617] fold-down full sequence (Clamped) +Decimal128: [decq609] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000004A48011416954508000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000000000E+6136"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6136"}}'; +$canonicalBson = hex2bin('18000000136400000000A0CA17726DAE0F1E430100FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000000000000E+6140"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6140"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000004a48011416954508000000fe5f00 -180000001364000000004a48011416954508000000fe5f00 -{"d":{"$numberDecimal":"1.0000000000000000000000000E+6136"}} -{"d":{"$numberDecimal":"1.0000000000000000000000000E+6136"}} -180000001364000000004a48011416954508000000fe5f00 -180000001364000000004a48011416954508000000fe5f00 -180000001364000000004a48011416954508000000fe5f00 -180000001364000000004a48011416954508000000fe5f00 +18000000136400000000a0ca17726dae0f1e430100fe5f00 +18000000136400000000a0ca17726dae0f1e430100fe5f00 +{"d":{"$numberDecimal":"1.00000000000000000000000000000E+6140"}} +{"d":{"$numberDecimal":"1.00000000000000000000000000000E+6140"}} +18000000136400000000a0ca17726dae0f1e430100fe5f00 +18000000136400000000a0ca17726dae0f1e430100fe5f00 +18000000136400000000a0ca17726dae0f1e430100fe5f00 +18000000136400000000a0ca17726dae0f1e430100fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-044.phpt b/tests/bson-corpus/decimal128-5-valid-044.phpt index 7f01cd756..99403188b 100644 --- a/tests/bson-corpus/decimal128-5-valid-044.phpt +++ b/tests/bson-corpus/decimal128-5-valid-044.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq619] fold-down full sequence (Clamped) +Decimal128: [decq611] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000000A1EDCCCE1BC2D300000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000000E+6135"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6135"}}'; +$canonicalBson = hex2bin('18000000136400000000106102253E5ECE4F200000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000000000000E+6139"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6139"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000000a1edccce1bc2d300000000fe5f00 -18000000136400000000a1edccce1bc2d300000000fe5f00 -{"d":{"$numberDecimal":"1.000000000000000000000000E+6135"}} -{"d":{"$numberDecimal":"1.000000000000000000000000E+6135"}} -18000000136400000000a1edccce1bc2d300000000fe5f00 -18000000136400000000a1edccce1bc2d300000000fe5f00 -18000000136400000000a1edccce1bc2d300000000fe5f00 -18000000136400000000a1edccce1bc2d300000000fe5f00 +18000000136400000000106102253e5ece4f200000fe5f00 +18000000136400000000106102253e5ece4f200000fe5f00 +{"d":{"$numberDecimal":"1.0000000000000000000000000000E+6139"}} +{"d":{"$numberDecimal":"1.0000000000000000000000000000E+6139"}} +18000000136400000000106102253e5ece4f200000fe5f00 +18000000136400000000106102253e5ece4f200000fe5f00 +18000000136400000000106102253e5ece4f200000fe5f00 +18000000136400000000106102253e5ece4f200000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-045.phpt b/tests/bson-corpus/decimal128-5-valid-045.phpt index 118e41474..1adab98aa 100644 --- a/tests/bson-corpus/decimal128-5-valid-045.phpt +++ b/tests/bson-corpus/decimal128-5-valid-045.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq621] fold-down full sequence (Clamped) +Decimal128: [decq613] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000080F64AE1C7022D1500000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000000E+6134"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6134"}}'; +$canonicalBson = hex2bin('18000000136400000000E83C80D09F3C2E3B030000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000000000E+6138"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6138"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000080f64ae1c7022d1500000000fe5f00 -18000000136400000080f64ae1c7022d1500000000fe5f00 -{"d":{"$numberDecimal":"1.00000000000000000000000E+6134"}} -{"d":{"$numberDecimal":"1.00000000000000000000000E+6134"}} -18000000136400000080f64ae1c7022d1500000000fe5f00 -18000000136400000080f64ae1c7022d1500000000fe5f00 -18000000136400000080f64ae1c7022d1500000000fe5f00 -18000000136400000080f64ae1c7022d1500000000fe5f00 +18000000136400000000e83c80d09f3c2e3b030000fe5f00 +18000000136400000000e83c80d09f3c2e3b030000fe5f00 +{"d":{"$numberDecimal":"1.000000000000000000000000000E+6138"}} +{"d":{"$numberDecimal":"1.000000000000000000000000000E+6138"}} +18000000136400000000e83c80d09f3c2e3b030000fe5f00 +18000000136400000000e83c80d09f3c2e3b030000fe5f00 +18000000136400000000e83c80d09f3c2e3b030000fe5f00 +18000000136400000000e83c80d09f3c2e3b030000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-046.phpt b/tests/bson-corpus/decimal128-5-valid-046.phpt index f7313231e..67514d295 100644 --- a/tests/bson-corpus/decimal128-5-valid-046.phpt +++ b/tests/bson-corpus/decimal128-5-valid-046.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq623] fold-down full sequence (Clamped) +Decimal128: [decq615] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000040B2BAC9E0191E0200000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000000E+6133"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6133"}}'; +$canonicalBson = hex2bin('18000000136400000000E4D20CC8DCD2B752000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000000000E+6137"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6137"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000040b2bac9e0191e0200000000fe5f00 -18000000136400000040b2bac9e0191e0200000000fe5f00 -{"d":{"$numberDecimal":"1.0000000000000000000000E+6133"}} -{"d":{"$numberDecimal":"1.0000000000000000000000E+6133"}} -18000000136400000040b2bac9e0191e0200000000fe5f00 -18000000136400000040b2bac9e0191e0200000000fe5f00 -18000000136400000040b2bac9e0191e0200000000fe5f00 -18000000136400000040b2bac9e0191e0200000000fe5f00 +18000000136400000000e4d20cc8dcd2b752000000fe5f00 +18000000136400000000e4d20cc8dcd2b752000000fe5f00 +{"d":{"$numberDecimal":"1.00000000000000000000000000E+6137"}} +{"d":{"$numberDecimal":"1.00000000000000000000000000E+6137"}} +18000000136400000000e4d20cc8dcd2b752000000fe5f00 +18000000136400000000e4d20cc8dcd2b752000000fe5f00 +18000000136400000000e4d20cc8dcd2b752000000fe5f00 +18000000136400000000e4d20cc8dcd2b752000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-047.phpt b/tests/bson-corpus/decimal128-5-valid-047.phpt index c71a25723..66ccb03df 100644 --- a/tests/bson-corpus/decimal128-5-valid-047.phpt +++ b/tests/bson-corpus/decimal128-5-valid-047.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq625] fold-down full sequence (Clamped) +Decimal128: [decq617] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000A0DEC5ADC935360000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000E+6132"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6132"}}'; +$canonicalBson = hex2bin('180000001364000000004A48011416954508000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000000000E+6136"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6136"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000a0dec5adc935360000000000fe5f00 -180000001364000000a0dec5adc935360000000000fe5f00 -{"d":{"$numberDecimal":"1.000000000000000000000E+6132"}} -{"d":{"$numberDecimal":"1.000000000000000000000E+6132"}} -180000001364000000a0dec5adc935360000000000fe5f00 -180000001364000000a0dec5adc935360000000000fe5f00 -180000001364000000a0dec5adc935360000000000fe5f00 -180000001364000000a0dec5adc935360000000000fe5f00 +180000001364000000004a48011416954508000000fe5f00 +180000001364000000004a48011416954508000000fe5f00 +{"d":{"$numberDecimal":"1.0000000000000000000000000E+6136"}} +{"d":{"$numberDecimal":"1.0000000000000000000000000E+6136"}} +180000001364000000004a48011416954508000000fe5f00 +180000001364000000004a48011416954508000000fe5f00 +180000001364000000004a48011416954508000000fe5f00 +180000001364000000004a48011416954508000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-048.phpt b/tests/bson-corpus/decimal128-5-valid-048.phpt index 2c9a4b59d..7f01cd756 100644 --- a/tests/bson-corpus/decimal128-5-valid-048.phpt +++ b/tests/bson-corpus/decimal128-5-valid-048.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq627] fold-down full sequence (Clamped) +Decimal128: [decq619] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000010632D5EC76B050000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000E+6131"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6131"}}'; +$canonicalBson = hex2bin('18000000136400000000A1EDCCCE1BC2D300000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000000E+6135"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6135"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000010632d5ec76b050000000000fe5f00 -18000000136400000010632d5ec76b050000000000fe5f00 -{"d":{"$numberDecimal":"1.00000000000000000000E+6131"}} -{"d":{"$numberDecimal":"1.00000000000000000000E+6131"}} -18000000136400000010632d5ec76b050000000000fe5f00 -18000000136400000010632d5ec76b050000000000fe5f00 -18000000136400000010632d5ec76b050000000000fe5f00 -18000000136400000010632d5ec76b050000000000fe5f00 +18000000136400000000a1edccce1bc2d300000000fe5f00 +18000000136400000000a1edccce1bc2d300000000fe5f00 +{"d":{"$numberDecimal":"1.000000000000000000000000E+6135"}} +{"d":{"$numberDecimal":"1.000000000000000000000000E+6135"}} +18000000136400000000a1edccce1bc2d300000000fe5f00 +18000000136400000000a1edccce1bc2d300000000fe5f00 +18000000136400000000a1edccce1bc2d300000000fe5f00 +18000000136400000000a1edccce1bc2d300000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-049.phpt b/tests/bson-corpus/decimal128-5-valid-049.phpt index 868a17caa..118e41474 100644 --- a/tests/bson-corpus/decimal128-5-valid-049.phpt +++ b/tests/bson-corpus/decimal128-5-valid-049.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq629] fold-down full sequence (Clamped) +Decimal128: [decq621] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000E8890423C78A000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000E+6130"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6130"}}'; +$canonicalBson = hex2bin('18000000136400000080F64AE1C7022D1500000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000000E+6134"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6134"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000e8890423c78a000000000000fe5f00 -180000001364000000e8890423c78a000000000000fe5f00 -{"d":{"$numberDecimal":"1.0000000000000000000E+6130"}} -{"d":{"$numberDecimal":"1.0000000000000000000E+6130"}} -180000001364000000e8890423c78a000000000000fe5f00 -180000001364000000e8890423c78a000000000000fe5f00 -180000001364000000e8890423c78a000000000000fe5f00 -180000001364000000e8890423c78a000000000000fe5f00 +18000000136400000080f64ae1c7022d1500000000fe5f00 +18000000136400000080f64ae1c7022d1500000000fe5f00 +{"d":{"$numberDecimal":"1.00000000000000000000000E+6134"}} +{"d":{"$numberDecimal":"1.00000000000000000000000E+6134"}} +18000000136400000080f64ae1c7022d1500000000fe5f00 +18000000136400000080f64ae1c7022d1500000000fe5f00 +18000000136400000080f64ae1c7022d1500000000fe5f00 +18000000136400000080f64ae1c7022d1500000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-050.phpt b/tests/bson-corpus/decimal128-5-valid-050.phpt index b67d50589..f7313231e 100644 --- a/tests/bson-corpus/decimal128-5-valid-050.phpt +++ b/tests/bson-corpus/decimal128-5-valid-050.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq631] fold-down full sequence (Clamped) +Decimal128: [decq623] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400000064A7B3B6E00D000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000E+6129"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6129"}}'; +$canonicalBson = hex2bin('18000000136400000040B2BAC9E0191E0200000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000000E+6133"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6133"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400000064a7b3b6e00d000000000000fe5f00 -18000000136400000064a7b3b6e00d000000000000fe5f00 -{"d":{"$numberDecimal":"1.000000000000000000E+6129"}} -{"d":{"$numberDecimal":"1.000000000000000000E+6129"}} -18000000136400000064a7b3b6e00d000000000000fe5f00 -18000000136400000064a7b3b6e00d000000000000fe5f00 -18000000136400000064a7b3b6e00d000000000000fe5f00 -18000000136400000064a7b3b6e00d000000000000fe5f00 +18000000136400000040b2bac9e0191e0200000000fe5f00 +18000000136400000040b2bac9e0191e0200000000fe5f00 +{"d":{"$numberDecimal":"1.0000000000000000000000E+6133"}} +{"d":{"$numberDecimal":"1.0000000000000000000000E+6133"}} +18000000136400000040b2bac9e0191e0200000000fe5f00 +18000000136400000040b2bac9e0191e0200000000fe5f00 +18000000136400000040b2bac9e0191e0200000000fe5f00 +18000000136400000040b2bac9e0191e0200000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-051.phpt b/tests/bson-corpus/decimal128-5-valid-051.phpt index 13e34a4a5..c71a25723 100644 --- a/tests/bson-corpus/decimal128-5-valid-051.phpt +++ b/tests/bson-corpus/decimal128-5-valid-051.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq633] fold-down full sequence (Clamped) +Decimal128: [decq625] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000008A5D78456301000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000E+6128"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6128"}}'; +$canonicalBson = hex2bin('180000001364000000A0DEC5ADC935360000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000000E+6132"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6132"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000008a5d78456301000000000000fe5f00 -1800000013640000008a5d78456301000000000000fe5f00 -{"d":{"$numberDecimal":"1.00000000000000000E+6128"}} -{"d":{"$numberDecimal":"1.00000000000000000E+6128"}} -1800000013640000008a5d78456301000000000000fe5f00 -1800000013640000008a5d78456301000000000000fe5f00 -1800000013640000008a5d78456301000000000000fe5f00 -1800000013640000008a5d78456301000000000000fe5f00 +180000001364000000a0dec5adc935360000000000fe5f00 +180000001364000000a0dec5adc935360000000000fe5f00 +{"d":{"$numberDecimal":"1.000000000000000000000E+6132"}} +{"d":{"$numberDecimal":"1.000000000000000000000E+6132"}} +180000001364000000a0dec5adc935360000000000fe5f00 +180000001364000000a0dec5adc935360000000000fe5f00 +180000001364000000a0dec5adc935360000000000fe5f00 +180000001364000000a0dec5adc935360000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-052.phpt b/tests/bson-corpus/decimal128-5-valid-052.phpt index 9fe13a58a..2c9a4b59d 100644 --- a/tests/bson-corpus/decimal128-5-valid-052.phpt +++ b/tests/bson-corpus/decimal128-5-valid-052.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq635] fold-down full sequence (Clamped) +Decimal128: [decq627] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000000C16FF2862300000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000E+6127"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6127"}}'; +$canonicalBson = hex2bin('18000000136400000010632D5EC76B050000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000000E+6131"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6131"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000000c16ff2862300000000000000fe5f00 -180000001364000000c16ff2862300000000000000fe5f00 -{"d":{"$numberDecimal":"1.0000000000000000E+6127"}} -{"d":{"$numberDecimal":"1.0000000000000000E+6127"}} -180000001364000000c16ff2862300000000000000fe5f00 -180000001364000000c16ff2862300000000000000fe5f00 -180000001364000000c16ff2862300000000000000fe5f00 -180000001364000000c16ff2862300000000000000fe5f00 +18000000136400000010632d5ec76b050000000000fe5f00 +18000000136400000010632d5ec76b050000000000fe5f00 +{"d":{"$numberDecimal":"1.00000000000000000000E+6131"}} +{"d":{"$numberDecimal":"1.00000000000000000000E+6131"}} +18000000136400000010632d5ec76b050000000000fe5f00 +18000000136400000010632d5ec76b050000000000fe5f00 +18000000136400000010632d5ec76b050000000000fe5f00 +18000000136400000010632d5ec76b050000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-053.phpt b/tests/bson-corpus/decimal128-5-valid-053.phpt index 672938250..868a17caa 100644 --- a/tests/bson-corpus/decimal128-5-valid-053.phpt +++ b/tests/bson-corpus/decimal128-5-valid-053.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq637] fold-down full sequence (Clamped) +Decimal128: [decq629] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000080C6A47E8D0300000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000E+6126"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6126"}}'; +$canonicalBson = hex2bin('180000001364000000E8890423C78A000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000000E+6130"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6130"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000080c6a47e8d0300000000000000fe5f00 -180000001364000080c6a47e8d0300000000000000fe5f00 -{"d":{"$numberDecimal":"1.000000000000000E+6126"}} -{"d":{"$numberDecimal":"1.000000000000000E+6126"}} -180000001364000080c6a47e8d0300000000000000fe5f00 -180000001364000080c6a47e8d0300000000000000fe5f00 -180000001364000080c6a47e8d0300000000000000fe5f00 -180000001364000080c6a47e8d0300000000000000fe5f00 +180000001364000000e8890423c78a000000000000fe5f00 +180000001364000000e8890423c78a000000000000fe5f00 +{"d":{"$numberDecimal":"1.0000000000000000000E+6130"}} +{"d":{"$numberDecimal":"1.0000000000000000000E+6130"}} +180000001364000000e8890423c78a000000000000fe5f00 +180000001364000000e8890423c78a000000000000fe5f00 +180000001364000000e8890423c78a000000000000fe5f00 +180000001364000000e8890423c78a000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-054.phpt b/tests/bson-corpus/decimal128-5-valid-054.phpt index eff242abc..b67d50589 100644 --- a/tests/bson-corpus/decimal128-5-valid-054.phpt +++ b/tests/bson-corpus/decimal128-5-valid-054.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq639] fold-down full sequence (Clamped) +Decimal128: [decq631] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000407A10F35A0000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000E+6125"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6125"}}'; +$canonicalBson = hex2bin('18000000136400000064A7B3B6E00D000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000000E+6129"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6129"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000407a10f35a0000000000000000fe5f00 -1800000013640000407a10f35a0000000000000000fe5f00 -{"d":{"$numberDecimal":"1.00000000000000E+6125"}} -{"d":{"$numberDecimal":"1.00000000000000E+6125"}} -1800000013640000407a10f35a0000000000000000fe5f00 -1800000013640000407a10f35a0000000000000000fe5f00 -1800000013640000407a10f35a0000000000000000fe5f00 -1800000013640000407a10f35a0000000000000000fe5f00 +18000000136400000064a7b3b6e00d000000000000fe5f00 +18000000136400000064a7b3b6e00d000000000000fe5f00 +{"d":{"$numberDecimal":"1.000000000000000000E+6129"}} +{"d":{"$numberDecimal":"1.000000000000000000E+6129"}} +18000000136400000064a7b3b6e00d000000000000fe5f00 +18000000136400000064a7b3b6e00d000000000000fe5f00 +18000000136400000064a7b3b6e00d000000000000fe5f00 +18000000136400000064a7b3b6e00d000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-055.phpt b/tests/bson-corpus/decimal128-5-valid-055.phpt index ec9299ee6..13e34a4a5 100644 --- a/tests/bson-corpus/decimal128-5-valid-055.phpt +++ b/tests/bson-corpus/decimal128-5-valid-055.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq641] fold-down full sequence (Clamped) +Decimal128: [decq633] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000A0724E18090000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000E+6124"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6124"}}'; +$canonicalBson = hex2bin('1800000013640000008A5D78456301000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000000E+6128"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6128"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000a0724e18090000000000000000fe5f00 -1800000013640000a0724e18090000000000000000fe5f00 -{"d":{"$numberDecimal":"1.0000000000000E+6124"}} -{"d":{"$numberDecimal":"1.0000000000000E+6124"}} -1800000013640000a0724e18090000000000000000fe5f00 -1800000013640000a0724e18090000000000000000fe5f00 -1800000013640000a0724e18090000000000000000fe5f00 -1800000013640000a0724e18090000000000000000fe5f00 +1800000013640000008a5d78456301000000000000fe5f00 +1800000013640000008a5d78456301000000000000fe5f00 +{"d":{"$numberDecimal":"1.00000000000000000E+6128"}} +{"d":{"$numberDecimal":"1.00000000000000000E+6128"}} +1800000013640000008a5d78456301000000000000fe5f00 +1800000013640000008a5d78456301000000000000fe5f00 +1800000013640000008a5d78456301000000000000fe5f00 +1800000013640000008a5d78456301000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-056.phpt b/tests/bson-corpus/decimal128-5-valid-056.phpt index 8f5c17003..9fe13a58a 100644 --- a/tests/bson-corpus/decimal128-5-valid-056.phpt +++ b/tests/bson-corpus/decimal128-5-valid-056.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq643] fold-down full sequence (Clamped) +Decimal128: [decq635] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000010A5D4E8000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000E+6123"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6123"}}'; +$canonicalBson = hex2bin('180000001364000000C16FF2862300000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000000E+6127"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6127"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000010a5d4e8000000000000000000fe5f00 -180000001364000010a5d4e8000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.000000000000E+6123"}} -{"d":{"$numberDecimal":"1.000000000000E+6123"}} -180000001364000010a5d4e8000000000000000000fe5f00 -180000001364000010a5d4e8000000000000000000fe5f00 -180000001364000010a5d4e8000000000000000000fe5f00 -180000001364000010a5d4e8000000000000000000fe5f00 +180000001364000000c16ff2862300000000000000fe5f00 +180000001364000000c16ff2862300000000000000fe5f00 +{"d":{"$numberDecimal":"1.0000000000000000E+6127"}} +{"d":{"$numberDecimal":"1.0000000000000000E+6127"}} +180000001364000000c16ff2862300000000000000fe5f00 +180000001364000000c16ff2862300000000000000fe5f00 +180000001364000000c16ff2862300000000000000fe5f00 +180000001364000000c16ff2862300000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-057.phpt b/tests/bson-corpus/decimal128-5-valid-057.phpt index 906b8f9c8..672938250 100644 --- a/tests/bson-corpus/decimal128-5-valid-057.phpt +++ b/tests/bson-corpus/decimal128-5-valid-057.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq645] fold-down full sequence (Clamped) +Decimal128: [decq637] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000E8764817000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000E+6122"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6122"}}'; +$canonicalBson = hex2bin('180000001364000080C6A47E8D0300000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000000E+6126"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6126"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000e8764817000000000000000000fe5f00 -1800000013640000e8764817000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.00000000000E+6122"}} -{"d":{"$numberDecimal":"1.00000000000E+6122"}} -1800000013640000e8764817000000000000000000fe5f00 -1800000013640000e8764817000000000000000000fe5f00 -1800000013640000e8764817000000000000000000fe5f00 -1800000013640000e8764817000000000000000000fe5f00 +180000001364000080c6a47e8d0300000000000000fe5f00 +180000001364000080c6a47e8d0300000000000000fe5f00 +{"d":{"$numberDecimal":"1.000000000000000E+6126"}} +{"d":{"$numberDecimal":"1.000000000000000E+6126"}} +180000001364000080c6a47e8d0300000000000000fe5f00 +180000001364000080c6a47e8d0300000000000000fe5f00 +180000001364000080c6a47e8d0300000000000000fe5f00 +180000001364000080c6a47e8d0300000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-058.phpt b/tests/bson-corpus/decimal128-5-valid-058.phpt index 65c042683..eff242abc 100644 --- a/tests/bson-corpus/decimal128-5-valid-058.phpt +++ b/tests/bson-corpus/decimal128-5-valid-058.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq647] fold-down full sequence (Clamped) +Decimal128: [decq639] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000E40B5402000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000E+6121"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6121"}}'; +$canonicalBson = hex2bin('1800000013640000407A10F35A0000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000000E+6125"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6125"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000e40b5402000000000000000000fe5f00 -1800000013640000e40b5402000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.0000000000E+6121"}} -{"d":{"$numberDecimal":"1.0000000000E+6121"}} -1800000013640000e40b5402000000000000000000fe5f00 -1800000013640000e40b5402000000000000000000fe5f00 -1800000013640000e40b5402000000000000000000fe5f00 -1800000013640000e40b5402000000000000000000fe5f00 +1800000013640000407a10f35a0000000000000000fe5f00 +1800000013640000407a10f35a0000000000000000fe5f00 +{"d":{"$numberDecimal":"1.00000000000000E+6125"}} +{"d":{"$numberDecimal":"1.00000000000000E+6125"}} +1800000013640000407a10f35a0000000000000000fe5f00 +1800000013640000407a10f35a0000000000000000fe5f00 +1800000013640000407a10f35a0000000000000000fe5f00 +1800000013640000407a10f35a0000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-059.phpt b/tests/bson-corpus/decimal128-5-valid-059.phpt index 0a8ba8e81..ec9299ee6 100644 --- a/tests/bson-corpus/decimal128-5-valid-059.phpt +++ b/tests/bson-corpus/decimal128-5-valid-059.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq649] fold-down full sequence (Clamped) +Decimal128: [decq641] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000CA9A3B00000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000E+6120"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6120"}}'; +$canonicalBson = hex2bin('1800000013640000A0724E18090000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000000E+6124"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6124"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000ca9a3b00000000000000000000fe5f00 -1800000013640000ca9a3b00000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.000000000E+6120"}} -{"d":{"$numberDecimal":"1.000000000E+6120"}} -1800000013640000ca9a3b00000000000000000000fe5f00 -1800000013640000ca9a3b00000000000000000000fe5f00 -1800000013640000ca9a3b00000000000000000000fe5f00 -1800000013640000ca9a3b00000000000000000000fe5f00 +1800000013640000a0724e18090000000000000000fe5f00 +1800000013640000a0724e18090000000000000000fe5f00 +{"d":{"$numberDecimal":"1.0000000000000E+6124"}} +{"d":{"$numberDecimal":"1.0000000000000E+6124"}} +1800000013640000a0724e18090000000000000000fe5f00 +1800000013640000a0724e18090000000000000000fe5f00 +1800000013640000a0724e18090000000000000000fe5f00 +1800000013640000a0724e18090000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-060.phpt b/tests/bson-corpus/decimal128-5-valid-060.phpt index b3809e370..8f5c17003 100644 --- a/tests/bson-corpus/decimal128-5-valid-060.phpt +++ b/tests/bson-corpus/decimal128-5-valid-060.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq651] fold-down full sequence (Clamped) +Decimal128: [decq643] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640000E1F50500000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000E+6119"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6119"}}'; +$canonicalBson = hex2bin('180000001364000010A5D4E8000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000000E+6123"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6123"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640000e1f50500000000000000000000fe5f00 -1800000013640000e1f50500000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.00000000E+6119"}} -{"d":{"$numberDecimal":"1.00000000E+6119"}} -1800000013640000e1f50500000000000000000000fe5f00 -1800000013640000e1f50500000000000000000000fe5f00 -1800000013640000e1f50500000000000000000000fe5f00 -1800000013640000e1f50500000000000000000000fe5f00 +180000001364000010a5d4e8000000000000000000fe5f00 +180000001364000010a5d4e8000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.000000000000E+6123"}} +{"d":{"$numberDecimal":"1.000000000000E+6123"}} +180000001364000010a5d4e8000000000000000000fe5f00 +180000001364000010a5d4e8000000000000000000fe5f00 +180000001364000010a5d4e8000000000000000000fe5f00 +180000001364000010a5d4e8000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-061.phpt b/tests/bson-corpus/decimal128-5-valid-061.phpt index 79454d5e6..906b8f9c8 100644 --- a/tests/bson-corpus/decimal128-5-valid-061.phpt +++ b/tests/bson-corpus/decimal128-5-valid-061.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq653] fold-down full sequence (Clamped) +Decimal128: [decq645] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364008096980000000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000E+6118"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6118"}}'; +$canonicalBson = hex2bin('1800000013640000E8764817000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000000E+6122"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6122"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364008096980000000000000000000000fe5f00 -180000001364008096980000000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.0000000E+6118"}} -{"d":{"$numberDecimal":"1.0000000E+6118"}} -180000001364008096980000000000000000000000fe5f00 -180000001364008096980000000000000000000000fe5f00 -180000001364008096980000000000000000000000fe5f00 -180000001364008096980000000000000000000000fe5f00 +1800000013640000e8764817000000000000000000fe5f00 +1800000013640000e8764817000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.00000000000E+6122"}} +{"d":{"$numberDecimal":"1.00000000000E+6122"}} +1800000013640000e8764817000000000000000000fe5f00 +1800000013640000e8764817000000000000000000fe5f00 +1800000013640000e8764817000000000000000000fe5f00 +1800000013640000e8764817000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-062.phpt b/tests/bson-corpus/decimal128-5-valid-062.phpt index 7e0d0d1e1..65c042683 100644 --- a/tests/bson-corpus/decimal128-5-valid-062.phpt +++ b/tests/bson-corpus/decimal128-5-valid-062.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq655] fold-down full sequence (Clamped) +Decimal128: [decq647] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('1800000013640040420F0000000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000E+6117"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6117"}}'; +$canonicalBson = hex2bin('1800000013640000E40B5402000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000000E+6121"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6121"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -1800000013640040420f0000000000000000000000fe5f00 -1800000013640040420f0000000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.000000E+6117"}} -{"d":{"$numberDecimal":"1.000000E+6117"}} -1800000013640040420f0000000000000000000000fe5f00 -1800000013640040420f0000000000000000000000fe5f00 -1800000013640040420f0000000000000000000000fe5f00 -1800000013640040420f0000000000000000000000fe5f00 +1800000013640000e40b5402000000000000000000fe5f00 +1800000013640000e40b5402000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.0000000000E+6121"}} +{"d":{"$numberDecimal":"1.0000000000E+6121"}} +1800000013640000e40b5402000000000000000000fe5f00 +1800000013640000e40b5402000000000000000000fe5f00 +1800000013640000e40b5402000000000000000000fe5f00 +1800000013640000e40b5402000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-063.phpt b/tests/bson-corpus/decimal128-5-valid-063.phpt index 31a790fb9..0a8ba8e81 100644 --- a/tests/bson-corpus/decimal128-5-valid-063.phpt +++ b/tests/bson-corpus/decimal128-5-valid-063.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq657] fold-down full sequence (Clamped) +Decimal128: [decq649] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400A086010000000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000E+6116"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6116"}}'; +$canonicalBson = hex2bin('1800000013640000CA9A3B00000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000000E+6120"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6120"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400a086010000000000000000000000fe5f00 -18000000136400a086010000000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.00000E+6116"}} -{"d":{"$numberDecimal":"1.00000E+6116"}} -18000000136400a086010000000000000000000000fe5f00 -18000000136400a086010000000000000000000000fe5f00 -18000000136400a086010000000000000000000000fe5f00 -18000000136400a086010000000000000000000000fe5f00 +1800000013640000ca9a3b00000000000000000000fe5f00 +1800000013640000ca9a3b00000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.000000000E+6120"}} +{"d":{"$numberDecimal":"1.000000000E+6120"}} +1800000013640000ca9a3b00000000000000000000fe5f00 +1800000013640000ca9a3b00000000000000000000fe5f00 +1800000013640000ca9a3b00000000000000000000fe5f00 +1800000013640000ca9a3b00000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-064.phpt b/tests/bson-corpus/decimal128-5-valid-064.phpt index c96796468..b3809e370 100644 --- a/tests/bson-corpus/decimal128-5-valid-064.phpt +++ b/tests/bson-corpus/decimal128-5-valid-064.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq659] fold-down full sequence (Clamped) +Decimal128: [decq651] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364001027000000000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000E+6115"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6115"}}'; +$canonicalBson = hex2bin('1800000013640000E1F50500000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000000E+6119"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6119"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364001027000000000000000000000000fe5f00 -180000001364001027000000000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.0000E+6115"}} -{"d":{"$numberDecimal":"1.0000E+6115"}} -180000001364001027000000000000000000000000fe5f00 -180000001364001027000000000000000000000000fe5f00 -180000001364001027000000000000000000000000fe5f00 -180000001364001027000000000000000000000000fe5f00 +1800000013640000e1f50500000000000000000000fe5f00 +1800000013640000e1f50500000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.00000000E+6119"}} +{"d":{"$numberDecimal":"1.00000000E+6119"}} +1800000013640000e1f50500000000000000000000fe5f00 +1800000013640000e1f50500000000000000000000fe5f00 +1800000013640000e1f50500000000000000000000fe5f00 +1800000013640000e1f50500000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-065.phpt b/tests/bson-corpus/decimal128-5-valid-065.phpt index af8a44f87..79454d5e6 100644 --- a/tests/bson-corpus/decimal128-5-valid-065.phpt +++ b/tests/bson-corpus/decimal128-5-valid-065.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq661] fold-down full sequence (Clamped) +Decimal128: [decq653] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('18000000136400E803000000000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000E+6114"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6114"}}'; +$canonicalBson = hex2bin('180000001364008096980000000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0000000E+6118"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6118"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -18000000136400e803000000000000000000000000fe5f00 -18000000136400e803000000000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.000E+6114"}} -{"d":{"$numberDecimal":"1.000E+6114"}} -18000000136400e803000000000000000000000000fe5f00 -18000000136400e803000000000000000000000000fe5f00 -18000000136400e803000000000000000000000000fe5f00 -18000000136400e803000000000000000000000000fe5f00 +180000001364008096980000000000000000000000fe5f00 +180000001364008096980000000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.0000000E+6118"}} +{"d":{"$numberDecimal":"1.0000000E+6118"}} +180000001364008096980000000000000000000000fe5f00 +180000001364008096980000000000000000000000fe5f00 +180000001364008096980000000000000000000000fe5f00 +180000001364008096980000000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-066.phpt b/tests/bson-corpus/decimal128-5-valid-066.phpt index c60a73fea..7e0d0d1e1 100644 --- a/tests/bson-corpus/decimal128-5-valid-066.phpt +++ b/tests/bson-corpus/decimal128-5-valid-066.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq663] fold-down full sequence (Clamped) +Decimal128: [decq655] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364006400000000000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00E+6113"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6113"}}'; +$canonicalBson = hex2bin('1800000013640040420F0000000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.000000E+6117"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6117"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364006400000000000000000000000000fe5f00 -180000001364006400000000000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.00E+6113"}} -{"d":{"$numberDecimal":"1.00E+6113"}} -180000001364006400000000000000000000000000fe5f00 -180000001364006400000000000000000000000000fe5f00 -180000001364006400000000000000000000000000fe5f00 -180000001364006400000000000000000000000000fe5f00 +1800000013640040420f0000000000000000000000fe5f00 +1800000013640040420f0000000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.000000E+6117"}} +{"d":{"$numberDecimal":"1.000000E+6117"}} +1800000013640040420f0000000000000000000000fe5f00 +1800000013640040420f0000000000000000000000fe5f00 +1800000013640040420f0000000000000000000000fe5f00 +1800000013640040420f0000000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-067.phpt b/tests/bson-corpus/decimal128-5-valid-067.phpt index 242a17f53..31a790fb9 100644 --- a/tests/bson-corpus/decimal128-5-valid-067.phpt +++ b/tests/bson-corpus/decimal128-5-valid-067.phpt @@ -1,5 +1,5 @@ --TEST-- -Decimal128: [decq665] fold-down full sequence (Clamped) +Decimal128: [decq657] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php @@ -9,9 +9,9 @@ DO NOT EDIT THIS FILE require_once __DIR__ . '/../utils/basic.inc'; -$canonicalBson = hex2bin('180000001364000A00000000000000000000000000FE5F00'); -$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.0E+6112"}}'; -$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6112"}}'; +$canonicalBson = hex2bin('18000000136400A086010000000000000000000000FE5F00'); +$canonicalExtJson = '{"d" : {"$numberDecimal" : "1.00000E+6116"}}'; +$degenerateExtJson = '{"d" : {"$numberDecimal" : "1E+6116"}}'; // Canonical BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; @@ -41,12 +41,12 @@ echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n" ===DONE=== --EXPECT-- -180000001364000a00000000000000000000000000fe5f00 -180000001364000a00000000000000000000000000fe5f00 -{"d":{"$numberDecimal":"1.0E+6112"}} -{"d":{"$numberDecimal":"1.0E+6112"}} -180000001364000a00000000000000000000000000fe5f00 -180000001364000a00000000000000000000000000fe5f00 -180000001364000a00000000000000000000000000fe5f00 -180000001364000a00000000000000000000000000fe5f00 +18000000136400a086010000000000000000000000fe5f00 +18000000136400a086010000000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.00000E+6116"}} +{"d":{"$numberDecimal":"1.00000E+6116"}} +18000000136400a086010000000000000000000000fe5f00 +18000000136400a086010000000000000000000000fe5f00 +18000000136400a086010000000000000000000000fe5f00 +18000000136400a086010000000000000000000000fe5f00 ===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-068.phpt b/tests/bson-corpus/decimal128-5-valid-068.phpt new file mode 100644 index 000000000..c96796468 --- /dev/null +++ b/tests/bson-corpus/decimal128-5-valid-068.phpt @@ -0,0 +1,52 @@ +--TEST-- +Decimal128: [decq659] fold-down full sequence (Clamped) +--DESCRIPTION-- +Generated by scripts/convert-bson-corpus-tests.php + +DO NOT EDIT THIS FILE +--FILE-- + Native -> Canonical BSON +echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; + +// Canonical BSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromBSON($canonicalBson)), "\n"; + +// Canonical BSON -> Canonical extJSON +echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; + +// Canonical BSON -> BSON object -> Canonical extJSON +echo json_canonicalize(MongoDB\BSON\Document::fromBSON($canonicalBson)->toCanonicalExtendedJSON()), "\n"; + +// Canonical extJSON -> Canonical BSON +echo bin2hex(fromJSON($canonicalExtJson)), "\n"; + +// Canonical extJSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromJSON($canonicalExtJson)), "\n"; + +// Degenerate extJSON -> Canonical BSON +echo bin2hex(fromJSON($degenerateExtJson)), "\n"; + +// Degenerate extJSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n"; + +?> +===DONE=== + +--EXPECT-- +180000001364001027000000000000000000000000fe5f00 +180000001364001027000000000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.0000E+6115"}} +{"d":{"$numberDecimal":"1.0000E+6115"}} +180000001364001027000000000000000000000000fe5f00 +180000001364001027000000000000000000000000fe5f00 +180000001364001027000000000000000000000000fe5f00 +180000001364001027000000000000000000000000fe5f00 +===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-069.phpt b/tests/bson-corpus/decimal128-5-valid-069.phpt new file mode 100644 index 000000000..af8a44f87 --- /dev/null +++ b/tests/bson-corpus/decimal128-5-valid-069.phpt @@ -0,0 +1,52 @@ +--TEST-- +Decimal128: [decq661] fold-down full sequence (Clamped) +--DESCRIPTION-- +Generated by scripts/convert-bson-corpus-tests.php + +DO NOT EDIT THIS FILE +--FILE-- + Native -> Canonical BSON +echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; + +// Canonical BSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromBSON($canonicalBson)), "\n"; + +// Canonical BSON -> Canonical extJSON +echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; + +// Canonical BSON -> BSON object -> Canonical extJSON +echo json_canonicalize(MongoDB\BSON\Document::fromBSON($canonicalBson)->toCanonicalExtendedJSON()), "\n"; + +// Canonical extJSON -> Canonical BSON +echo bin2hex(fromJSON($canonicalExtJson)), "\n"; + +// Canonical extJSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromJSON($canonicalExtJson)), "\n"; + +// Degenerate extJSON -> Canonical BSON +echo bin2hex(fromJSON($degenerateExtJson)), "\n"; + +// Degenerate extJSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n"; + +?> +===DONE=== + +--EXPECT-- +18000000136400e803000000000000000000000000fe5f00 +18000000136400e803000000000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.000E+6114"}} +{"d":{"$numberDecimal":"1.000E+6114"}} +18000000136400e803000000000000000000000000fe5f00 +18000000136400e803000000000000000000000000fe5f00 +18000000136400e803000000000000000000000000fe5f00 +18000000136400e803000000000000000000000000fe5f00 +===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-070.phpt b/tests/bson-corpus/decimal128-5-valid-070.phpt new file mode 100644 index 000000000..c60a73fea --- /dev/null +++ b/tests/bson-corpus/decimal128-5-valid-070.phpt @@ -0,0 +1,52 @@ +--TEST-- +Decimal128: [decq663] fold-down full sequence (Clamped) +--DESCRIPTION-- +Generated by scripts/convert-bson-corpus-tests.php + +DO NOT EDIT THIS FILE +--FILE-- + Native -> Canonical BSON +echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; + +// Canonical BSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromBSON($canonicalBson)), "\n"; + +// Canonical BSON -> Canonical extJSON +echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; + +// Canonical BSON -> BSON object -> Canonical extJSON +echo json_canonicalize(MongoDB\BSON\Document::fromBSON($canonicalBson)->toCanonicalExtendedJSON()), "\n"; + +// Canonical extJSON -> Canonical BSON +echo bin2hex(fromJSON($canonicalExtJson)), "\n"; + +// Canonical extJSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromJSON($canonicalExtJson)), "\n"; + +// Degenerate extJSON -> Canonical BSON +echo bin2hex(fromJSON($degenerateExtJson)), "\n"; + +// Degenerate extJSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n"; + +?> +===DONE=== + +--EXPECT-- +180000001364006400000000000000000000000000fe5f00 +180000001364006400000000000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.00E+6113"}} +{"d":{"$numberDecimal":"1.00E+6113"}} +180000001364006400000000000000000000000000fe5f00 +180000001364006400000000000000000000000000fe5f00 +180000001364006400000000000000000000000000fe5f00 +180000001364006400000000000000000000000000fe5f00 +===DONE=== \ No newline at end of file diff --git a/tests/bson-corpus/decimal128-5-valid-071.phpt b/tests/bson-corpus/decimal128-5-valid-071.phpt new file mode 100644 index 000000000..242a17f53 --- /dev/null +++ b/tests/bson-corpus/decimal128-5-valid-071.phpt @@ -0,0 +1,52 @@ +--TEST-- +Decimal128: [decq665] fold-down full sequence (Clamped) +--DESCRIPTION-- +Generated by scripts/convert-bson-corpus-tests.php + +DO NOT EDIT THIS FILE +--FILE-- + Native -> Canonical BSON +echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; + +// Canonical BSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromBSON($canonicalBson)), "\n"; + +// Canonical BSON -> Canonical extJSON +echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; + +// Canonical BSON -> BSON object -> Canonical extJSON +echo json_canonicalize(MongoDB\BSON\Document::fromBSON($canonicalBson)->toCanonicalExtendedJSON()), "\n"; + +// Canonical extJSON -> Canonical BSON +echo bin2hex(fromJSON($canonicalExtJson)), "\n"; + +// Canonical extJSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromJSON($canonicalExtJson)), "\n"; + +// Degenerate extJSON -> Canonical BSON +echo bin2hex(fromJSON($degenerateExtJson)), "\n"; + +// Degenerate extJSON -> BSON object -> Canonical BSON +echo bin2hex((string) MongoDB\BSON\Document::fromJSON($degenerateExtJson)), "\n"; + +?> +===DONE=== + +--EXPECT-- +180000001364000a00000000000000000000000000fe5f00 +180000001364000a00000000000000000000000000fe5f00 +{"d":{"$numberDecimal":"1.0E+6112"}} +{"d":{"$numberDecimal":"1.0E+6112"}} +180000001364000a00000000000000000000000000fe5f00 +180000001364000a00000000000000000000000000fe5f00 +180000001364000a00000000000000000000000000fe5f00 +180000001364000a00000000000000000000000000fe5f00 +===DONE=== \ No newline at end of file