diff --git a/.evergreen/.evg.yml b/.evergreen/.evg.yml index 968db1b3c97..525861928f3 100644 --- a/.evergreen/.evg.yml +++ b/.evergreen/.evg.yml @@ -112,7 +112,7 @@ functions: # If this was a patch build, doing a fresh clone would not actually test the patch cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS else - git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS + git clone --depth 1 https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS fi echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config diff --git a/.evergreen/ssdlc-report.sh b/.evergreen/ssdlc-report.sh index 56d5957f5ab..76b3322b147 100755 --- a/.evergreen/ssdlc-report.sh +++ b/.evergreen/ssdlc-report.sh @@ -71,6 +71,10 @@ printf "\nSpotBugs created the following SARIF reports\n" IFS=$'\n' declare -a SARIF_PATHS=($(find "${RELATIVE_DIR_PATH}/.." -path "*/spotbugs/*.sarif")) unset IFS +if [ ${#SARIF_PATHS[@]} -eq 0 ]; then + printf "\nERROR: No SARIF files found matching pattern */spotbugs/*.sarif\n" + exit 1 +fi for SARIF_PATH in "${SARIF_PATHS[@]}"; do GRADLE_PROJECT_NAME="$(basename "$(dirname "$(dirname "$(dirname "$(dirname "${SARIF_PATH}")")")")")" NEW_SARIF_PATH="${SSDLC_STATIC_ANALYSIS_REPORTS_PATH}/${GRADLE_PROJECT_NAME}_$(basename "${SARIF_PATH}")" diff --git a/.gitmodules b/.gitmodules index a9ac62f04bb..48b90d1ef71 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "specifications"] - path = driver-core/src/test/resources/specifications + path = testing/resources/specifications url = https://github.com/mongodb/specifications diff --git a/bson/build.gradle.kts b/bson/build.gradle.kts index fab3cdaacb5..851d5620cc3 100644 --- a/bson/build.gradle.kts +++ b/bson/build.gradle.kts @@ -25,6 +25,11 @@ plugins { base.archivesName.set("bson") +tasks.processTestResources { + from("${rootProject.projectDir}/testing/resources") + into("${layout.buildDirectory.get()}/resources/test") +} + configureMavenPublication { pom { name.set("BSON") diff --git a/bson/src/main/org/bson/BinaryVector.java b/bson/src/main/org/bson/BinaryVector.java index 273b4a0e5e9..a1914601a9d 100644 --- a/bson/src/main/org/bson/BinaryVector.java +++ b/bson/src/main/org/bson/BinaryVector.java @@ -18,9 +18,8 @@ import org.bson.annotations.Beta; import org.bson.annotations.Reason; - -import static org.bson.assertions.Assertions.isTrueArgument; -import static org.bson.assertions.Assertions.notNull; +import org.bson.diagnostics.Logger; +import org.bson.diagnostics.Loggers; /** * Binary Vectors are densely packed arrays of numbers, all the same type, which are stored and retrieved efficiently using the BSON Binary @@ -33,6 +32,7 @@ * @since 5.3 */ public abstract class BinaryVector { + protected static final Logger LOGGER = Loggers.getLogger("BinaryVector"); private final DataType dataType; BinaryVector(final DataType dataType) { @@ -64,9 +64,6 @@ public abstract class BinaryVector { */ @Beta(Reason.SERVER) public static PackedBitBinaryVector packedBitVector(final byte[] data, final byte padding) { - notNull("data", data); - isTrueArgument("Padding must be between 0 and 7 bits. Provided padding: " + padding, padding >= 0 && padding <= 7); - isTrueArgument("Padding must be 0 if vector is empty. Provided padding: " + padding, padding == 0 || data.length > 0); return new PackedBitBinaryVector(data, padding); } @@ -83,7 +80,6 @@ public static PackedBitBinaryVector packedBitVector(final byte[] data, final byt * @return A {@link Int8BinaryVector} instance with the {@link DataType#INT8} data type. */ public static Int8BinaryVector int8Vector(final byte[] data) { - notNull("data", data); return new Int8BinaryVector(data); } @@ -99,7 +95,6 @@ public static Int8BinaryVector int8Vector(final byte[] data) { * @return A {@link Float32BinaryVector} instance with the {@link DataType#FLOAT32} data type. */ public static Float32BinaryVector floatVector(final float[] data) { - notNull("data", data); return new Float32BinaryVector(data); } diff --git a/bson/src/main/org/bson/Float32BinaryVector.java b/bson/src/main/org/bson/Float32BinaryVector.java index 37d1b8abb6e..89179f6f307 100644 --- a/bson/src/main/org/bson/Float32BinaryVector.java +++ b/bson/src/main/org/bson/Float32BinaryVector.java @@ -18,7 +18,7 @@ import java.util.Arrays; -import static org.bson.assertions.Assertions.assertNotNull; +import static org.bson.assertions.Assertions.notNull; /** * Represents a vector of 32-bit floating-point numbers, where each element in the vector is a float. @@ -35,9 +35,9 @@ public final class Float32BinaryVector extends BinaryVector { private final float[] data; - Float32BinaryVector(final float[] vectorData) { + Float32BinaryVector(final float[] data) { super(DataType.FLOAT32); - this.data = assertNotNull(vectorData); + this.data = notNull("data", data); } /** @@ -49,7 +49,7 @@ public final class Float32BinaryVector extends BinaryVector { * @return the underlying float array representing this {@link Float32BinaryVector} vector. */ public float[] getData() { - return assertNotNull(data); + return data; } @Override diff --git a/bson/src/main/org/bson/Int8BinaryVector.java b/bson/src/main/org/bson/Int8BinaryVector.java index a851aff94ff..14b0803aa1c 100644 --- a/bson/src/main/org/bson/Int8BinaryVector.java +++ b/bson/src/main/org/bson/Int8BinaryVector.java @@ -19,7 +19,7 @@ import java.util.Arrays; import java.util.Objects; -import static org.bson.assertions.Assertions.assertNotNull; +import static org.bson.assertions.Assertions.notNull; /** * Represents a vector of 8-bit signed integers, where each element in the vector is a byte. @@ -38,7 +38,7 @@ public final class Int8BinaryVector extends BinaryVector { Int8BinaryVector(final byte[] data) { super(DataType.INT8); - this.data = assertNotNull(data); + this.data = notNull("data", data); } /** @@ -50,7 +50,7 @@ public final class Int8BinaryVector extends BinaryVector { * @return the underlying byte array representing this {@link Int8BinaryVector} vector. */ public byte[] getData() { - return assertNotNull(data); + return data; } @Override diff --git a/bson/src/main/org/bson/PackedBitBinaryVector.java b/bson/src/main/org/bson/PackedBitBinaryVector.java index 33200650204..a20155c7fb3 100644 --- a/bson/src/main/org/bson/PackedBitBinaryVector.java +++ b/bson/src/main/org/bson/PackedBitBinaryVector.java @@ -23,6 +23,8 @@ import java.util.Objects; import static org.bson.assertions.Assertions.assertNotNull; +import static org.bson.assertions.Assertions.isTrueArgument; +import static org.bson.assertions.Assertions.notNull; /** * Represents a packed bit vector, where each element of the vector is represented by a single bit (0 or 1). @@ -43,8 +45,17 @@ public final class PackedBitBinaryVector extends BinaryVector { PackedBitBinaryVector(final byte[] data, final byte padding) { super(DataType.PACKED_BIT); - this.data = assertNotNull(data); + this.data = notNull("data", data); this.padding = padding; + isTrueArgument("Padding must be between 0 and 7 bits. Provided padding: " + padding, padding >= 0 && padding <= 7); + isTrueArgument("Padding must be 0 if vector is empty. Provided padding: " + padding, padding == 0 || data.length > 0); + if (padding > 0) { + int mask = (1 << padding) - 1; + if ((data[data.length - 1] & mask) != 0) { + // JAVA-5848 in version 6.0.0 will convert this logging into an IllegalArgumentException + LOGGER.warn("The last " + padding + " padded bits should be zero in the final byte."); + } + } } /** diff --git a/bson/src/main/org/bson/json/ExtendedJsonDoubleConverter.java b/bson/src/main/org/bson/json/ExtendedJsonDoubleConverter.java index 1ad0db0ec1b..9f72dfc61d1 100644 --- a/bson/src/main/org/bson/json/ExtendedJsonDoubleConverter.java +++ b/bson/src/main/org/bson/json/ExtendedJsonDoubleConverter.java @@ -21,7 +21,7 @@ class ExtendedJsonDoubleConverter implements Converter { public void convert(final Double value, final StrictJsonWriter writer) { writer.writeStartObject(); writer.writeName("$numberDouble"); - writer.writeString(Double.toString(value)); + writer.writeString(JsonDoubleHelper.toString(value)); writer.writeEndObject(); } diff --git a/bson/src/main/org/bson/json/JsonDoubleConverter.java b/bson/src/main/org/bson/json/JsonDoubleConverter.java index 26b46ab89d5..0ded8de06ba 100644 --- a/bson/src/main/org/bson/json/JsonDoubleConverter.java +++ b/bson/src/main/org/bson/json/JsonDoubleConverter.java @@ -19,6 +19,6 @@ class JsonDoubleConverter implements Converter { @Override public void convert(final Double value, final StrictJsonWriter writer) { - writer.writeNumber(Double.toString(value)); + writer.writeNumber(JsonDoubleHelper.toString(value)); } } diff --git a/bson/src/main/org/bson/json/JsonDoubleHelper.java b/bson/src/main/org/bson/json/JsonDoubleHelper.java new file mode 100644 index 00000000000..ff6976beedd --- /dev/null +++ b/bson/src/main/org/bson/json/JsonDoubleHelper.java @@ -0,0 +1,32 @@ +/* + * Copyright 2008-present MongoDB, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.bson.json; + +import java.util.regex.Pattern; + +final class JsonDoubleHelper { + + private static final Pattern POSITIVE_EXPONENT_PATTERN = Pattern.compile("E(\\d+)"); + private static final String POSITIVE_EXPONENT_REPLACER = "E+$1"; + + static String toString(final double value) { + String doubleString = Double.toString(value); + return POSITIVE_EXPONENT_PATTERN.matcher(doubleString).replaceAll(POSITIVE_EXPONENT_REPLACER); + } + + private JsonDoubleHelper() { + } +} diff --git a/bson/src/main/org/bson/json/RelaxedExtendedJsonDoubleConverter.java b/bson/src/main/org/bson/json/RelaxedExtendedJsonDoubleConverter.java index ac845b2ecd0..43627c555c3 100644 --- a/bson/src/main/org/bson/json/RelaxedExtendedJsonDoubleConverter.java +++ b/bson/src/main/org/bson/json/RelaxedExtendedJsonDoubleConverter.java @@ -24,7 +24,7 @@ public void convert(final Double value, final StrictJsonWriter writer) { if (value.isNaN() || value.isInfinite()) { FALLBACK_CONVERTER.convert(value, writer); } else { - writer.writeNumber(Double.toString(value)); + writer.writeNumber(JsonDoubleHelper.toString(value)); } } } diff --git a/bson/src/test/resources/bson-binary-vector/float32.json b/bson/src/test/resources/bson-binary-vector/float32.json deleted file mode 100644 index e1d142c184b..00000000000 --- a/bson/src/test/resources/bson-binary-vector/float32.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "description": "Tests of Binary subtype 9, Vectors, with dtype FLOAT32", - "test_key": "vector", - "tests": [ - { - "description": "Simple Vector FLOAT32", - "valid": true, - "vector": [127.0, 7.0], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 0, - "canonical_bson": "1C00000005766563746F72000A0000000927000000FE420000E04000" - }, - { - "description": "Vector with decimals and negative value FLOAT32", - "valid": true, - "vector": [127.7, -7.7], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 0, - "canonical_bson": "1C00000005766563746F72000A0000000927006666FF426666F6C000" - }, - { - "description": "Empty Vector FLOAT32", - "valid": true, - "vector": [], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 0, - "canonical_bson": "1400000005766563746F72000200000009270000" - }, - { - "description": "Infinity Vector FLOAT32", - "valid": true, - "vector": ["-inf", 0.0, "inf"], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 0, - "canonical_bson": "2000000005766563746F72000E000000092700000080FF000000000000807F00" - }, - { - "description": "FLOAT32 with padding", - "valid": false, - "vector": [127.0, 7.0], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 3 - } - ] -} \ No newline at end of file diff --git a/bson/src/test/resources/bson-binary-vector/int8.json b/bson/src/test/resources/bson-binary-vector/int8.json deleted file mode 100644 index c10c1b7d4e2..00000000000 --- a/bson/src/test/resources/bson-binary-vector/int8.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "Tests of Binary subtype 9, Vectors, with dtype INT8", - "test_key": "vector", - "tests": [ - { - "description": "Simple Vector INT8", - "valid": true, - "vector": [127, 7], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0, - "canonical_bson": "1600000005766563746F7200040000000903007F0700" - }, - { - "description": "Empty Vector INT8", - "valid": true, - "vector": [], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0, - "canonical_bson": "1400000005766563746F72000200000009030000" - }, - { - "description": "Overflow Vector INT8", - "valid": false, - "vector": [128], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0 - }, - { - "description": "Underflow Vector INT8", - "valid": false, - "vector": [-129], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0 - }, - { - "description": "INT8 with padding", - "valid": false, - "vector": [127, 7], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 3 - }, - { - "description": "INT8 with float inputs", - "valid": false, - "vector": [127.77, 7.77], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0 - } - ] -} \ No newline at end of file diff --git a/bson/src/test/resources/bson-binary-vector/packed_bit.json b/bson/src/test/resources/bson-binary-vector/packed_bit.json deleted file mode 100644 index 69fb3948335..00000000000 --- a/bson/src/test/resources/bson-binary-vector/packed_bit.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "description": "Tests of Binary subtype 9, Vectors, with dtype PACKED_BIT", - "test_key": "vector", - "tests": [ - { - "description": "Padding specified with no vector data PACKED_BIT", - "valid": false, - "vector": [], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 1 - }, - { - "description": "Simple Vector PACKED_BIT", - "valid": true, - "vector": [127, 7], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0, - "canonical_bson": "1600000005766563746F7200040000000910007F0700" - }, - { - "description": "Empty Vector PACKED_BIT", - "valid": true, - "vector": [], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0, - "canonical_bson": "1400000005766563746F72000200000009100000" - }, - { - "description": "PACKED_BIT with padding", - "valid": true, - "vector": [127, 7], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 3, - "canonical_bson": "1600000005766563746F7200040000000910037F0700" - }, - { - "description": "Overflow Vector PACKED_BIT", - "valid": false, - "vector": [256], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0 - }, - { - "description": "Underflow Vector PACKED_BIT", - "valid": false, - "vector": [-1], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0 - }, - { - "description": "Vector with float values PACKED_BIT", - "valid": false, - "vector": [127.5], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0 - }, - { - "description": "Padding specified with no vector data PACKED_BIT", - "valid": false, - "vector": [], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 1 - }, - { - "description": "Exceeding maximum padding PACKED_BIT", - "valid": false, - "vector": [1], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 8 - }, - { - "description": "Negative padding PACKED_BIT", - "valid": false, - "vector": [1], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": -1 - }, - { - "description": "Vector with float values PACKED_BIT", - "valid": false, - "vector": [127.5], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0 - } - ] -} \ No newline at end of file diff --git a/bson/src/test/resources/bson/array.json b/bson/src/test/resources/bson/array.json deleted file mode 100644 index 9ff953e5ae7..00000000000 --- a/bson/src/test/resources/bson/array.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "description": "Array", - "bson_type": "0x04", - "test_key": "a", - "valid": [ - { - "description": "Empty", - "canonical_bson": "0D000000046100050000000000", - "canonical_extjson": "{\"a\" : []}" - }, - { - "description": "Single Element Array", - "canonical_bson": "140000000461000C0000001030000A0000000000", - "canonical_extjson": "{\"a\" : [{\"$numberInt\": \"10\"}]}" - }, - { - "description": "Single Element Array with index set incorrectly to empty string", - "degenerate_bson": "130000000461000B00000010000A0000000000", - "canonical_bson": "140000000461000C0000001030000A0000000000", - "canonical_extjson": "{\"a\" : [{\"$numberInt\": \"10\"}]}" - }, - { - "description": "Single Element Array with index set incorrectly to ab", - "degenerate_bson": "150000000461000D000000106162000A0000000000", - "canonical_bson": "140000000461000C0000001030000A0000000000", - "canonical_extjson": "{\"a\" : [{\"$numberInt\": \"10\"}]}" - }, - { - "description": "Multi Element Array with duplicate indexes", - "degenerate_bson": "1b000000046100130000001030000a000000103000140000000000", - "canonical_bson": "1b000000046100130000001030000a000000103100140000000000", - "canonical_extjson": "{\"a\" : [{\"$numberInt\": \"10\"}, {\"$numberInt\": \"20\"}]}" - } - ], - "decodeErrors": [ - { - "description": "Array length too long: eats outer terminator", - "bson": "140000000461000D0000001030000A0000000000" - }, - { - "description": "Array length too short: leaks terminator", - "bson": "140000000461000B0000001030000A0000000000" - }, - { - "description": "Invalid Array: bad string length in field", - "bson": "1A00000004666F6F00100000000230000500000062617A000000" - } - ] -} diff --git a/bson/src/test/resources/bson/binary.json b/bson/src/test/resources/bson/binary.json deleted file mode 100644 index 0e0056f3a2c..00000000000 --- a/bson/src/test/resources/bson/binary.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "description": "Binary type", - "bson_type": "0x05", - "test_key": "x", - "valid": [ - { - "description": "subtype 0x00 (Zero-length)", - "canonical_bson": "0D000000057800000000000000", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"\", \"subType\" : \"00\"}}}" - }, - { - "description": "subtype 0x00 (Zero-length, keys reversed)", - "canonical_bson": "0D000000057800000000000000", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"\", \"subType\" : \"00\"}}}", - "degenerate_extjson": "{\"x\" : { \"$binary\" : {\"subType\" : \"00\", \"base64\" : \"\"}}}" - }, - { - "description": "subtype 0x00", - "canonical_bson": "0F0000000578000200000000FFFF00", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"00\"}}}" - }, - { - "description": "subtype 0x01", - "canonical_bson": "0F0000000578000200000001FFFF00", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"01\"}}}" - }, - { - "description": "subtype 0x02", - "canonical_bson": "13000000057800060000000202000000FFFF00", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"02\"}}}" - }, - { - "description": "subtype 0x03", - "canonical_bson": "1D000000057800100000000373FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"03\"}}}" - }, - { - "description": "subtype 0x04", - "canonical_bson": "1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"04\"}}}" - }, - { - "description": "subtype 0x04 UUID", - "canonical_bson": "1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"04\"}}}", - "degenerate_extjson": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4\"}}" - }, - { - "description": "subtype 0x05", - "canonical_bson": "1D000000057800100000000573FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"05\"}}}" - }, - { - "description": "subtype 0x07", - "canonical_bson": "1D000000057800100000000773FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"07\"}}}" - }, - { - "description": "subtype 0x08", - "canonical_bson": "1D000000057800100000000873FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"08\"}}}" - }, - { - "description": "subtype 0x80", - "canonical_bson": "0F0000000578000200000080FFFF00", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"80\"}}}" - }, - { - "description": "$type query operator (conflicts with legacy $binary form with $type field)", - "canonical_bson": "1F000000037800170000000224747970650007000000737472696E67000000", - "canonical_extjson": "{\"x\" : { \"$type\" : \"string\"}}" - }, - { - "description": "$type query operator (conflicts with legacy $binary form with $type field)", - "canonical_bson": "180000000378001000000010247479706500020000000000", - "canonical_extjson": "{\"x\" : { \"$type\" : {\"$numberInt\": \"2\"}}}" - }, - { - "description": "subtype 0x09 Vector FLOAT32", - "canonical_bson": "170000000578000A0000000927000000FE420000E04000", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"JwAAAP5CAADgQA==\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector INT8", - "canonical_bson": "11000000057800040000000903007F0700", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"AwB/Bw==\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector PACKED_BIT", - "canonical_bson": "11000000057800040000000910007F0700", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"EAB/Bw==\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector (Zero-length) FLOAT32", - "canonical_bson": "0F0000000578000200000009270000", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"JwA=\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector (Zero-length) INT8", - "canonical_bson": "0F0000000578000200000009030000", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"AwA=\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector (Zero-length) PACKED_BIT", - "canonical_bson": "0F0000000578000200000009100000", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"EAA=\", \"subType\": \"09\"}}}" - } - ], - "decodeErrors": [ - { - "description": "Length longer than document", - "bson": "1D000000057800FF0000000573FFD26444B34C6990E8E7D1DFC035D400" - }, - { - "description": "Negative length", - "bson": "0D000000057800FFFFFFFF0000" - }, - { - "description": "subtype 0x02 length too long ", - "bson": "13000000057800060000000203000000FFFF00" - }, - { - "description": "subtype 0x02 length too short", - "bson": "13000000057800060000000201000000FFFF00" - }, - { - "description": "subtype 0x02 length negative one", - "bson": "130000000578000600000002FFFFFFFFFFFF00" - } - ], - "parseErrors": [ - { - "description": "$uuid wrong type", - "string": "{\"x\" : { \"$uuid\" : { \"data\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4\"}}}" - }, - { - "description": "$uuid invalid value--too short", - "string": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-90e8-e7d1dfc035d4\"}}" - }, - { - "description": "$uuid invalid value--too long", - "string": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4-789e4\"}}" - }, - { - "description": "$uuid invalid value--misplaced hyphens", - "string": "{\"x\" : { \"$uuid\" : \"73ff-d26444b-34c6-990e8e-7d1dfc035d4\"}}" - }, - { - "description": "$uuid invalid value--too many hyphens", - "string": "{\"x\" : { \"$uuid\" : \"----d264-44b3-4--9-90e8-e7d1dfc0----\"}}" - } - ] -} diff --git a/bson/src/test/resources/bson/boolean.json b/bson/src/test/resources/bson/boolean.json deleted file mode 100644 index 84c282299a1..00000000000 --- a/bson/src/test/resources/bson/boolean.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "description": "Boolean", - "bson_type": "0x08", - "test_key": "b", - "valid": [ - { - "description": "True", - "canonical_bson": "090000000862000100", - "canonical_extjson": "{\"b\" : true}" - }, - { - "description": "False", - "canonical_bson": "090000000862000000", - "canonical_extjson": "{\"b\" : false}" - } - ], - "decodeErrors": [ - { - "description": "Invalid boolean value of 2", - "bson": "090000000862000200" - }, - { - "description": "Invalid boolean value of -1", - "bson": "09000000086200FF00" - } - ] -} diff --git a/bson/src/test/resources/bson/code.json b/bson/src/test/resources/bson/code.json deleted file mode 100644 index b8482b2541b..00000000000 --- a/bson/src/test/resources/bson/code.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": "Javascript Code", - "bson_type": "0x0D", - "test_key": "a", - "valid": [ - { - "description": "Empty string", - "canonical_bson": "0D0000000D6100010000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\"}}" - }, - { - "description": "Single character", - "canonical_bson": "0E0000000D610002000000620000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"b\"}}" - }, - { - "description": "Multi-character", - "canonical_bson": "190000000D61000D0000006162616261626162616261620000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"abababababab\"}}" - }, - { - "description": "two-byte UTF-8 (\u00e9)", - "canonical_bson": "190000000D61000D000000C3A9C3A9C3A9C3A9C3A9C3A90000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\\u00e9\\u00e9\\u00e9\\u00e9\\u00e9\\u00e9\"}}" - }, - { - "description": "three-byte UTF-8 (\u2606)", - "canonical_bson": "190000000D61000D000000E29886E29886E29886E298860000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\\u2606\\u2606\\u2606\\u2606\"}}" - }, - { - "description": "Embedded nulls", - "canonical_bson": "190000000D61000D0000006162006261620062616261620000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"ab\\u0000bab\\u0000babab\"}}" - } - ], - "decodeErrors": [ - { - "description": "bad code string length: 0 (but no 0x00 either)", - "bson": "0C0000000D61000000000000" - }, - { - "description": "bad code string length: -1", - "bson": "0C0000000D6100FFFFFFFF00" - }, - { - "description": "bad code string length: eats terminator", - "bson": "100000000D6100050000006200620000" - }, - { - "description": "bad code string length: longer than rest of document", - "bson": "120000000D00FFFFFF00666F6F6261720000" - }, - { - "description": "code string is not null-terminated", - "bson": "100000000D610004000000616263FF00" - }, - { - "description": "empty code string, but extra null", - "bson": "0E0000000D610001000000000000" - }, - { - "description": "invalid UTF-8", - "bson": "0E0000000D610002000000E90000" - } - ] -} diff --git a/bson/src/test/resources/bson/code_w_scope.json b/bson/src/test/resources/bson/code_w_scope.json deleted file mode 100644 index f956bcd54f6..00000000000 --- a/bson/src/test/resources/bson/code_w_scope.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "description": "Javascript Code with Scope", - "bson_type": "0x0F", - "test_key": "a", - "valid": [ - { - "description": "Empty code string, empty scope", - "canonical_bson": "160000000F61000E0000000100000000050000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\", \"$scope\" : {}}}" - }, - { - "description": "Non-empty code string, empty scope", - "canonical_bson": "1A0000000F610012000000050000006162636400050000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"abcd\", \"$scope\" : {}}}" - }, - { - "description": "Empty code string, non-empty scope", - "canonical_bson": "1D0000000F61001500000001000000000C000000107800010000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\", \"$scope\" : {\"x\" : {\"$numberInt\": \"1\"}}}}" - }, - { - "description": "Non-empty code string and non-empty scope", - "canonical_bson": "210000000F6100190000000500000061626364000C000000107800010000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"abcd\", \"$scope\" : {\"x\" : {\"$numberInt\": \"1\"}}}}" - }, - { - "description": "Unicode and embedded null in code string, empty scope", - "canonical_bson": "1A0000000F61001200000005000000C3A9006400050000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\\u00e9\\u0000d\", \"$scope\" : {}}}" - } - ], - "decodeErrors": [ - { - "description": "field length zero", - "bson": "280000000F6100000000000500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "field length negative", - "bson": "280000000F6100FFFFFFFF0500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "field length too short (less than minimum size)", - "bson": "160000000F61000D0000000100000000050000000000" - }, - { - "description": "field length too short (truncates scope)", - "bson": "280000000F61001F0000000500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "field length too long (clips outer doc)", - "bson": "280000000F6100210000000500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "field length too long (longer than outer doc)", - "bson": "280000000F6100FF0000000500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "bad code string: length too short", - "bson": "280000000F6100200000000400000061626364001300000010780001000000107900010000000000" - }, - { - "description": "bad code string: length too long (clips scope)", - "bson": "280000000F6100200000000600000061626364001300000010780001000000107900010000000000" - }, - { - "description": "bad code string: negative length", - "bson": "280000000F610020000000FFFFFFFF61626364001300000010780001000000107900010000000000" - }, - { - "description": "bad code string: length longer than field", - "bson": "280000000F610020000000FF00000061626364001300000010780001000000107900010000000000" - }, - { - "description": "bad scope doc (field has bad string length)", - "bson": "1C0000000F001500000001000000000C000000020000000000000000" - } - ] -} diff --git a/bson/src/test/resources/bson/datetime.json b/bson/src/test/resources/bson/datetime.json deleted file mode 100644 index f857afdc367..00000000000 --- a/bson/src/test/resources/bson/datetime.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "description": "DateTime", - "bson_type": "0x09", - "test_key": "a", - "valid": [ - { - "description": "epoch", - "canonical_bson": "10000000096100000000000000000000", - "relaxed_extjson": "{\"a\" : {\"$date\" : \"1970-01-01T00:00:00Z\"}}", - "canonical_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"0\"}}}" - }, - { - "description": "positive ms", - "canonical_bson": "10000000096100C5D8D6CC3B01000000", - "relaxed_extjson": "{\"a\" : {\"$date\" : \"2012-12-24T12:15:30.501Z\"}}", - "canonical_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"1356351330501\"}}}" - }, - { - "description": "negative", - "canonical_bson": "10000000096100C33CE7B9BDFFFFFF00", - "relaxed_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"-284643869501\"}}}", - "canonical_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"-284643869501\"}}}" - }, - { - "description" : "Y10K", - "canonical_bson" : "1000000009610000DC1FD277E6000000", - "canonical_extjson" : "{\"a\":{\"$date\":{\"$numberLong\":\"253402300800000\"}}}" - }, - { - "description": "leading zero ms", - "canonical_bson": "10000000096100D1D6D6CC3B01000000", - "relaxed_extjson": "{\"a\" : {\"$date\" : \"2012-12-24T12:15:30.001Z\"}}", - "canonical_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"1356351330001\"}}}" - } - ], - "decodeErrors": [ - { - "description": "datetime field truncated", - "bson": "0C0000000961001234567800" - } - ] -} diff --git a/bson/src/test/resources/bson/dbpointer.json b/bson/src/test/resources/bson/dbpointer.json deleted file mode 100644 index 377e556a0ad..00000000000 --- a/bson/src/test/resources/bson/dbpointer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "DBPointer type (deprecated)", - "bson_type": "0x0C", - "deprecated": true, - "test_key": "a", - "valid": [ - { - "description": "DBpointer", - "canonical_bson": "1A0000000C610002000000620056E1FC72E0C917E9C471416100", - "canonical_extjson": "{\"a\": {\"$dbPointer\": {\"$ref\": \"b\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}}", - "converted_bson": "2a00000003610022000000022472656600020000006200072469640056e1fc72e0c917e9c47141610000", - "converted_extjson": "{\"a\": {\"$ref\": \"b\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}" - }, - { - "description": "DBpointer with opposite key order", - "canonical_bson": "1A0000000C610002000000620056E1FC72E0C917E9C471416100", - "canonical_extjson": "{\"a\": {\"$dbPointer\": {\"$ref\": \"b\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}}", - "degenerate_extjson": "{\"a\": {\"$dbPointer\": {\"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}, \"$ref\": \"b\"}}}", - "converted_bson": "2a00000003610022000000022472656600020000006200072469640056e1fc72e0c917e9c47141610000", - "converted_extjson": "{\"a\": {\"$ref\": \"b\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}" - }, - { - "description": "With two-byte UTF-8", - "canonical_bson": "1B0000000C610003000000C3A90056E1FC72E0C917E9C471416100", - "canonical_extjson": "{\"a\": {\"$dbPointer\": {\"$ref\": \"é\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}}", - "converted_bson": "2B0000000361002300000002247265660003000000C3A900072469640056E1FC72E0C917E9C47141610000", - "converted_extjson": "{\"a\": {\"$ref\": \"é\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}" - } - ], - "decodeErrors": [ - { - "description": "String with negative length", - "bson": "1A0000000C6100FFFFFFFF620056E1FC72E0C917E9C471416100" - }, - { - "description": "String with zero length", - "bson": "1A0000000C610000000000620056E1FC72E0C917E9C471416100" - }, - { - "description": "String not null terminated", - "bson": "1A0000000C610002000000626256E1FC72E0C917E9C471416100" - }, - { - "description": "short OID (less than minimum length for field)", - "bson": "160000000C61000300000061620056E1FC72E0C91700" - }, - { - "description": "short OID (greater than minimum, but truncated)", - "bson": "1A0000000C61000300000061620056E1FC72E0C917E9C4716100" - }, - { - "description": "String with bad UTF-8", - "bson": "1A0000000C610002000000E90056E1FC72E0C917E9C471416100" - } - ] -} diff --git a/bson/src/test/resources/bson/dbref.json b/bson/src/test/resources/bson/dbref.json deleted file mode 100644 index 41c0b09d0ea..00000000000 --- a/bson/src/test/resources/bson/dbref.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "description": "Document type (DBRef sub-documents)", - "bson_type": "0x03", - "valid": [ - { - "description": "DBRef", - "canonical_bson": "37000000036462726566002b0000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e0000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}}}" - }, - { - "description": "DBRef with database", - "canonical_bson": "4300000003646272656600370000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e0224646200030000006462000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"$db\": \"db\"}}" - }, - { - "description": "DBRef with database and additional fields", - "canonical_bson": "48000000036462726566003c0000000224726566000b000000636f6c6c656374696f6e0010246964002a00000002246462000300000064620002666f6f0004000000626172000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$numberInt\": \"42\"}, \"$db\": \"db\", \"foo\": \"bar\"}}" - }, - { - "description": "DBRef with additional fields", - "canonical_bson": "4400000003646272656600380000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e02666f6f0004000000626172000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"foo\": \"bar\"}}" - }, - { - "description": "Document with key names similar to those of a DBRef", - "canonical_bson": "3e0000000224726566000c0000006e6f742d612d646272656600072469640058921b3e6e32ab156a22b59e022462616e616e6100050000007065656c0000", - "canonical_extjson": "{\"$ref\": \"not-a-dbref\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"$banana\": \"peel\"}" - }, - { - "description": "DBRef with additional dollar-prefixed and dotted fields", - "canonical_bson": "48000000036462726566003c0000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e10612e62000100000010246300010000000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"a.b\": {\"$numberInt\": \"1\"}, \"$c\": {\"$numberInt\": \"1\"}}}" - }, - { - "description": "Sub-document resembles DBRef but $id is missing", - "canonical_bson": "26000000036462726566001a0000000224726566000b000000636f6c6c656374696f6e000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\"}}" - }, - { - "description": "Sub-document resembles DBRef but $ref is not a string", - "canonical_bson": "2c000000036462726566002000000010247265660001000000072469640058921b3e6e32ab156a22b59e0000", - "canonical_extjson": "{\"dbref\": {\"$ref\": {\"$numberInt\": \"1\"}, \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}}}" - }, - { - "description": "Sub-document resembles DBRef but $db is not a string", - "canonical_bson": "4000000003646272656600340000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e1024646200010000000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"$db\": {\"$numberInt\": \"1\"}}}" - } - ] -} diff --git a/bson/src/test/resources/bson/decimal128-1.json b/bson/src/test/resources/bson/decimal128-1.json deleted file mode 100644 index 8e7fbc93c6f..00000000000 --- a/bson/src/test/resources/bson/decimal128-1.json +++ /dev/null @@ -1,341 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "Special - Canonical NaN", - "canonical_bson": "180000001364000000000000000000000000000000007C00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}" - }, - { - "description": "Special - Negative NaN", - "canonical_bson": "18000000136400000000000000000000000000000000FC00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "lossy": true - }, - { - "description": "Special - Negative NaN", - "canonical_bson": "18000000136400000000000000000000000000000000FC00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-NaN\"}}", - "lossy": true - }, - { - "description": "Special - Canonical SNaN", - "canonical_bson": "180000001364000000000000000000000000000000007E00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "lossy": true - }, - { - "description": "Special - Negative SNaN", - "canonical_bson": "18000000136400000000000000000000000000000000FE00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "lossy": true - }, - { - "description": "Special - NaN with a payload", - "canonical_bson": "180000001364001200000000000000000000000000007E00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "lossy": true - }, - { - "description": "Special - Canonical Positive Infinity", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Special - Canonical Negative Infinity", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Special - Invalid representation treated as 0", - "canonical_bson": "180000001364000000000000000000000000000000106C00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}", - "lossy": true - }, - { - "description": "Special - Invalid representation treated as -0", - "canonical_bson": "18000000136400DCBA9876543210DEADBEEF00000010EC00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}", - "lossy": true - }, - { - "description": "Special - Invalid representation treated as 0E3", - "canonical_bson": "18000000136400FFFFFFFFFFFFFFFFFFFFFFFFFFFF116C00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}", - "lossy": true - }, - { - "description": "Regular - Adjusted Exponent Limit", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CF22F00", - "canonical_extjson": "{\"d\": { \"$numberDecimal\": \"0.000001234567890123456789012345678901234\" }}" - }, - { - "description": "Regular - Smallest", - "canonical_bson": "18000000136400D204000000000000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001234\"}}" - }, - { - "description": "Regular - Smallest with Trailing Zeros", - "canonical_bson": "1800000013640040EF5A07000000000000000000002A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00123400000\"}}" - }, - { - "description": "Regular - 0.1", - "canonical_bson": "1800000013640001000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1\"}}" - }, - { - "description": "Regular - 0.1234567890123456789012345678901234", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CFC2F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1234567890123456789012345678901234\"}}" - }, - { - "description": "Regular - 0", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "Regular - -0", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "Regular - -0.0", - "canonical_bson": "1800000013640000000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}" - }, - { - "description": "Regular - 2", - "canonical_bson": "180000001364000200000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2\"}}" - }, - { - "description": "Regular - 2.000", - "canonical_bson": "18000000136400D0070000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2.000\"}}" - }, - { - "description": "Regular - Largest", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3C403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1234567890123456789012345678901234\"}}" - }, - { - "description": "Scientific - Tiniest", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09ED010000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9.999999999999999999999999999999999E-6143\"}}" - }, - { - "description": "Scientific - Tiny", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "Scientific - Negative Tiny", - "canonical_bson": "180000001364000100000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}" - }, - { - "description": "Scientific - Adjusted Exponent Limit", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CF02F00", - "canonical_extjson": "{\"d\": { \"$numberDecimal\": \"1.234567890123456789012345678901234E-7\" }}" - }, - { - "description": "Scientific - Fractional", - "canonical_bson": "1800000013640064000000000000000000000000002CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00E-8\"}}" - }, - { - "description": "Scientific - 0 with Exponent", - "canonical_bson": "180000001364000000000000000000000000000000205F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6000\"}}" - }, - { - "description": "Scientific - 0 with Negative Exponent", - "canonical_bson": "1800000013640000000000000000000000000000007A2B00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-611\"}}" - }, - { - "description": "Scientific - No Decimal with Signed Exponent", - "canonical_bson": "180000001364000100000000000000000000000000463000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+3\"}}" - }, - { - "description": "Scientific - Trailing Zero", - "canonical_bson": "180000001364001A04000000000000000000000000423000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.050E+4\"}}" - }, - { - "description": "Scientific - With Decimal", - "canonical_bson": "180000001364006900000000000000000000000000423000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.05E+3\"}}" - }, - { - "description": "Scientific - Full", - "canonical_bson": "18000000136400FFFFFFFFFFFFFFFFFFFFFFFFFFFF403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"5192296858534827628530496329220095\"}}" - }, - { - "description": "Scientific - Large", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "Scientific - Largest", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09EDFF5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9.999999999999999999999999999999999E+6144\"}}" - }, - { - "description": "Non-Canonical Parsing - Exponent Normalization", - "canonical_bson": "1800000013640064000000000000000000000000002CB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-100E-10\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00E-8\"}}" - }, - { - "description": "Non-Canonical Parsing - Unsigned Positive Exponent", - "canonical_bson": "180000001364000100000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+3\"}}" - }, - { - "description": "Non-Canonical Parsing - Lowercase Exponent Identifier", - "canonical_bson": "180000001364000100000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+3\"}}" - }, - { - "description": "Non-Canonical Parsing - Long Significand with Exponent", - "canonical_bson": "1800000013640079D9E0F9763ADA429D0200000000583000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12345689012345789012345E+12\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.2345689012345789012345E+34\"}}" - }, - { - "description": "Non-Canonical Parsing - Positive Sign", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3C403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+1234567890123456789012345678901234\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1234567890123456789012345678901234\"}}" - }, - { - "description": "Non-Canonical Parsing - Long Decimal String", - "canonical_bson": "180000001364000100000000000000000000000000722800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \".000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-999\"}}" - }, - { - "description": "Non-Canonical Parsing - nan", - "canonical_bson": "180000001364000000000000000000000000000000007C00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"nan\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}" - }, - { - "description": "Non-Canonical Parsing - nAn", - "canonical_bson": "180000001364000000000000000000000000000000007C00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"nAn\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}" - }, - { - "description": "Non-Canonical Parsing - +infinity", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+infinity\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - infinity", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"infinity\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - infiniTY", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"infiniTY\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - inf", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"inf\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - inF", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"inF\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -infinity", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-infinity\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -infiniTy", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-infiniTy\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -Inf", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -inf", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-inf\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -inF", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-inF\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Rounded Subnormal number", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10E-6177\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "Clamped", - "canonical_bson": "180000001364000a00000000000000000000000000fe5f00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E6112\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6112\"}}" - }, - { - "description": "Exact rounding", - "canonical_bson": "18000000136400000000000a5bc138938d44c64d31cc3700", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+999\"}}" - }, - { - "description": "Clamped zeros with a large positive exponent", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+2147483647\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "Clamped zeros with a large negative exponent", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-2147483647\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "Clamped negative zeros with a large positive exponent", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+2147483647\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "Clamped negative zeros with a large negative exponent", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-2147483647\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - } - ] -} diff --git a/bson/src/test/resources/bson/decimal128-2.json b/bson/src/test/resources/bson/decimal128-2.json deleted file mode 100644 index 316d3b0e618..00000000000 --- a/bson/src/test/resources/bson/decimal128-2.json +++ /dev/null @@ -1,793 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "[decq021] Normality", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3C40B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1234567890123456789012345678901234\"}}" - }, - { - "description": "[decq823] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400010000800000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-2147483649\"}}" - }, - { - "description": "[decq822] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400000000800000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-2147483648\"}}" - }, - { - "description": "[decq821] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FFFFFF7F0000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-2147483647\"}}" - }, - { - "description": "[decq820] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FEFFFF7F0000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-2147483646\"}}" - }, - { - "description": "[decq152] fold-downs (more below)", - "canonical_bson": "18000000136400393000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-12345\"}}" - }, - { - "description": "[decq154] fold-downs (more below)", - "canonical_bson": "18000000136400D20400000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1234\"}}" - }, - { - "description": "[decq006] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-750\"}}" - }, - { - "description": "[decq164] fold-downs (more below)", - "canonical_bson": "1800000013640039300000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-123.45\"}}" - }, - { - "description": "[decq156] fold-downs (more below)", - "canonical_bson": "180000001364007B0000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-123\"}}" - }, - { - "description": "[decq008] derivative canonical plain strings", - "canonical_bson": "18000000136400EE020000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-75.0\"}}" - }, - { - "description": "[decq158] fold-downs (more below)", - "canonical_bson": "180000001364000C0000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-12\"}}" - }, - { - "description": "[decq122] Nmax and similar", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09EDFFDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.999999999999999999999999999999999E+6144\"}}" - }, - { - "description": "[decq002] (mostly derived from the Strawman 4 document and examples)", - "canonical_bson": "18000000136400EE020000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-7.50\"}}" - }, - { - "description": "[decq004] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000042B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-7.50E+3\"}}" - }, - { - "description": "[decq018] derivative canonical plain strings", - "canonical_bson": "18000000136400EE020000000000000000000000002EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-7.50E-7\"}}" - }, - { - "description": "[decq125] Nmax and similar", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CFEDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.234567890123456789012345678901234E+6144\"}}" - }, - { - "description": "[decq131] fold-downs (more below)", - "canonical_bson": "18000000136400000000807F1BCF85B27059C8A43CFEDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.230000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq162] fold-downs (more below)", - "canonical_bson": "180000001364007B000000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.23\"}}" - }, - { - "description": "[decq176] Nmin and below", - "canonical_bson": "18000000136400010000000A5BC138938D44C64D31008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.000000000000000000000000000000001E-6143\"}}" - }, - { - "description": "[decq174] Nmin and below", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.000000000000000000000000000000000E-6143\"}}" - }, - { - "description": "[decq133] fold-downs (more below)", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FEDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq160] fold-downs (more below)", - "canonical_bson": "18000000136400010000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1\"}}" - }, - { - "description": "[decq172] Nmin and below", - "canonical_bson": "180000001364000100000000000000000000000000428000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6143\"}}" - }, - { - "description": "[decq010] derivative canonical plain strings", - "canonical_bson": "18000000136400EE020000000000000000000000003AB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.750\"}}" - }, - { - "description": "[decq012] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000038B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0750\"}}" - }, - { - "description": "[decq014] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000034B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000750\"}}" - }, - { - "description": "[decq016] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000030B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000750\"}}" - }, - { - "description": "[decq404] zeros", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "[decq424] negative zeros", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - }, - { - "description": "[decq407] zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[decq427] negative zeros", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[decq409] zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[decq428] negative zeros", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[decq700] Selected DPD codes", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[decq406] zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[decq426] negative zeros", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[decq410] zeros", - "canonical_bson": "180000001364000000000000000000000000000000463000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}" - }, - { - "description": "[decq431] negative zeros", - "canonical_bson": "18000000136400000000000000000000000000000046B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+3\"}}" - }, - { - "description": "[decq419] clamped zeros...", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "[decq432] negative zeros", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "[decq405] zeros", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "[decq425] negative zeros", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - }, - { - "description": "[decq508] Specials", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "[decq528] Specials", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "[decq541] Specials", - "canonical_bson": "180000001364000000000000000000000000000000007C00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}" - }, - { - "description": "[decq074] Nmin and below", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E-6143\"}}" - }, - { - "description": "[decq602] fold-down full sequence", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq604] fold-down full sequence", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000000E+6143\"}}" - }, - { - "description": "[decq606] fold-down full sequence", - "canonical_bson": "1800000013640000000080264B91C02220BE377E00FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000000000E+6142\"}}" - }, - { - "description": "[decq608] fold-down full sequence", - "canonical_bson": "1800000013640000000040EAED7446D09C2C9F0C00FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000E+6141\"}}" - }, - { - "description": "[decq610] fold-down full sequence", - "canonical_bson": "18000000136400000000A0CA17726DAE0F1E430100FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000E+6140\"}}" - }, - { - "description": "[decq612] fold-down full sequence", - "canonical_bson": "18000000136400000000106102253E5ECE4F200000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000000E+6139\"}}" - }, - { - "description": "[decq614] fold-down full sequence", - "canonical_bson": "18000000136400000000E83C80D09F3C2E3B030000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000E+6138\"}}" - }, - { - "description": "[decq616] fold-down full sequence", - "canonical_bson": "18000000136400000000E4D20CC8DCD2B752000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000E+6137\"}}" - }, - { - "description": "[decq618] fold-down full sequence", - "canonical_bson": "180000001364000000004A48011416954508000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000E+6136\"}}" - }, - { - "description": "[decq620] fold-down full sequence", - "canonical_bson": "18000000136400000000A1EDCCCE1BC2D300000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000E+6135\"}}" - }, - { - "description": "[decq622] fold-down full sequence", - "canonical_bson": "18000000136400000080F64AE1C7022D1500000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000E+6134\"}}" - }, - { - "description": "[decq624] fold-down full sequence", - "canonical_bson": "18000000136400000040B2BAC9E0191E0200000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000E+6133\"}}" - }, - { - "description": "[decq626] fold-down full sequence", - "canonical_bson": "180000001364000000A0DEC5ADC935360000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000E+6132\"}}" - }, - { - "description": "[decq628] fold-down full sequence", - "canonical_bson": "18000000136400000010632D5EC76B050000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000E+6131\"}}" - }, - { - "description": "[decq630] fold-down full sequence", - "canonical_bson": "180000001364000000E8890423C78A000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000E+6130\"}}" - }, - { - "description": "[decq632] fold-down full sequence", - "canonical_bson": "18000000136400000064A7B3B6E00D000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000E+6129\"}}" - }, - { - "description": "[decq634] fold-down full sequence", - "canonical_bson": "1800000013640000008A5D78456301000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000E+6128\"}}" - }, - { - "description": "[decq636] fold-down full sequence", - "canonical_bson": "180000001364000000C16FF2862300000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000E+6127\"}}" - }, - { - "description": "[decq638] fold-down full sequence", - "canonical_bson": "180000001364000080C6A47E8D0300000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000E+6126\"}}" - }, - { - "description": "[decq640] fold-down full sequence", - "canonical_bson": "1800000013640000407A10F35A0000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000E+6125\"}}" - }, - { - "description": "[decq642] fold-down full sequence", - "canonical_bson": "1800000013640000A0724E18090000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000E+6124\"}}" - }, - { - "description": "[decq644] fold-down full sequence", - "canonical_bson": "180000001364000010A5D4E8000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000E+6123\"}}" - }, - { - "description": "[decq646] fold-down full sequence", - "canonical_bson": "1800000013640000E8764817000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000E+6122\"}}" - }, - { - "description": "[decq648] fold-down full sequence", - "canonical_bson": "1800000013640000E40B5402000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000E+6121\"}}" - }, - { - "description": "[decq650] fold-down full sequence", - "canonical_bson": "1800000013640000CA9A3B00000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000E+6120\"}}" - }, - { - "description": "[decq652] fold-down full sequence", - "canonical_bson": "1800000013640000E1F50500000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000E+6119\"}}" - }, - { - "description": "[decq654] fold-down full sequence", - "canonical_bson": "180000001364008096980000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000E+6118\"}}" - }, - { - "description": "[decq656] fold-down full sequence", - "canonical_bson": "1800000013640040420F0000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000E+6117\"}}" - }, - { - "description": "[decq658] fold-down full sequence", - "canonical_bson": "18000000136400A086010000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000E+6116\"}}" - }, - { - "description": "[decq660] fold-down full sequence", - "canonical_bson": "180000001364001027000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000E+6115\"}}" - }, - { - "description": "[decq662] fold-down full sequence", - "canonical_bson": "18000000136400E803000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000E+6114\"}}" - }, - { - "description": "[decq664] fold-down full sequence", - "canonical_bson": "180000001364006400000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+6113\"}}" - }, - { - "description": "[decq666] fold-down full sequence", - "canonical_bson": "180000001364000A00000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6112\"}}" - }, - { - "description": "[decq060] fold-downs (more below)", - "canonical_bson": "180000001364000100000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1\"}}" - }, - { - "description": "[decq670] fold-down full sequence", - "canonical_bson": "180000001364000100000000000000000000000000FC5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6110\"}}" - }, - { - "description": "[decq668] fold-down full sequence", - "canonical_bson": "180000001364000100000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6111\"}}" - }, - { - "description": "[decq072] Nmin and below", - "canonical_bson": "180000001364000100000000000000000000000000420000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6143\"}}" - }, - { - "description": "[decq076] Nmin and below", - "canonical_bson": "18000000136400010000000A5BC138938D44C64D31000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000001E-6143\"}}" - }, - { - "description": "[decq036] fold-downs (more below)", - "canonical_bson": "18000000136400000000807F1BCF85B27059C8A43CFE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.230000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq062] fold-downs (more below)", - "canonical_bson": "180000001364007B000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.23\"}}" - }, - { - "description": "[decq034] Nmax and similar", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CFE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.234567890123456789012345678901234E+6144\"}}" - }, - { - "description": "[decq441] exponent lengths", - "canonical_bson": "180000001364000700000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7\"}}" - }, - { - "description": "[decq449] exponent lengths", - "canonical_bson": "1800000013640007000000000000000000000000001E5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+5999\"}}" - }, - { - "description": "[decq447] exponent lengths", - "canonical_bson": "1800000013640007000000000000000000000000000E3800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+999\"}}" - }, - { - "description": "[decq445] exponent lengths", - "canonical_bson": "180000001364000700000000000000000000000000063100", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+99\"}}" - }, - { - "description": "[decq443] exponent lengths", - "canonical_bson": "180000001364000700000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+9\"}}" - }, - { - "description": "[decq842] VG testcase", - "canonical_bson": "180000001364000000FED83F4E7C9FE4E269E38A5BCD1700", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7.049000000000010795488000000000000E-3097\"}}" - }, - { - "description": "[decq841] VG testcase", - "canonical_bson": "180000001364000000203B9DB5056F000000000000002400", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"8.000000000000000000E-1550\"}}" - }, - { - "description": "[decq840] VG testcase", - "canonical_bson": "180000001364003C17258419D710C42F0000000000002400", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"8.81125000000001349436E-1548\"}}" - }, - { - "description": "[decq701] Selected DPD codes", - "canonical_bson": "180000001364000900000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9\"}}" - }, - { - "description": "[decq032] Nmax and similar", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09EDFF5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9.999999999999999999999999999999999E+6144\"}}" - }, - { - "description": "[decq702] Selected DPD codes", - "canonical_bson": "180000001364000A00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10\"}}" - }, - { - "description": "[decq057] fold-downs (more below)", - "canonical_bson": "180000001364000C00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12\"}}" - }, - { - "description": "[decq703] Selected DPD codes", - "canonical_bson": "180000001364001300000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"19\"}}" - }, - { - "description": "[decq704] Selected DPD codes", - "canonical_bson": "180000001364001400000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"20\"}}" - }, - { - "description": "[decq705] Selected DPD codes", - "canonical_bson": "180000001364001D00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"29\"}}" - }, - { - "description": "[decq706] Selected DPD codes", - "canonical_bson": "180000001364001E00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"30\"}}" - }, - { - "description": "[decq707] Selected DPD codes", - "canonical_bson": "180000001364002700000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"39\"}}" - }, - { - "description": "[decq708] Selected DPD codes", - "canonical_bson": "180000001364002800000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"40\"}}" - }, - { - "description": "[decq709] Selected DPD codes", - "canonical_bson": "180000001364003100000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"49\"}}" - }, - { - "description": "[decq710] Selected DPD codes", - "canonical_bson": "180000001364003200000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"50\"}}" - }, - { - "description": "[decq711] Selected DPD codes", - "canonical_bson": "180000001364003B00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"59\"}}" - }, - { - "description": "[decq712] Selected DPD codes", - "canonical_bson": "180000001364003C00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"60\"}}" - }, - { - "description": "[decq713] Selected DPD codes", - "canonical_bson": "180000001364004500000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"69\"}}" - }, - { - "description": "[decq714] Selected DPD codes", - "canonical_bson": "180000001364004600000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"70\"}}" - }, - { - "description": "[decq715] Selected DPD codes", - "canonical_bson": "180000001364004700000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"71\"}}" - }, - { - "description": "[decq716] Selected DPD codes", - "canonical_bson": "180000001364004800000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"72\"}}" - }, - { - "description": "[decq717] Selected DPD codes", - "canonical_bson": "180000001364004900000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"73\"}}" - }, - { - "description": "[decq718] Selected DPD codes", - "canonical_bson": "180000001364004A00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"74\"}}" - }, - { - "description": "[decq719] Selected DPD codes", - "canonical_bson": "180000001364004B00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"75\"}}" - }, - { - "description": "[decq720] Selected DPD codes", - "canonical_bson": "180000001364004C00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"76\"}}" - }, - { - "description": "[decq721] Selected DPD codes", - "canonical_bson": "180000001364004D00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"77\"}}" - }, - { - "description": "[decq722] Selected DPD codes", - "canonical_bson": "180000001364004E00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"78\"}}" - }, - { - "description": "[decq723] Selected DPD codes", - "canonical_bson": "180000001364004F00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"79\"}}" - }, - { - "description": "[decq056] fold-downs (more below)", - "canonical_bson": "180000001364007B00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123\"}}" - }, - { - "description": "[decq064] fold-downs (more below)", - "canonical_bson": "1800000013640039300000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123.45\"}}" - }, - { - "description": "[decq732] Selected DPD codes", - "canonical_bson": "180000001364000802000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"520\"}}" - }, - { - "description": "[decq733] Selected DPD codes", - "canonical_bson": "180000001364000902000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"521\"}}" - }, - { - "description": "[decq740] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364000903000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"777\"}}" - }, - { - "description": "[decq741] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364000A03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"778\"}}" - }, - { - "description": "[decq742] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364001303000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"787\"}}" - }, - { - "description": "[decq746] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364001F03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"799\"}}" - }, - { - "description": "[decq743] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364006D03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"877\"}}" - }, - { - "description": "[decq753] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "180000001364007803000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"888\"}}" - }, - { - "description": "[decq754] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "180000001364007903000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"889\"}}" - }, - { - "description": "[decq760] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "180000001364008203000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"898\"}}" - }, - { - "description": "[decq764] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "180000001364008303000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"899\"}}" - }, - { - "description": "[decq745] DPD: one of each of the huffman groups", - "canonical_bson": "18000000136400D303000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"979\"}}" - }, - { - "description": "[decq770] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "18000000136400DC03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"988\"}}" - }, - { - "description": "[decq774] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "18000000136400DD03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"989\"}}" - }, - { - "description": "[decq730] Selected DPD codes", - "canonical_bson": "18000000136400E203000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"994\"}}" - }, - { - "description": "[decq731] Selected DPD codes", - "canonical_bson": "18000000136400E303000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"995\"}}" - }, - { - "description": "[decq744] DPD: one of each of the huffman groups", - "canonical_bson": "18000000136400E503000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"997\"}}" - }, - { - "description": "[decq780] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "18000000136400E603000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"998\"}}" - }, - { - "description": "[decq787] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "18000000136400E703000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"999\"}}" - }, - { - "description": "[decq053] fold-downs (more below)", - "canonical_bson": "18000000136400D204000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1234\"}}" - }, - { - "description": "[decq052] fold-downs (more below)", - "canonical_bson": "180000001364003930000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12345\"}}" - }, - { - "description": "[decq792] Miscellaneous (testers' queries, etc.)", - "canonical_bson": "180000001364003075000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"30000\"}}" - }, - { - "description": "[decq793] Miscellaneous (testers' queries, etc.)", - "canonical_bson": "1800000013640090940D0000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"890000\"}}" - }, - { - "description": "[decq824] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FEFFFF7F00000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2147483646\"}}" - }, - { - "description": "[decq825] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FFFFFF7F00000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2147483647\"}}" - }, - { - "description": "[decq826] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "180000001364000000008000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2147483648\"}}" - }, - { - "description": "[decq827] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "180000001364000100008000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2147483649\"}}" - }, - { - "description": "[decq828] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FEFFFFFF00000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4294967294\"}}" - }, - { - "description": "[decq829] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FFFFFFFF00000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4294967295\"}}" - }, - { - "description": "[decq830] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "180000001364000000000001000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4294967296\"}}" - }, - { - "description": "[decq831] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "180000001364000100000001000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4294967297\"}}" - }, - { - "description": "[decq022] Normality", - "canonical_bson": "18000000136400C7711CC7B548F377DC80A131C836403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1111111111111111111111111111111111\"}}" - }, - { - "description": "[decq020] Normality", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3C403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1234567890123456789012345678901234\"}}" - }, - { - "description": "[decq550] Specials", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09ED413000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9999999999999999999999999999999999\"}}" - } - ] -} - diff --git a/bson/src/test/resources/bson/decimal128-3.json b/bson/src/test/resources/bson/decimal128-3.json deleted file mode 100644 index 9b015343ce7..00000000000 --- a/bson/src/test/resources/bson/decimal128-3.json +++ /dev/null @@ -1,1771 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "[basx066] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE0000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-00345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-345678.5432\"}}" - }, - { - "description": "[basx065] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE0000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-345678.5432\"}}" - }, - { - "description": "[basx064] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE0000000000000000000038B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-345678.5432\"}}" - }, - { - "description": "[basx041] strings without E cannot generate E in result", - "canonical_bson": "180000001364004C0000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-76\"}}" - }, - { - "description": "[basx027] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000F270000000000000000000000003AB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.999\"}}" - }, - { - "description": "[basx026] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364009F230000000000000000000000003AB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.119\"}}" - }, - { - "description": "[basx025] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364008F030000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.11\"}}" - }, - { - "description": "[basx024] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364005B000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.1\"}}" - }, - { - "description": "[dqbsr531] negatives (Rounded)", - "canonical_bson": "1800000013640099761CC7B548F377DC80A131C836FEAF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.1111111111111111111111111111123450\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.111111111111111111111111111112345\"}}" - }, - { - "description": "[basx022] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000A000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.0\"}}" - }, - { - "description": "[basx021] conform to rules and exponent will be in permitted range).", - "canonical_bson": "18000000136400010000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1\"}}" - }, - { - "description": "[basx601] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-9\"}}" - }, - { - "description": "[basx622] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002EB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-9\"}}" - }, - { - "description": "[basx602] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-8\"}}" - }, - { - "description": "[basx621] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000030B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-8\"}}" - }, - { - "description": "[basx603] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx620] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000032B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-7\"}}" - }, - { - "description": "[basx604] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx619] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000034B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000\"}}" - }, - { - "description": "[basx605] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx618] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000036B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000\"}}" - }, - { - "description": "[basx680] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"000000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx606] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx617] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000038B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000\"}}" - }, - { - "description": "[basx681] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx686] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+00000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx687] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-00000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[basx019] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-00.00\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[basx607] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000\"}}" - }, - { - "description": "[basx616] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003AB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000\"}}" - }, - { - "description": "[basx682] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx155] Numbers with E", - "canonical_bson": "1800000013640000000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000e+0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000\"}}" - }, - { - "description": "[basx130] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx290] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000\"}}" - }, - { - "description": "[basx131] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx291] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000036B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000\"}}" - }, - { - "description": "[basx132] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx292] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000034B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000\"}}" - }, - { - "description": "[basx133] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx293] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000032B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-7\"}}" - }, - { - "description": "[basx608] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[basx615] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[basx683] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx630] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[basx670] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[basx631] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx671] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000\"}}" - }, - { - "description": "[basx134] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx294] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000\"}}" - }, - { - "description": "[basx632] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx672] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx135] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx295] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000036B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000\"}}" - }, - { - "description": "[basx633] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+1\"}}" - }, - { - "description": "[basx673] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx136] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx674] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx634] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+2\"}}" - }, - { - "description": "[basx137] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx635] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}" - }, - { - "description": "[basx675] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx636] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+4\"}}" - }, - { - "description": "[basx676] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-8\"}}" - }, - { - "description": "[basx637] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+5\"}}" - }, - { - "description": "[basx677] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-9\"}}" - }, - { - "description": "[basx638] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6\"}}" - }, - { - "description": "[basx678] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-10\"}}" - }, - { - "description": "[basx149] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"000E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx639] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+7\"}}" - }, - { - "description": "[basx679] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-11\"}}" - }, - { - "description": "[basx063] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE00000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+00345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.5432\"}}" - }, - { - "description": "[basx018] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640000000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}" - }, - { - "description": "[basx609] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx614] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}" - }, - { - "description": "[basx684] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx640] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx660] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx641] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx661] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[basx296] some more negative zeros [systematic tests below]", - "canonical_bson": "1800000013640000000000000000000000000000003AB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000\"}}" - }, - { - "description": "[basx642] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+1\"}}" - }, - { - "description": "[basx662] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000\"}}" - }, - { - "description": "[basx297] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000\"}}" - }, - { - "description": "[basx643] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+2\"}}" - }, - { - "description": "[basx663] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx644] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}" - }, - { - "description": "[basx664] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx645] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+4\"}}" - }, - { - "description": "[basx665] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx646] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+5\"}}" - }, - { - "description": "[basx666] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx647] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6\"}}" - }, - { - "description": "[basx667] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-8\"}}" - }, - { - "description": "[basx648] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+7\"}}" - }, - { - "description": "[basx668] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-9\"}}" - }, - { - "description": "[basx160] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx161] Numbers with E", - "canonical_bson": "1800000013640000000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00E-9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-9\"}}" - }, - { - "description": "[basx649] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000503000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+8\"}}" - }, - { - "description": "[basx669] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-10\"}}" - }, - { - "description": "[basx062] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE00000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+0345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.5432\"}}" - }, - { - "description": "[basx001] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx017] conform to rules and exponent will be in permitted range).", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[basx611] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx613] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[basx685] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx688] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx689] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[basx650] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx651] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000423000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+1\"}}" - }, - { - "description": "[basx298] some more negative zeros [systematic tests below]", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[basx652] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000443000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+2\"}}" - }, - { - "description": "[basx299] some more negative zeros [systematic tests below]", - "canonical_bson": "1800000013640000000000000000000000000000003AB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000\"}}" - }, - { - "description": "[basx653] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000463000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}" - }, - { - "description": "[basx654] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000483000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+4\"}}" - }, - { - "description": "[basx655] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+5\"}}" - }, - { - "description": "[basx656] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6\"}}" - }, - { - "description": "[basx657] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+7\"}}" - }, - { - "description": "[basx658] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000503000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+8\"}}" - }, - { - "description": "[basx138] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+0E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx139] Numbers with E", - "canonical_bson": "18000000136400000000000000000000000000000052B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+9\"}}" - }, - { - "description": "[basx144] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx154] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx659] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx042] strings without E cannot generate E in result", - "canonical_bson": "18000000136400FC040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+12.76\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.76\"}}" - }, - { - "description": "[basx143] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+1E+009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx061] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE00000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.5432\"}}" - }, - { - "description": "[basx036] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640015CD5B0700000000000000000000203000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000000123456789\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.23456789E-8\"}}" - }, - { - "description": "[basx035] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640015CD5B0700000000000000000000223000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000123456789\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.23456789E-7\"}}" - }, - { - "description": "[basx034] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640015CD5B0700000000000000000000243000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000123456789\"}}" - }, - { - "description": "[basx053] strings without E cannot generate E in result", - "canonical_bson": "180000001364003200000000000000000000000000323000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000050\"}}" - }, - { - "description": "[basx033] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640015CD5B0700000000000000000000263000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000123456789\"}}" - }, - { - "description": "[basx016] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000C000000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.012\"}}" - }, - { - "description": "[basx015] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364007B000000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.123\"}}" - }, - { - "description": "[basx037] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640078DF0D8648700000000000000000223000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.123456789012344\"}}" - }, - { - "description": "[basx038] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640079DF0D8648700000000000000000223000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.123456789012345\"}}" - }, - { - "description": "[basx250] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx257] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx256] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.01265\"}}" - }, - { - "description": "[basx258] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx251] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000103000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-21\"}}" - }, - { - "description": "[basx263] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000603000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+19\"}}" - }, - { - "description": "[basx255] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001265\"}}" - }, - { - "description": "[basx259] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx254] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0001265\"}}" - }, - { - "description": "[basx260] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx253] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00001265\"}}" - }, - { - "description": "[basx261] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx252] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000283000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-9\"}}" - }, - { - "description": "[basx262] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+7\"}}" - }, - { - "description": "[basx159] Numbers with E", - "canonical_bson": "1800000013640049000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.73e-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7.3E-8\"}}" - }, - { - "description": "[basx004] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640064000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00\"}}" - }, - { - "description": "[basx003] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000A000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0\"}}" - }, - { - "description": "[basx002] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000100000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1\"}}" - }, - { - "description": "[basx148] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx153] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx141] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e+09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx146] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx151] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx142] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000F43000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+90\"}}" - }, - { - "description": "[basx147] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000F43000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e+90\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+90\"}}" - }, - { - "description": "[basx152] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000F43000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E90\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+90\"}}" - }, - { - "description": "[basx140] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx150] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx014] conform to rules and exponent will be in permitted range).", - "canonical_bson": "18000000136400D2040000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.234\"}}" - }, - { - "description": "[basx170] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx177] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx176] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx178] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx171] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000123000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-20\"}}" - }, - { - "description": "[basx183] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000623000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+20\"}}" - }, - { - "description": "[basx175] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.01265\"}}" - }, - { - "description": "[basx179] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx174] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001265\"}}" - }, - { - "description": "[basx180] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx173] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0001265\"}}" - }, - { - "description": "[basx181] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000423000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+4\"}}" - }, - { - "description": "[basx172] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000002A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-8\"}}" - }, - { - "description": "[basx182] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000004A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+8\"}}" - }, - { - "description": "[basx157] Numbers with E", - "canonical_bson": "180000001364000400000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4E+9\"}}" - }, - { - "description": "[basx067] examples", - "canonical_bson": "180000001364000500000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"5E-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000005\"}}" - }, - { - "description": "[basx069] examples", - "canonical_bson": "180000001364000500000000000000000000000000323000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"5E-7\"}}" - }, - { - "description": "[basx385] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7\"}}" - }, - { - "description": "[basx365] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000543000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E10\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+10\"}}" - }, - { - "description": "[basx405] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000002C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-10\"}}" - }, - { - "description": "[basx363] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000563000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E11\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+11\"}}" - }, - { - "description": "[basx407] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000002A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-11\"}}" - }, - { - "description": "[basx361] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000583000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E12\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+12\"}}" - }, - { - "description": "[basx409] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000283000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-12\"}}" - }, - { - "description": "[basx411] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000263000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-13\"}}" - }, - { - "description": "[basx383] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+1\"}}" - }, - { - "description": "[basx387] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.7\"}}" - }, - { - "description": "[basx381] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+2\"}}" - }, - { - "description": "[basx389] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.07\"}}" - }, - { - "description": "[basx379] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+3\"}}" - }, - { - "description": "[basx391] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.007\"}}" - }, - { - "description": "[basx377] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+4\"}}" - }, - { - "description": "[basx393] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0007\"}}" - }, - { - "description": "[basx375] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000004A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+5\"}}" - }, - { - "description": "[basx395] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00007\"}}" - }, - { - "description": "[basx373] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+6\"}}" - }, - { - "description": "[basx397] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000007\"}}" - }, - { - "description": "[basx371] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+7\"}}" - }, - { - "description": "[basx399] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000323000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-7\"}}" - }, - { - "description": "[basx369] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000503000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+8\"}}" - }, - { - "description": "[basx401] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000303000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-8\"}}" - }, - { - "description": "[basx367] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+9\"}}" - }, - { - "description": "[basx403] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000002E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-9\"}}" - }, - { - "description": "[basx007] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640064000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.0\"}}" - }, - { - "description": "[basx005] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000A00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10\"}}" - }, - { - "description": "[basx165] Numbers with E", - "canonical_bson": "180000001364000A00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10E+009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+10\"}}" - }, - { - "description": "[basx163] Numbers with E", - "canonical_bson": "180000001364000A00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10E+09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+10\"}}" - }, - { - "description": "[basx325] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10\"}}" - }, - { - "description": "[basx305] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000543000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e10\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+11\"}}" - }, - { - "description": "[basx345] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000002C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-10\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-9\"}}" - }, - { - "description": "[basx303] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000563000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e11\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+12\"}}" - }, - { - "description": "[basx347] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000002A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-11\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-10\"}}" - }, - { - "description": "[basx301] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000583000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e12\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+13\"}}" - }, - { - "description": "[basx349] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000283000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-12\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-11\"}}" - }, - { - "description": "[basx351] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000263000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-13\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-12\"}}" - }, - { - "description": "[basx323] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+2\"}}" - }, - { - "description": "[basx327] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0\"}}" - }, - { - "description": "[basx321] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+3\"}}" - }, - { - "description": "[basx329] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.10\"}}" - }, - { - "description": "[basx319] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+4\"}}" - }, - { - "description": "[basx331] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.010\"}}" - }, - { - "description": "[basx317] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+5\"}}" - }, - { - "description": "[basx333] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0010\"}}" - }, - { - "description": "[basx315] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000004A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6\"}}" - }, - { - "description": "[basx335] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00010\"}}" - }, - { - "description": "[basx313] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+7\"}}" - }, - { - "description": "[basx337] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000010\"}}" - }, - { - "description": "[basx311] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+8\"}}" - }, - { - "description": "[basx339] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000010\"}}" - }, - { - "description": "[basx309] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000503000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+9\"}}" - }, - { - "description": "[basx341] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-7\"}}" - }, - { - "description": "[basx164] Numbers with E", - "canonical_bson": "180000001364000A00000000000000000000000000F43000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e+90\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+91\"}}" - }, - { - "description": "[basx162] Numbers with E", - "canonical_bson": "180000001364000A00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+10\"}}" - }, - { - "description": "[basx307] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+10\"}}" - }, - { - "description": "[basx343] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-8\"}}" - }, - { - "description": "[basx008] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640065000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.1\"}}" - }, - { - "description": "[basx009] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640068000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.4\"}}" - }, - { - "description": "[basx010] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640069000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.5\"}}" - }, - { - "description": "[basx011] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364006A000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.6\"}}" - }, - { - "description": "[basx012] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364006D000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.9\"}}" - }, - { - "description": "[basx013] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364006E000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"11.0\"}}" - }, - { - "description": "[basx040] strings without E cannot generate E in result", - "canonical_bson": "180000001364000C00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12\"}}" - }, - { - "description": "[basx190] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx197] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx196] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx198] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx191] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000143000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-19\"}}" - }, - { - "description": "[basx203] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000643000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+21\"}}" - }, - { - "description": "[basx195] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx199] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx194] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.01265\"}}" - }, - { - "description": "[basx200] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+4\"}}" - }, - { - "description": "[basx193] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001265\"}}" - }, - { - "description": "[basx201] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+5\"}}" - }, - { - "description": "[basx192] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000002C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-7\"}}" - }, - { - "description": "[basx202] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+9\"}}" - }, - { - "description": "[basx044] strings without E cannot generate E in result", - "canonical_bson": "18000000136400FC040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"012.76\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.76\"}}" - }, - { - "description": "[basx042] strings without E cannot generate E in result", - "canonical_bson": "18000000136400FC040000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.76\"}}" - }, - { - "description": "[basx046] strings without E cannot generate E in result", - "canonical_bson": "180000001364001100000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"17.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"17\"}}" - }, - { - "description": "[basx049] strings without E cannot generate E in result", - "canonical_bson": "180000001364002C00000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0044\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"44\"}}" - }, - { - "description": "[basx048] strings without E cannot generate E in result", - "canonical_bson": "180000001364002C00000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"044\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"44\"}}" - }, - { - "description": "[basx158] Numbers with E", - "canonical_bson": "180000001364002C00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"44E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4.4E+10\"}}" - }, - { - "description": "[basx068] examples", - "canonical_bson": "180000001364003200000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"50E-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000050\"}}" - }, - { - "description": "[basx169] Numbers with E", - "canonical_bson": "180000001364006400000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"100e+009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+11\"}}" - }, - { - "description": "[basx167] Numbers with E", - "canonical_bson": "180000001364006400000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"100e+09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+11\"}}" - }, - { - "description": "[basx168] Numbers with E", - "canonical_bson": "180000001364006400000000000000000000000000F43000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"100E+90\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+92\"}}" - }, - { - "description": "[basx166] Numbers with E", - "canonical_bson": "180000001364006400000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"100e+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+11\"}}" - }, - { - "description": "[basx210] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx217] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx216] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx218] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx211] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000163000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-18\"}}" - }, - { - "description": "[basx223] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000663000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+22\"}}" - }, - { - "description": "[basx215] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx219] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+4\"}}" - }, - { - "description": "[basx214] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx220] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+5\"}}" - }, - { - "description": "[basx213] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.01265\"}}" - }, - { - "description": "[basx221] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+6\"}}" - }, - { - "description": "[basx212] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000001265\"}}" - }, - { - "description": "[basx222] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+10\"}}" - }, - { - "description": "[basx006] conform to rules and exponent will be in permitted range).", - "canonical_bson": "18000000136400E803000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1000\"}}" - }, - { - "description": "[basx230] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx237] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx236] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx238] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+4\"}}" - }, - { - "description": "[basx231] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000183000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-17\"}}" - }, - { - "description": "[basx243] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000683000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+23\"}}" - }, - { - "description": "[basx235] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx239] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+5\"}}" - }, - { - "description": "[basx234] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx240] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+6\"}}" - }, - { - "description": "[basx233] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx241] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+7\"}}" - }, - { - "description": "[basx232] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00001265\"}}" - }, - { - "description": "[basx242] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000503000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+11\"}}" - }, - { - "description": "[basx060] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE00000000000000000000383000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.5432\"}}" - }, - { - "description": "[basx059] strings without E cannot generate E in result", - "canonical_bson": "18000000136400F198670C08000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0345678.54321\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.54321\"}}" - }, - { - "description": "[basx058] strings without E cannot generate E in result", - "canonical_bson": "180000001364006AF90B7C50000000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.543210\"}}" - }, - { - "description": "[basx057] strings without E cannot generate E in result", - "canonical_bson": "180000001364006A19562522020000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2345678.543210\"}}" - }, - { - "description": "[basx056] strings without E cannot generate E in result", - "canonical_bson": "180000001364006AB9C8733A0B0000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12345678.543210\"}}" - }, - { - "description": "[basx031] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640040AF0D8648700000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123456789.000000\"}}" - }, - { - "description": "[basx030] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640080910F8648700000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123456789.123456\"}}" - }, - { - "description": "[basx032] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640080910F8648700000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123456789123456\"}}" - } - ] -} diff --git a/bson/src/test/resources/bson/decimal128-4.json b/bson/src/test/resources/bson/decimal128-4.json deleted file mode 100644 index 0957019351f..00000000000 --- a/bson/src/test/resources/bson/decimal128-4.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "[basx023] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640001000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.1\"}}" - }, - - { - "description": "[basx045] strings without E cannot generate E in result", - "canonical_bson": "1800000013640003000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+0.003\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.003\"}}" - }, - { - "description": "[basx610] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \".0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx612] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003EB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-.0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}" - }, - { - "description": "[basx043] strings without E cannot generate E in result", - "canonical_bson": "18000000136400FC040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+12.76\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.76\"}}" - }, - { - "description": "[basx055] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000005\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"5E-8\"}}" - }, - { - "description": "[basx054] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000005\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"5E-7\"}}" - }, - { - "description": "[basx052] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000005\"}}" - }, - { - "description": "[basx051] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00.00005\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00005\"}}" - }, - { - "description": "[basx050] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000383000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0005\"}}" - }, - { - "description": "[basx047] strings without E cannot generate E in result", - "canonical_bson": "1800000013640005000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \".5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.5\"}}" - }, - { - "description": "[dqbsr431] check rounding modes heeded (Rounded)", - "canonical_bson": "1800000013640099761CC7B548F377DC80A131C836FE2F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.1111111111111111111111111111123450\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.111111111111111111111111111112345\"}}" - }, - { - "description": "OK2", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FC2F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \".100000000000000000000000000000000000000000000000000000000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1000000000000000000000000000000000\"}}" - } - ], - "parseErrors": [ - { - "description": "[basx564] Near-specials (Conversion_syntax)", - "string": "Infi" - }, - { - "description": "[basx565] Near-specials (Conversion_syntax)", - "string": "Infin" - }, - { - "description": "[basx566] Near-specials (Conversion_syntax)", - "string": "Infini" - }, - { - "description": "[basx567] Near-specials (Conversion_syntax)", - "string": "Infinit" - }, - { - "description": "[basx568] Near-specials (Conversion_syntax)", - "string": "-Infinit" - }, - { - "description": "[basx590] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": ".Infinity" - }, - { - "description": "[basx562] Near-specials (Conversion_syntax)", - "string": "NaNq" - }, - { - "description": "[basx563] Near-specials (Conversion_syntax)", - "string": "NaNs" - }, - { - "description": "[dqbas939] overflow results at different rounding modes (Overflow & Inexact & Rounded)", - "string": "-7e10000" - }, - { - "description": "[dqbsr534] negatives (Rounded & Inexact)", - "string": "-1.11111111111111111111111111111234650" - }, - { - "description": "[dqbsr535] negatives (Rounded & Inexact)", - "string": "-1.11111111111111111111111111111234551" - }, - { - "description": "[dqbsr533] negatives (Rounded & Inexact)", - "string": "-1.11111111111111111111111111111234550" - }, - { - "description": "[dqbsr532] negatives (Rounded & Inexact)", - "string": "-1.11111111111111111111111111111234549" - }, - { - "description": "[dqbsr432] check rounding modes heeded (Rounded & Inexact)", - "string": "1.11111111111111111111111111111234549" - }, - { - "description": "[dqbsr433] check rounding modes heeded (Rounded & Inexact)", - "string": "1.11111111111111111111111111111234550" - }, - { - "description": "[dqbsr435] check rounding modes heeded (Rounded & Inexact)", - "string": "1.11111111111111111111111111111234551" - }, - { - "description": "[dqbsr434] check rounding modes heeded (Rounded & Inexact)", - "string": "1.11111111111111111111111111111234650" - }, - { - "description": "[dqbas938] overflow results at different rounding modes (Overflow & Inexact & Rounded)", - "string": "7e10000" - }, - { - "description": "Inexact rounding#1", - "string": "100000000000000000000000000000000000000000000000000000000001" - }, - { - "description": "Inexact rounding#2", - "string": "1E-6177" - } - ] -} diff --git a/bson/src/test/resources/bson/decimal128-5.json b/bson/src/test/resources/bson/decimal128-5.json deleted file mode 100644 index e976eae4075..00000000000 --- a/bson/src/test/resources/bson/decimal128-5.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "[decq035] fold-downs (more below) (Clamped)", - "canonical_bson": "18000000136400000000807F1BCF85B27059C8A43CFE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.23E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.230000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq037] fold-downs (more below) (Clamped)", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq077] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.100000000000000000000000000000000E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000000E-6144\"}}" - }, - { - "description": "[decq078] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000000E-6144\"}}" - }, - { - "description": "[decq079] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000A00000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000000000000000000000000000010E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-6175\"}}" - }, - { - "description": "[decq080] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000A00000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-6175\"}}" - }, - { - "description": "[decq081] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000020000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000000000000000000000000000001E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6175\"}}" - }, - { - "description": "[decq082] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000020000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6175\"}}" - }, - { - "description": "[decq083] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000000000000000000000000000001E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "[decq084] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "[decq090] underflows cannot be tested for simple copies, check edge cases (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e-6176\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "[decq100] underflows cannot be tested for simple copies, check edge cases (Subnormal)", - "canonical_bson": "18000000136400FFFFFFFF095BC138938D44C64D31000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"999999999999999999999999999999999e-6176\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9.99999999999999999999999999999999E-6144\"}}" - }, - { - "description": "[decq130] fold-downs (more below) (Clamped)", - "canonical_bson": "18000000136400000000807F1BCF85B27059C8A43CFEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.23E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.230000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq132] fold-downs (more below) (Clamped)", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq177] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.100000000000000000000000000000000E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00000000000000000000000000000000E-6144\"}}" - }, - { - "description": "[decq178] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00000000000000000000000000000000E-6144\"}}" - }, - { - "description": "[decq179] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000A00000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000000000000000000000000000010E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.0E-6175\"}}" - }, - { - "description": "[decq180] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000A00000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.0E-6175\"}}" - }, - { - "description": "[decq181] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000028000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000000000000000000000000000001E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6175\"}}" - }, - { - "description": "[decq182] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000028000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6175\"}}" - }, - { - "description": "[decq183] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000000000000000000000000000001E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}" - }, - { - "description": "[decq184] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}" - }, - { - "description": "[decq190] underflow edge cases (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1e-6176\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}" - }, - { - "description": "[decq200] underflow edge cases (Subnormal)", - "canonical_bson": "18000000136400FFFFFFFF095BC138938D44C64D31008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-999999999999999999999999999999999e-6176\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.99999999999999999999999999999999E-6144\"}}" - }, - { - "description": "[decq400] zeros (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-8000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "[decq401] zeros (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6177\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "[decq414] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6112\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "[decq416] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "[decq418] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+8000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "[decq420] negative zeros (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-8000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - }, - { - "description": "[decq421] negative zeros (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6177\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - }, - { - "description": "[decq434] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6112\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "[decq436] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "[decq438] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+8000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "[decq601] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq603] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000000E+6143\"}}" - }, - { - "description": "[decq605] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000000080264B91C02220BE377E00FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6142\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000000000E+6142\"}}" - }, - { - "description": "[decq607] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000000040EAED7446D09C2C9F0C00FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6141\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000E+6141\"}}" - }, - { - "description": "[decq609] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000A0CA17726DAE0F1E430100FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6140\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000E+6140\"}}" - }, - { - "description": "[decq611] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000106102253E5ECE4F200000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6139\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000000E+6139\"}}" - }, - { - "description": "[decq613] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000E83C80D09F3C2E3B030000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6138\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000E+6138\"}}" - }, - { - "description": "[decq615] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000E4D20CC8DCD2B752000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6137\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000E+6137\"}}" - }, - { - "description": "[decq617] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000004A48011416954508000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6136\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000E+6136\"}}" - }, - { - "description": "[decq619] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000A1EDCCCE1BC2D300000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6135\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000E+6135\"}}" - }, - { - "description": "[decq621] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000080F64AE1C7022D1500000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6134\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000E+6134\"}}" - }, - { - "description": "[decq623] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000040B2BAC9E0191E0200000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6133\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000E+6133\"}}" - }, - { - "description": "[decq625] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000A0DEC5ADC935360000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6132\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000E+6132\"}}" - }, - { - "description": "[decq627] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000010632D5EC76B050000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6131\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000E+6131\"}}" - }, - { - "description": "[decq629] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000E8890423C78A000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6130\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000E+6130\"}}" - }, - { - "description": "[decq631] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000064A7B3B6E00D000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6129\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000E+6129\"}}" - }, - { - "description": "[decq633] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000008A5D78456301000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6128\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000E+6128\"}}" - }, - { - "description": "[decq635] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000C16FF2862300000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6127\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000E+6127\"}}" - }, - { - "description": "[decq637] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000080C6A47E8D0300000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6126\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000E+6126\"}}" - }, - { - "description": "[decq639] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000407A10F35A0000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6125\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000E+6125\"}}" - }, - { - "description": "[decq641] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000A0724E18090000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6124\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000E+6124\"}}" - }, - { - "description": "[decq643] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000010A5D4E8000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6123\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000E+6123\"}}" - }, - { - "description": "[decq645] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000E8764817000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6122\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000E+6122\"}}" - }, - { - "description": "[decq647] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000E40B5402000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6121\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000E+6121\"}}" - }, - { - "description": "[decq649] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000CA9A3B00000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6120\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000E+6120\"}}" - }, - { - "description": "[decq651] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000E1F50500000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6119\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000E+6119\"}}" - }, - { - "description": "[decq653] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364008096980000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6118\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000E+6118\"}}" - }, - { - "description": "[decq655] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640040420F0000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6117\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000E+6117\"}}" - }, - { - "description": "[decq657] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400A086010000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6116\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000E+6116\"}}" - }, - { - "description": "[decq659] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364001027000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6115\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000E+6115\"}}" - }, - { - "description": "[decq661] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400E803000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6114\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000E+6114\"}}" - }, - { - "description": "[decq663] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364006400000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6113\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+6113\"}}" - }, - { - "description": "[decq665] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000A00000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6112\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6112\"}}" - } - ] -} - diff --git a/bson/src/test/resources/bson/decimal128-6.json b/bson/src/test/resources/bson/decimal128-6.json deleted file mode 100644 index eba6764e853..00000000000 --- a/bson/src/test/resources/bson/decimal128-6.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "parseErrors": [ - { - "description": "Incomplete Exponent", - "string": "1e" - }, - { - "description": "Exponent at the beginning", - "string": "E01" - }, - { - "description": "Just a decimal place", - "string": "." - }, - { - "description": "2 decimal places", - "string": "..3" - }, - { - "description": "2 decimal places", - "string": ".13.3" - }, - { - "description": "2 decimal places", - "string": "1..3" - }, - { - "description": "2 decimal places", - "string": "1.3.4" - }, - { - "description": "2 decimal places", - "string": "1.34." - }, - { - "description": "Decimal with no digits", - "string": ".e" - }, - { - "description": "2 signs", - "string": "+-32.4" - }, - { - "description": "2 signs", - "string": "-+32.4" - }, - { - "description": "2 negative signs", - "string": "--32.4" - }, - { - "description": "2 negative signs", - "string": "-32.-4" - }, - { - "description": "End in negative sign", - "string": "32.0-" - }, - { - "description": "2 negative signs", - "string": "32.4E--21" - }, - { - "description": "2 negative signs", - "string": "32.4E-2-1" - }, - { - "description": "2 signs", - "string": "32.4E+-21" - }, - { - "description": "Empty string", - "string": "" - }, - { - "description": "leading white space positive number", - "string": " 1" - }, - { - "description": "leading white space negative number", - "string": " -1" - }, - { - "description": "trailing white space", - "string": "1 " - }, - { - "description": "Invalid", - "string": "E" - }, - { - "description": "Invalid", - "string": "invalid" - }, - { - "description": "Invalid", - "string": "i" - }, - { - "description": "Invalid", - "string": "in" - }, - { - "description": "Invalid", - "string": "-in" - }, - { - "description": "Invalid", - "string": "Na" - }, - { - "description": "Invalid", - "string": "-Na" - }, - { - "description": "Invalid", - "string": "1.23abc" - }, - { - "description": "Invalid", - "string": "1.23abcE+02" - }, - { - "description": "Invalid", - "string": "1.23E+0aabs2" - } - ] -} diff --git a/bson/src/test/resources/bson/decimal128-7.json b/bson/src/test/resources/bson/decimal128-7.json deleted file mode 100644 index 0b78f1237b8..00000000000 --- a/bson/src/test/resources/bson/decimal128-7.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "parseErrors": [ - { - "description": "[basx572] Near-specials (Conversion_syntax)", - "string": "-9Inf" - }, - { - "description": "[basx516] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "-1-" - }, - { - "description": "[basx533] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "0000.." - }, - { - "description": "[basx534] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": ".0000." - }, - { - "description": "[basx535] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "00..00" - }, - { - "description": "[basx569] Near-specials (Conversion_syntax)", - "string": "0Inf" - }, - { - "description": "[basx571] Near-specials (Conversion_syntax)", - "string": "-0Inf" - }, - { - "description": "[basx575] Near-specials (Conversion_syntax)", - "string": "0sNaN" - }, - { - "description": "[basx503] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "++1" - }, - { - "description": "[basx504] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "--1" - }, - { - "description": "[basx505] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "-+1" - }, - { - "description": "[basx506] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "+-1" - }, - { - "description": "[basx510] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": " +1" - }, - { - "description": "[basx513] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": " + 1" - }, - { - "description": "[basx514] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": " - 1" - }, - { - "description": "[basx501] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "." - }, - { - "description": "[basx502] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": ".." - }, - { - "description": "[basx519] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "" - }, - { - "description": "[basx525] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "e100" - }, - { - "description": "[basx549] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "e+1" - }, - { - "description": "[basx577] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": ".e+1" - }, - { - "description": "[basx578] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "+.e+1" - }, - { - "description": "[basx581] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "E+1" - }, - { - "description": "[basx582] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": ".E+1" - }, - { - "description": "[basx583] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "+.E+1" - }, - { - "description": "[basx579] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.e+" - }, - { - "description": "[basx580] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.e" - }, - { - "description": "[basx584] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.E+" - }, - { - "description": "[basx585] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.E" - }, - { - "description": "[basx589] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "+.Inf" - }, - { - "description": "[basx586] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": ".NaN" - }, - { - "description": "[basx587] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.NaN" - }, - { - "description": "[basx545] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "ONE" - }, - { - "description": "[basx561] Near-specials (Conversion_syntax)", - "string": "qNaN" - }, - { - "description": "[basx573] Near-specials (Conversion_syntax)", - "string": "-sNa" - }, - { - "description": "[basx588] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "+.sNaN" - }, - { - "description": "[basx544] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "ten" - }, - { - "description": "[basx527] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "u0b65" - }, - { - "description": "[basx526] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "u0e5a" - }, - { - "description": "[basx515] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "x" - }, - { - "description": "[basx574] Near-specials (Conversion_syntax)", - "string": "xNaN" - }, - { - "description": "[basx530] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": ".123.5" - }, - { - "description": "[basx500] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1..2" - }, - { - "description": "[basx542] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e1.0" - }, - { - "description": "[basx553] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E+1.2.3" - }, - { - "description": "[basx543] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e123e" - }, - { - "description": "[basx552] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E+1.2" - }, - { - "description": "[basx546] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e.1" - }, - { - "description": "[basx547] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e1." - }, - { - "description": "[basx554] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E++1" - }, - { - "description": "[basx555] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E--1" - }, - { - "description": "[basx556] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E+-1" - }, - { - "description": "[basx557] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E-+1" - }, - { - "description": "[basx558] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E'1" - }, - { - "description": "[basx559] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E\"1" - }, - { - "description": "[basx520] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e-" - }, - { - "description": "[basx560] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E" - }, - { - "description": "[basx548] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1ee" - }, - { - "description": "[basx551] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1.2.1" - }, - { - "description": "[basx550] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1.23.4" - }, - { - "description": "[basx529] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1.34.5" - }, - { - "description": "[basx531] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "01.35." - }, - { - "description": "[basx532] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "01.35-" - }, - { - "description": "[basx518] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "3+" - }, - { - "description": "[basx521] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "7e99999a" - }, - { - "description": "[basx570] Near-specials (Conversion_syntax)", - "string": "9Inf" - }, - { - "description": "[basx512] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12 " - }, - { - "description": "[basx517] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12-" - }, - { - "description": "[basx507] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12e" - }, - { - "description": "[basx508] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12e++" - }, - { - "description": "[basx509] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12f4" - }, - { - "description": "[basx536] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e*123" - }, - { - "description": "[basx537] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e123-" - }, - { - "description": "[basx540] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e1*23" - }, - { - "description": "[basx538] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e+12+" - }, - { - "description": "[basx539] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e1-3-" - }, - { - "description": "[basx541] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111E1e+3" - }, - { - "description": "[basx528] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "123,65" - }, - { - "description": "[basx523] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "7e12356789012x" - }, - { - "description": "[basx522] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "7e123567890x" - } - ] -} diff --git a/bson/src/test/resources/bson/document.json b/bson/src/test/resources/bson/document.json deleted file mode 100644 index 698e7ae90af..00000000000 --- a/bson/src/test/resources/bson/document.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "description": "Document type (sub-documents)", - "bson_type": "0x03", - "test_key": "x", - "valid": [ - { - "description": "Empty subdoc", - "canonical_bson": "0D000000037800050000000000", - "canonical_extjson": "{\"x\" : {}}" - }, - { - "description": "Empty-string key subdoc", - "canonical_bson": "150000000378000D00000002000200000062000000", - "canonical_extjson": "{\"x\" : {\"\" : \"b\"}}" - }, - { - "description": "Single-character key subdoc", - "canonical_bson": "160000000378000E0000000261000200000062000000", - "canonical_extjson": "{\"x\" : {\"a\" : \"b\"}}" - }, - { - "description": "Dollar-prefixed key in sub-document", - "canonical_bson": "170000000378000F000000022461000200000062000000", - "canonical_extjson": "{\"x\" : {\"$a\" : \"b\"}}" - }, - { - "description": "Dollar as key in sub-document", - "canonical_bson": "160000000378000E0000000224000200000061000000", - "canonical_extjson": "{\"x\" : {\"$\" : \"a\"}}" - }, - { - "description": "Dotted key in sub-document", - "canonical_bson": "180000000378001000000002612E62000200000063000000", - "canonical_extjson": "{\"x\" : {\"a.b\" : \"c\"}}" - }, - { - "description": "Dot as key in sub-document", - "canonical_bson": "160000000378000E000000022E000200000061000000", - "canonical_extjson": "{\"x\" : {\".\" : \"a\"}}" - } - ], - "decodeErrors": [ - { - "description": "Subdocument length too long: eats outer terminator", - "bson": "1800000003666F6F000F0000001062617200FFFFFF7F0000" - }, - { - "description": "Subdocument length too short: leaks terminator", - "bson": "1500000003666F6F000A0000000862617200010000" - }, - { - "description": "Invalid subdocument: bad string length in field", - "bson": "1C00000003666F6F001200000002626172000500000062617A000000" - }, - { - "description": "Null byte in sub-document key", - "bson": "150000000378000D00000010610000010000000000" - } - ] -} diff --git a/bson/src/test/resources/bson/double.json b/bson/src/test/resources/bson/double.json deleted file mode 100644 index 7a3bad158b3..00000000000 --- a/bson/src/test/resources/bson/double.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "description": "Double type", - "bson_type": "0x01", - "test_key": "d", - "valid": [ - { - "description": "+1.0", - "canonical_bson": "10000000016400000000000000F03F00", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.0\"}}", - "relaxed_extjson": "{\"d\" : 1.0}" - }, - { - "description": "-1.0", - "canonical_bson": "10000000016400000000000000F0BF00", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.0\"}}", - "relaxed_extjson": "{\"d\" : -1.0}" - }, - { - "description": "+1.0001220703125", - "canonical_bson": "10000000016400000000008000F03F00", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.0001220703125\"}}", - "relaxed_extjson": "{\"d\" : 1.0001220703125}" - }, - { - "description": "-1.0001220703125", - "canonical_bson": "10000000016400000000008000F0BF00", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.0001220703125\"}}", - "relaxed_extjson": "{\"d\" : -1.0001220703125}" - }, - { - "description": "1.2345678921232E18", - "canonical_bson": "100000000164002a1bf5f41022b14300", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.2345678921232E18\"}}", - "relaxed_extjson": "{\"d\" : 1.2345678921232E18}" - }, - { - "description": "-1.2345678921232E18", - "canonical_bson": "100000000164002a1bf5f41022b1c300", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.2345678921232E18\"}}", - "relaxed_extjson": "{\"d\" : -1.2345678921232E18}" - }, - { - "description": "0.0", - "canonical_bson": "10000000016400000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"0.0\"}}", - "relaxed_extjson": "{\"d\" : 0.0}" - }, - { - "description": "-0.0", - "canonical_bson": "10000000016400000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-0.0\"}}", - "relaxed_extjson": "{\"d\" : -0.0}" - }, - { - "description": "NaN", - "canonical_bson": "10000000016400000000000000F87F00", - "canonical_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", - "relaxed_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", - "lossy": true - }, - { - "description": "NaN with payload", - "canonical_bson": "10000000016400120000000000F87F00", - "canonical_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", - "relaxed_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", - "lossy": true - }, - { - "description": "Inf", - "canonical_bson": "10000000016400000000000000F07F00", - "canonical_extjson": "{\"d\": {\"$numberDouble\": \"Infinity\"}}", - "relaxed_extjson": "{\"d\": {\"$numberDouble\": \"Infinity\"}}" - }, - { - "description": "-Inf", - "canonical_bson": "10000000016400000000000000F0FF00", - "canonical_extjson": "{\"d\": {\"$numberDouble\": \"-Infinity\"}}", - "relaxed_extjson": "{\"d\": {\"$numberDouble\": \"-Infinity\"}}" - } - ], - "decodeErrors": [ - { - "description": "double truncated", - "bson": "0B0000000164000000F03F00" - } - ] -} diff --git a/bson/src/test/resources/bson/int32.json b/bson/src/test/resources/bson/int32.json deleted file mode 100644 index 1353fc3df8b..00000000000 --- a/bson/src/test/resources/bson/int32.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "description": "Int32 type", - "bson_type": "0x10", - "test_key": "i", - "valid": [ - { - "description": "MinValue", - "canonical_bson": "0C0000001069000000008000", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"-2147483648\"}}", - "relaxed_extjson": "{\"i\" : -2147483648}" - }, - { - "description": "MaxValue", - "canonical_bson": "0C000000106900FFFFFF7F00", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"2147483647\"}}", - "relaxed_extjson": "{\"i\" : 2147483647}" - }, - { - "description": "-1", - "canonical_bson": "0C000000106900FFFFFFFF00", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"-1\"}}", - "relaxed_extjson": "{\"i\" : -1}" - }, - { - "description": "0", - "canonical_bson": "0C0000001069000000000000", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"0\"}}", - "relaxed_extjson": "{\"i\" : 0}" - }, - { - "description": "1", - "canonical_bson": "0C0000001069000100000000", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"1\"}}", - "relaxed_extjson": "{\"i\" : 1}" - } - ], - "decodeErrors": [ - { - "description": "Bad int32 field length", - "bson": "090000001061000500" - } - ] -} diff --git a/bson/src/test/resources/bson/int64.json b/bson/src/test/resources/bson/int64.json deleted file mode 100644 index 91f4abff950..00000000000 --- a/bson/src/test/resources/bson/int64.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "description": "Int64 type", - "bson_type": "0x12", - "test_key": "a", - "valid": [ - { - "description": "MinValue", - "canonical_bson": "10000000126100000000000000008000", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"-9223372036854775808\"}}", - "relaxed_extjson": "{\"a\" : -9223372036854775808}" - }, - { - "description": "MaxValue", - "canonical_bson": "10000000126100FFFFFFFFFFFFFF7F00", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"9223372036854775807\"}}", - "relaxed_extjson": "{\"a\" : 9223372036854775807}" - }, - { - "description": "-1", - "canonical_bson": "10000000126100FFFFFFFFFFFFFFFF00", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"-1\"}}", - "relaxed_extjson": "{\"a\" : -1}" - }, - { - "description": "0", - "canonical_bson": "10000000126100000000000000000000", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"0\"}}", - "relaxed_extjson": "{\"a\" : 0}" - }, - { - "description": "1", - "canonical_bson": "10000000126100010000000000000000", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"1\"}}", - "relaxed_extjson": "{\"a\" : 1}" - } - ], - "decodeErrors": [ - { - "description": "int64 field truncated", - "bson": "0C0000001261001234567800" - } - ] -} diff --git a/bson/src/test/resources/bson/maxkey.json b/bson/src/test/resources/bson/maxkey.json deleted file mode 100644 index 67cad6db57b..00000000000 --- a/bson/src/test/resources/bson/maxkey.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "Maxkey type", - "bson_type": "0x7F", - "test_key": "a", - "valid": [ - { - "description": "Maxkey", - "canonical_bson": "080000007F610000", - "canonical_extjson": "{\"a\" : {\"$maxKey\" : 1}}" - } - ] -} diff --git a/bson/src/test/resources/bson/minkey.json b/bson/src/test/resources/bson/minkey.json deleted file mode 100644 index 8adee4509a5..00000000000 --- a/bson/src/test/resources/bson/minkey.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "Minkey type", - "bson_type": "0xFF", - "test_key": "a", - "valid": [ - { - "description": "Minkey", - "canonical_bson": "08000000FF610000", - "canonical_extjson": "{\"a\" : {\"$minKey\" : 1}}" - } - ] -} diff --git a/bson/src/test/resources/bson/multi-type-deprecated.json b/bson/src/test/resources/bson/multi-type-deprecated.json deleted file mode 100644 index 665f388cd41..00000000000 --- a/bson/src/test/resources/bson/multi-type-deprecated.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "Multiple types within the same document", - "bson_type": "0x00", - "deprecated": true, - "valid": [ - { - "description": "All BSON types", - "canonical_bson": "38020000075F69640057E193D7A9CC81B4027498B50E53796D626F6C000700000073796D626F6C0002537472696E670007000000737472696E670010496E743332002A00000012496E743634002A0000000000000001446F75626C6500000000000000F0BF0542696E617279001000000003A34C38F7C3ABEDC8A37814A992AB8DB60542696E61727955736572446566696E656400050000008001020304050D436F6465000E00000066756E6374696F6E2829207B7D000F436F64655769746853636F7065001B0000000E00000066756E6374696F6E2829207B7D00050000000003537562646F63756D656E74001200000002666F6F0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696D657374616D7000010000002A0000000B5265676578007061747465726E0000094461746574696D6545706F6368000000000000000000094461746574696D65506F73697469766500FFFFFF7F00000000094461746574696D654E656761746976650000000080FFFFFFFF085472756500010846616C736500000C4442506F696E746572000B000000636F6C6C656374696F6E0057E193D7A9CC81B4027498B1034442526566003D0000000224726566000B000000636F6C6C656374696F6E00072469640057FD71E96E32AB4225B723FB02246462000900000064617461626173650000FF4D696E6B6579007F4D61786B6579000A4E756C6C0006556E646566696E65640000", - "converted_bson": "48020000075f69640057e193d7a9cc81b4027498b50253796d626f6c000700000073796d626f6c0002537472696e670007000000737472696e670010496e743332002a00000012496e743634002a0000000000000001446f75626c6500000000000000f0bf0542696e617279001000000003a34c38f7c3abedc8a37814a992ab8db60542696e61727955736572446566696e656400050000008001020304050d436f6465000e00000066756e6374696f6e2829207b7d000f436f64655769746853636f7065001b0000000e00000066756e6374696f6e2829207b7d00050000000003537562646f63756d656e74001200000002666f6f0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696d657374616d7000010000002a0000000b5265676578007061747465726e0000094461746574696d6545706f6368000000000000000000094461746574696d65506f73697469766500ffffff7f00000000094461746574696d654e656761746976650000000080ffffffff085472756500010846616c73650000034442506f696e746572002b0000000224726566000b000000636f6c6c656374696f6e00072469640057e193d7a9cc81b4027498b100034442526566003d0000000224726566000b000000636f6c6c656374696f6e00072469640057fd71e96e32ab4225b723fb02246462000900000064617461626173650000ff4d696e6b6579007f4d61786b6579000a4e756c6c000a556e646566696e65640000", - "canonical_extjson": "{\"_id\": {\"$oid\": \"57e193d7a9cc81b4027498b5\"}, \"Symbol\": {\"$symbol\": \"symbol\"}, \"String\": \"string\", \"Int32\": {\"$numberInt\": \"42\"}, \"Int64\": {\"$numberLong\": \"42\"}, \"Double\": {\"$numberDouble\": \"-1.0\"}, \"Binary\": { \"$binary\" : {\"base64\": \"o0w498Or7cijeBSpkquNtg==\", \"subType\": \"03\"}}, \"BinaryUserDefined\": { \"$binary\" : {\"base64\": \"AQIDBAU=\", \"subType\": \"80\"}}, \"Code\": {\"$code\": \"function() {}\"}, \"CodeWithScope\": {\"$code\": \"function() {}\", \"$scope\": {}}, \"Subdocument\": {\"foo\": \"bar\"}, \"Array\": [{\"$numberInt\": \"1\"}, {\"$numberInt\": \"2\"}, {\"$numberInt\": \"3\"}, {\"$numberInt\": \"4\"}, {\"$numberInt\": \"5\"}], \"Timestamp\": {\"$timestamp\": {\"t\": 42, \"i\": 1}}, \"Regex\": {\"$regularExpression\": {\"pattern\": \"pattern\", \"options\": \"\"}}, \"DatetimeEpoch\": {\"$date\": {\"$numberLong\": \"0\"}}, \"DatetimePositive\": {\"$date\": {\"$numberLong\": \"2147483647\"}}, \"DatetimeNegative\": {\"$date\": {\"$numberLong\": \"-2147483648\"}}, \"True\": true, \"False\": false, \"DBPointer\": {\"$dbPointer\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57e193d7a9cc81b4027498b1\"}}}, \"DBRef\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57fd71e96e32ab4225b723fb\"}, \"$db\": \"database\"}, \"Minkey\": {\"$minKey\": 1}, \"Maxkey\": {\"$maxKey\": 1}, \"Null\": null, \"Undefined\": {\"$undefined\": true}}", - "converted_extjson": "{\"_id\": {\"$oid\": \"57e193d7a9cc81b4027498b5\"}, \"Symbol\": \"symbol\", \"String\": \"string\", \"Int32\": {\"$numberInt\": \"42\"}, \"Int64\": {\"$numberLong\": \"42\"}, \"Double\": {\"$numberDouble\": \"-1.0\"}, \"Binary\": { \"$binary\" : {\"base64\": \"o0w498Or7cijeBSpkquNtg==\", \"subType\": \"03\"}}, \"BinaryUserDefined\": { \"$binary\" : {\"base64\": \"AQIDBAU=\", \"subType\": \"80\"}}, \"Code\": {\"$code\": \"function() {}\"}, \"CodeWithScope\": {\"$code\": \"function() {}\", \"$scope\": {}}, \"Subdocument\": {\"foo\": \"bar\"}, \"Array\": [{\"$numberInt\": \"1\"}, {\"$numberInt\": \"2\"}, {\"$numberInt\": \"3\"}, {\"$numberInt\": \"4\"}, {\"$numberInt\": \"5\"}], \"Timestamp\": {\"$timestamp\": {\"t\": 42, \"i\": 1}}, \"Regex\": {\"$regularExpression\": {\"pattern\": \"pattern\", \"options\": \"\"}}, \"DatetimeEpoch\": {\"$date\": {\"$numberLong\": \"0\"}}, \"DatetimePositive\": {\"$date\": {\"$numberLong\": \"2147483647\"}}, \"DatetimeNegative\": {\"$date\": {\"$numberLong\": \"-2147483648\"}}, \"True\": true, \"False\": false, \"DBPointer\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57e193d7a9cc81b4027498b1\"}}, \"DBRef\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57fd71e96e32ab4225b723fb\"}, \"$db\": \"database\"}, \"Minkey\": {\"$minKey\": 1}, \"Maxkey\": {\"$maxKey\": 1}, \"Null\": null, \"Undefined\": null}" - } - ] -} - diff --git a/bson/src/test/resources/bson/multi-type.json b/bson/src/test/resources/bson/multi-type.json deleted file mode 100644 index 1e1d557c9ba..00000000000 --- a/bson/src/test/resources/bson/multi-type.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "description": "Multiple types within the same document", - "bson_type": "0x00", - "valid": [ - { - "description": "All BSON types", - "canonical_bson": "F4010000075F69640057E193D7A9CC81B4027498B502537472696E670007000000737472696E670010496E743332002A00000012496E743634002A0000000000000001446F75626C6500000000000000F0BF0542696E617279001000000003A34C38F7C3ABEDC8A37814A992AB8DB60542696E61727955736572446566696E656400050000008001020304050D436F6465000E00000066756E6374696F6E2829207B7D000F436F64655769746853636F7065001B0000000E00000066756E6374696F6E2829207B7D00050000000003537562646F63756D656E74001200000002666F6F0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696D657374616D7000010000002A0000000B5265676578007061747465726E0000094461746574696D6545706F6368000000000000000000094461746574696D65506F73697469766500FFFFFF7F00000000094461746574696D654E656761746976650000000080FFFFFFFF085472756500010846616C73650000034442526566003D0000000224726566000B000000636F6C6C656374696F6E00072469640057FD71E96E32AB4225B723FB02246462000900000064617461626173650000FF4D696E6B6579007F4D61786B6579000A4E756C6C0000", - "canonical_extjson": "{\"_id\": {\"$oid\": \"57e193d7a9cc81b4027498b5\"}, \"String\": \"string\", \"Int32\": {\"$numberInt\": \"42\"}, \"Int64\": {\"$numberLong\": \"42\"}, \"Double\": {\"$numberDouble\": \"-1.0\"}, \"Binary\": { \"$binary\" : {\"base64\": \"o0w498Or7cijeBSpkquNtg==\", \"subType\": \"03\"}}, \"BinaryUserDefined\": { \"$binary\" : {\"base64\": \"AQIDBAU=\", \"subType\": \"80\"}}, \"Code\": {\"$code\": \"function() {}\"}, \"CodeWithScope\": {\"$code\": \"function() {}\", \"$scope\": {}}, \"Subdocument\": {\"foo\": \"bar\"}, \"Array\": [{\"$numberInt\": \"1\"}, {\"$numberInt\": \"2\"}, {\"$numberInt\": \"3\"}, {\"$numberInt\": \"4\"}, {\"$numberInt\": \"5\"}], \"Timestamp\": {\"$timestamp\": {\"t\": 42, \"i\": 1}}, \"Regex\": {\"$regularExpression\": {\"pattern\": \"pattern\", \"options\": \"\"}}, \"DatetimeEpoch\": {\"$date\": {\"$numberLong\": \"0\"}}, \"DatetimePositive\": {\"$date\": {\"$numberLong\": \"2147483647\"}}, \"DatetimeNegative\": {\"$date\": {\"$numberLong\": \"-2147483648\"}}, \"True\": true, \"False\": false, \"DBRef\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57fd71e96e32ab4225b723fb\"}, \"$db\": \"database\"}, \"Minkey\": {\"$minKey\": 1}, \"Maxkey\": {\"$maxKey\": 1}, \"Null\": null}" - } - ] -} diff --git a/bson/src/test/resources/bson/null.json b/bson/src/test/resources/bson/null.json deleted file mode 100644 index f9b269473e6..00000000000 --- a/bson/src/test/resources/bson/null.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "Null type", - "bson_type": "0x0A", - "test_key": "a", - "valid": [ - { - "description": "Null", - "canonical_bson": "080000000A610000", - "canonical_extjson": "{\"a\" : null}" - } - ] -} diff --git a/bson/src/test/resources/bson/oid.json b/bson/src/test/resources/bson/oid.json deleted file mode 100644 index 14e9caf4b40..00000000000 --- a/bson/src/test/resources/bson/oid.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "description": "ObjectId", - "bson_type": "0x07", - "test_key": "a", - "valid": [ - { - "description": "All zeroes", - "canonical_bson": "1400000007610000000000000000000000000000", - "canonical_extjson": "{\"a\" : {\"$oid\" : \"000000000000000000000000\"}}" - }, - { - "description": "All ones", - "canonical_bson": "14000000076100FFFFFFFFFFFFFFFFFFFFFFFF00", - "canonical_extjson": "{\"a\" : {\"$oid\" : \"ffffffffffffffffffffffff\"}}" - }, - { - "description": "Random", - "canonical_bson": "1400000007610056E1FC72E0C917E9C471416100", - "canonical_extjson": "{\"a\" : {\"$oid\" : \"56e1fc72e0c917e9c4714161\"}}" - } - ], - "decodeErrors": [ - { - "description": "OID truncated", - "bson": "1200000007610056E1FC72E0C917E9C471" - } - ] -} diff --git a/bson/src/test/resources/bson/regex.json b/bson/src/test/resources/bson/regex.json deleted file mode 100644 index 223802169df..00000000000 --- a/bson/src/test/resources/bson/regex.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "description": "Regular Expression type", - "bson_type": "0x0B", - "test_key": "a", - "valid": [ - { - "description": "empty regex with no options", - "canonical_bson": "0A0000000B6100000000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"\", \"options\" : \"\"}}}" - }, - { - "description": "regex without options", - "canonical_bson": "0D0000000B6100616263000000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"\"}}}" - }, - { - "description": "regex with options", - "canonical_bson": "0F0000000B610061626300696D0000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"im\"}}}" - }, - { - "description": "regex with options (keys reversed)", - "canonical_bson": "0F0000000B610061626300696D0000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"im\"}}}", - "degenerate_extjson": "{\"a\" : {\"$regularExpression\" : {\"options\" : \"im\", \"pattern\": \"abc\"}}}" - }, - { - "description": "regex with slash", - "canonical_bson": "110000000B610061622F636400696D0000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"ab/cd\", \"options\" : \"im\"}}}" - }, - { - "description": "flags not alphabetized", - "degenerate_bson": "100000000B6100616263006D69780000", - "canonical_bson": "100000000B610061626300696D780000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"imx\"}}}", - "degenerate_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"mix\"}}}" - }, - { - "description" : "Required escapes", - "canonical_bson" : "100000000B610061625C226162000000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"ab\\\\\\\"ab\", \"options\" : \"\"}}}" - }, - { - "description" : "Regular expression as value of $regex query operator", - "canonical_bson" : "180000000B247265676578007061747465726E0069780000", - "canonical_extjson": "{\"$regex\" : {\"$regularExpression\" : { \"pattern\": \"pattern\", \"options\" : \"ix\"}}}" - }, - { - "description" : "Regular expression as value of $regex query operator with $options", - "canonical_bson" : "270000000B247265676578007061747465726E000002246F7074696F6E73000300000069780000", - "canonical_extjson": "{\"$regex\" : {\"$regularExpression\" : { \"pattern\": \"pattern\", \"options\" : \"\"}}, \"$options\" : \"ix\"}" - } - ], - "decodeErrors": [ - { - "description": "Null byte in pattern string", - "bson": "0F0000000B610061006300696D0000" - }, - { - "description": "Null byte in flags string", - "bson": "100000000B61006162630069006D0000" - } - ] -} diff --git a/bson/src/test/resources/bson/string.json b/bson/src/test/resources/bson/string.json deleted file mode 100644 index 148334d0919..00000000000 --- a/bson/src/test/resources/bson/string.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "description": "String", - "bson_type": "0x02", - "test_key": "a", - "valid": [ - { - "description": "Empty string", - "canonical_bson": "0D000000026100010000000000", - "canonical_extjson": "{\"a\" : \"\"}" - }, - { - "description": "Single character", - "canonical_bson": "0E00000002610002000000620000", - "canonical_extjson": "{\"a\" : \"b\"}" - }, - { - "description": "Multi-character", - "canonical_bson": "190000000261000D0000006162616261626162616261620000", - "canonical_extjson": "{\"a\" : \"abababababab\"}" - }, - { - "description": "two-byte UTF-8 (\u00e9)", - "canonical_bson": "190000000261000D000000C3A9C3A9C3A9C3A9C3A9C3A90000", - "canonical_extjson": "{\"a\" : \"\\u00e9\\u00e9\\u00e9\\u00e9\\u00e9\\u00e9\"}" - }, - { - "description": "three-byte UTF-8 (\u2606)", - "canonical_bson": "190000000261000D000000E29886E29886E29886E298860000", - "canonical_extjson": "{\"a\" : \"\\u2606\\u2606\\u2606\\u2606\"}" - }, - { - "description": "Embedded nulls", - "canonical_bson": "190000000261000D0000006162006261620062616261620000", - "canonical_extjson": "{\"a\" : \"ab\\u0000bab\\u0000babab\"}" - }, - { - "description": "Required escapes", - "canonical_bson" : "320000000261002600000061625C220102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F61620000", - "canonical_extjson" : "{\"a\":\"ab\\\\\\\"\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001fab\"}" - } - ], - "decodeErrors": [ - { - "description": "bad string length: 0 (but no 0x00 either)", - "bson": "0C0000000261000000000000" - }, - { - "description": "bad string length: -1", - "bson": "0C000000026100FFFFFFFF00" - }, - { - "description": "bad string length: eats terminator", - "bson": "10000000026100050000006200620000" - }, - { - "description": "bad string length: longer than rest of document", - "bson": "120000000200FFFFFF00666F6F6261720000" - }, - { - "description": "string is not null-terminated", - "bson": "1000000002610004000000616263FF00" - }, - { - "description": "empty string, but extra null", - "bson": "0E00000002610001000000000000" - }, - { - "description": "invalid UTF-8", - "bson": "0E00000002610002000000E90000" - } - ] -} diff --git a/bson/src/test/resources/bson/symbol.json b/bson/src/test/resources/bson/symbol.json deleted file mode 100644 index 3dd3577ebd1..00000000000 --- a/bson/src/test/resources/bson/symbol.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "description": "Symbol", - "bson_type": "0x0E", - "deprecated": true, - "test_key": "a", - "valid": [ - { - "description": "Empty string", - "canonical_bson": "0D0000000E6100010000000000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"\"}}", - "converted_bson": "0D000000026100010000000000", - "converted_extjson": "{\"a\": \"\"}" - }, - { - "description": "Single character", - "canonical_bson": "0E0000000E610002000000620000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"b\"}}", - "converted_bson": "0E00000002610002000000620000", - "converted_extjson": "{\"a\": \"b\"}" - }, - { - "description": "Multi-character", - "canonical_bson": "190000000E61000D0000006162616261626162616261620000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"abababababab\"}}", - "converted_bson": "190000000261000D0000006162616261626162616261620000", - "converted_extjson": "{\"a\": \"abababababab\"}" - }, - { - "description": "two-byte UTF-8 (\u00e9)", - "canonical_bson": "190000000E61000D000000C3A9C3A9C3A9C3A9C3A9C3A90000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"éééééé\"}}", - "converted_bson": "190000000261000D000000C3A9C3A9C3A9C3A9C3A9C3A90000", - "converted_extjson": "{\"a\": \"éééééé\"}" - }, - { - "description": "three-byte UTF-8 (\u2606)", - "canonical_bson": "190000000E61000D000000E29886E29886E29886E298860000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"☆☆☆☆\"}}", - "converted_bson": "190000000261000D000000E29886E29886E29886E298860000", - "converted_extjson": "{\"a\": \"☆☆☆☆\"}" - }, - { - "description": "Embedded nulls", - "canonical_bson": "190000000E61000D0000006162006261620062616261620000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"ab\\u0000bab\\u0000babab\"}}", - "converted_bson": "190000000261000D0000006162006261620062616261620000", - "converted_extjson": "{\"a\": \"ab\\u0000bab\\u0000babab\"}" - } - ], - "decodeErrors": [ - { - "description": "bad symbol length: 0 (but no 0x00 either)", - "bson": "0C0000000E61000000000000" - }, - { - "description": "bad symbol length: -1", - "bson": "0C0000000E6100FFFFFFFF00" - }, - { - "description": "bad symbol length: eats terminator", - "bson": "100000000E6100050000006200620000" - }, - { - "description": "bad symbol length: longer than rest of document", - "bson": "120000000E00FFFFFF00666F6F6261720000" - }, - { - "description": "symbol is not null-terminated", - "bson": "100000000E610004000000616263FF00" - }, - { - "description": "empty symbol, but extra null", - "bson": "0E0000000E610001000000000000" - }, - { - "description": "invalid UTF-8", - "bson": "0E0000000E610002000000E90000" - } - ] -} diff --git a/bson/src/test/resources/bson/timestamp.json b/bson/src/test/resources/bson/timestamp.json deleted file mode 100644 index 6f46564a327..00000000000 --- a/bson/src/test/resources/bson/timestamp.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "description": "Timestamp type", - "bson_type": "0x11", - "test_key": "a", - "valid": [ - { - "description": "Timestamp: (123456789, 42)", - "canonical_bson": "100000001161002A00000015CD5B0700", - "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : 42} } }" - }, - { - "description": "Timestamp: (123456789, 42) (keys reversed)", - "canonical_bson": "100000001161002A00000015CD5B0700", - "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : 42} } }", - "degenerate_extjson": "{\"a\" : {\"$timestamp\" : {\"i\" : 42, \"t\" : 123456789} } }" - }, - { - "description": "Timestamp with high-order bit set on both seconds and increment", - "canonical_bson": "10000000116100FFFFFFFFFFFFFFFF00", - "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 4294967295, \"i\" : 4294967295} } }" - }, - { - "description": "Timestamp with high-order bit set on both seconds and increment (not UINT32_MAX)", - "canonical_bson": "1000000011610000286BEE00286BEE00", - "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 4000000000, \"i\" : 4000000000} } }" - } - ], - "decodeErrors": [ - { - "description": "Truncated timestamp field", - "bson": "0f0000001161002A00000015CD5B00" - } - ] -} diff --git a/bson/src/test/resources/bson/top.json b/bson/src/test/resources/bson/top.json deleted file mode 100644 index 9c649b5e3f0..00000000000 --- a/bson/src/test/resources/bson/top.json +++ /dev/null @@ -1,266 +0,0 @@ -{ - "description": "Top-level document validity", - "bson_type": "0x00", - "valid": [ - { - "description": "Dollar-prefixed key in top-level document", - "canonical_bson": "0F00000010246B6579002A00000000", - "canonical_extjson": "{\"$key\": {\"$numberInt\": \"42\"}}" - }, - { - "description": "Dollar as key in top-level document", - "canonical_bson": "0E00000002240002000000610000", - "canonical_extjson": "{\"$\": \"a\"}" - }, - { - "description": "Dotted key in top-level document", - "canonical_bson": "1000000002612E620002000000630000", - "canonical_extjson": "{\"a.b\": \"c\"}" - }, - { - "description": "Dot as key in top-level document", - "canonical_bson": "0E000000022E0002000000610000", - "canonical_extjson": "{\".\": \"a\"}" - } - ], - "decodeErrors": [ - { - "description": "An object size that's too small to even include the object size, but is a well-formed, empty object", - "bson": "0100000000" - }, - { - "description": "An object size that's only enough for the object size, but is a well-formed, empty object", - "bson": "0400000000" - }, - { - "description": "One object, with length shorter than size (missing EOO)", - "bson": "05000000" - }, - { - "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0x01", - "bson": "0500000001" - }, - { - "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0xff", - "bson": "05000000FF" - }, - { - "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0x70", - "bson": "0500000070" - }, - { - "description": "Byte count is zero (with non-zero input length)", - "bson": "00000000000000000000" - }, - { - "description": "Stated length exceeds byte count, with truncated document", - "bson": "1200000002666F6F0004000000626172" - }, - { - "description": "Stated length less than byte count, with garbage after envelope", - "bson": "1200000002666F6F00040000006261720000DEADBEEF" - }, - { - "description": "Stated length exceeds byte count, with valid envelope", - "bson": "1300000002666F6F00040000006261720000" - }, - { - "description": "Stated length less than byte count, with valid envelope", - "bson": "1100000002666F6F00040000006261720000" - }, - { - "description": "Invalid BSON type low range", - "bson": "07000000000000" - }, - { - "description": "Invalid BSON type high range", - "bson": "07000000800000" - }, - { - "description": "Document truncated mid-key", - "bson": "1200000002666F" - }, - { - "description": "Null byte in document key", - "bson": "0D000000107800000100000000" - } - ], - "parseErrors": [ - { - "description" : "Bad $regularExpression (extra field)", - "string" : "{\"a\" : {\"$regularExpression\": {\"pattern\": \"abc\", \"options\": \"\", \"unrelated\": true}}}" - }, - { - "description" : "Bad $regularExpression (missing options field)", - "string" : "{\"a\" : {\"$regularExpression\": {\"pattern\": \"abc\"}}}" - }, - { - "description": "Bad $regularExpression (pattern is number, not string)", - "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": 42, \"options\" : \"\"}}}" - }, - { - "description": "Bad $regularExpression (options are number, not string)", - "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": \"a\", \"options\" : 0}}}" - }, - { - "description" : "Bad $regularExpression (missing pattern field)", - "string" : "{\"a\" : {\"$regularExpression\": {\"options\":\"ix\"}}}" - }, - { - "description": "Bad $oid (number, not string)", - "string": "{\"a\" : {\"$oid\" : 42}}" - }, - { - "description": "Bad $oid (extra field)", - "string": "{\"a\" : {\"$oid\" : \"56e1fc72e0c917e9c4714161\", \"unrelated\": true}}" - }, - { - "description": "Bad $numberInt (number, not string)", - "string": "{\"a\" : {\"$numberInt\" : 42}}" - }, - { - "description": "Bad $numberInt (extra field)", - "string": "{\"a\" : {\"$numberInt\" : \"42\", \"unrelated\": true}}" - }, - { - "description": "Bad $numberLong (number, not string)", - "string": "{\"a\" : {\"$numberLong\" : 42}}" - }, - { - "description": "Bad $numberLong (extra field)", - "string": "{\"a\" : {\"$numberLong\" : \"42\", \"unrelated\": true}}" - }, - { - "description": "Bad $numberDouble (number, not string)", - "string": "{\"a\" : {\"$numberDouble\" : 42}}" - }, - { - "description": "Bad $numberDouble (extra field)", - "string": "{\"a\" : {\"$numberDouble\" : \".1\", \"unrelated\": true}}" - }, - { - "description": "Bad $numberDecimal (number, not string)", - "string": "{\"a\" : {\"$numberDecimal\" : 42}}" - }, - { - "description": "Bad $numberDecimal (extra field)", - "string": "{\"a\" : {\"$numberDecimal\" : \".1\", \"unrelated\": true}}" - }, - { - "description": "Bad $binary (binary is number, not string)", - "string": "{\"x\" : {\"$binary\" : {\"base64\" : 0, \"subType\" : \"00\"}}}" - }, - { - "description": "Bad $binary (type is number, not string)", - "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"\", \"subType\" : 0}}}" - }, - { - "description": "Bad $binary (missing $type)", - "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"//8=\"}}}" - }, - { - "description": "Bad $binary (missing $binary)", - "string": "{\"x\" : {\"$binary\" : {\"subType\" : \"00\"}}}" - }, - { - "description": "Bad $binary (extra field)", - "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"//8=\", \"subType\" : 0, \"unrelated\": true}}}" - }, - { - "description": "Bad $code (type is number, not string)", - "string": "{\"a\" : {\"$code\" : 42}}" - }, - { - "description": "Bad $code (type is number, not string) when $scope is also present", - "string": "{\"a\" : {\"$code\" : 42, \"$scope\" : {}}}" - }, - { - "description": "Bad $code (extra field)", - "string": "{\"a\" : {\"$code\" : \"\", \"unrelated\": true}}" - }, - { - "description": "Bad $code with $scope (scope is number, not doc)", - "string": "{\"x\" : {\"$code\" : \"\", \"$scope\" : 42}}" - }, - { - "description": "Bad $timestamp (type is number, not doc)", - "string": "{\"a\" : {\"$timestamp\" : 42} }" - }, - { - "description": "Bad $timestamp ('t' type is string, not number)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : 42} } }" - }, - { - "description": "Bad $timestamp ('i' type is string, not number)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : \"42\"} } }" - }, - { - "description": "Bad $timestamp (extra field at same level as $timestamp)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : \"42\"}, \"unrelated\": true } }" - }, - { - "description": "Bad $timestamp (extra field at same level as t and i)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : \"42\", \"unrelated\": true} } }" - }, - { - "description": "Bad $timestamp (missing t)", - "string": "{\"a\" : {\"$timestamp\" : {\"i\" : \"42\"} } }" - }, - { - "description": "Bad $timestamp (missing i)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\"} } }" - }, - { - "description": "Bad $date (number, not string or hash)", - "string": "{\"a\" : {\"$date\" : 42}}" - }, - { - "description": "Bad $date (extra field)", - "string": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"1356351330501\"}, \"unrelated\": true}}" - }, - { - "description": "Bad $minKey (boolean, not integer)", - "string": "{\"a\" : {\"$minKey\" : true}}" - }, - { - "description": "Bad $minKey (wrong integer)", - "string": "{\"a\" : {\"$minKey\" : 0}}" - }, - { - "description": "Bad $minKey (extra field)", - "string": "{\"a\" : {\"$minKey\" : 1, \"unrelated\": true}}" - }, - { - "description": "Bad $maxKey (boolean, not integer)", - "string": "{\"a\" : {\"$maxKey\" : true}}" - }, - { - "description": "Bad $maxKey (wrong integer)", - "string": "{\"a\" : {\"$maxKey\" : 0}}" - }, - { - "description": "Bad $maxKey (extra field)", - "string": "{\"a\" : {\"$maxKey\" : 1, \"unrelated\": true}}" - }, - { - "description": "Bad DBpointer (extra field)", - "string": "{\"a\": {\"$dbPointer\": {\"a\": {\"$numberInt\": \"1\"}, \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}, \"c\": {\"$numberInt\": \"2\"}, \"$ref\": \"b\"}}}" - }, - { - "description" : "Null byte in document key", - "string" : "{\"a\\u0000\": 1 }" - }, - { - "description" : "Null byte in sub-document key", - "string" : "{\"a\" : {\"b\\u0000\": 1 }}" - }, - { - "description": "Null byte in $regularExpression pattern", - "string": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"b\\u0000\", \"options\" : \"i\"}}}" - }, - { - "description": "Null byte in $regularExpression options", - "string": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"b\", \"options\" : \"i\\u0000\"}}}" - } - ] -} diff --git a/bson/src/test/resources/bson/undefined.json b/bson/src/test/resources/bson/undefined.json deleted file mode 100644 index 285f068258c..00000000000 --- a/bson/src/test/resources/bson/undefined.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "Undefined type (deprecated)", - "bson_type": "0x06", - "deprecated": true, - "test_key": "a", - "valid": [ - { - "description": "Undefined", - "canonical_bson": "0800000006610000", - "canonical_extjson": "{\"a\" : {\"$undefined\" : true}}", - "converted_bson": "080000000A610000", - "converted_extjson": "{\"a\" : null}" - } - ] -} diff --git a/bson/src/test/unit/org/bson/DocumentTest.java b/bson/src/test/unit/org/bson/DocumentTest.java index bd9551e9407..089f182f387 100644 --- a/bson/src/test/unit/org/bson/DocumentTest.java +++ b/bson/src/test/unit/org/bson/DocumentTest.java @@ -151,6 +151,16 @@ public void toJsonShouldRenderUuidAsStandard() { assertEquals(new BsonDocument("_id", new BsonBinary(uuid)), BsonDocument.parse(json)); } + @Test + public void parseShouldHandleDoubleSignedExponent() { + BsonDocument expected = new BsonDocument("d", new BsonDouble(1.2345678921232E+18)); + assertEquals(expected, BsonDocument.parse("{\"d\" : {\"$numberDouble\": \"1.2345678921232E18\"}}"), "implicit positive exponent"); + assertEquals(expected, BsonDocument.parse("{\"d\" : {\"$numberDouble\": \"1.2345678921232E+18\"}}"), "explicit positive exponent"); + + expected = new BsonDocument("d", new BsonDouble(1.2345678921232E-18)); + assertEquals(expected, BsonDocument.parse("{\"d\" : {\"$numberDouble\": \"1.2345678921232E-18\"}}"), "explicit negative exponent"); + } + public class Name { private final String name; diff --git a/bson/src/test/unit/org/bson/GenericBsonTest.java b/bson/src/test/unit/org/bson/GenericBsonTest.java index 582ec5d83dc..8fa06b8a484 100644 --- a/bson/src/test/unit/org/bson/GenericBsonTest.java +++ b/bson/src/test/unit/org/bson/GenericBsonTest.java @@ -283,7 +283,7 @@ private void throwIfValueIsStringContainingReplacementCharacter(final BsonDocume private static Stream data() { List data = new ArrayList<>(); - for (BsonDocument testDocument : JsonPoweredTestHelper.getTestDocuments("/bson")) { + for (BsonDocument testDocument : JsonPoweredTestHelper.getSpecTestDocuments("bson-corpus")) { for (BsonValue curValue : testDocument.getArray("valid", new BsonArray())) { BsonDocument testCaseDocument = curValue.asDocument(); data.add(Arguments.of( diff --git a/bson/src/test/unit/org/bson/json/JsonWriterTest.java b/bson/src/test/unit/org/bson/json/JsonWriterTest.java index 00777a3dfec..3cde9248adc 100644 --- a/bson/src/test/unit/org/bson/json/JsonWriterTest.java +++ b/bson/src/test/unit/org/bson/json/JsonWriterTest.java @@ -259,19 +259,19 @@ public void testBoolean() { public void testDouble() { List> tests = asList(new TestData<>(0.0, "0.0"), new TestData<>(0.0005, "5.0E-4"), new TestData<>(0.5, "0.5"), new TestData<>(1.0, "1.0"), - new TestData<>(1.5, "1.5"), new TestData<>(1.5E+40, "1.5E40"), + new TestData<>(1.5, "1.5"), new TestData<>(1.5E40, "1.5E+40"), new TestData<>(1.5E-40, "1.5E-40"), - new TestData<>(1234567890.1234568E+123, "1.2345678901234568E132"), - new TestData<>(Double.MAX_VALUE, "1.7976931348623157E308"), + new TestData<>(1234567890.1234568E+123, "1.2345678901234568E+132"), + new TestData<>(Double.MAX_VALUE, "1.7976931348623157E+308"), new TestData<>(Double.MIN_VALUE, "4.9E-324"), new TestData<>(-0.0005, "-5.0E-4"), new TestData<>(-0.5, "-0.5"), new TestData<>(-1.0, "-1.0"), new TestData<>(-1.5, "-1.5"), - new TestData<>(-1.5E+40, "-1.5E40"), + new TestData<>(-1.5E+40, "-1.5E+40"), new TestData<>(-1.5E-40, "-1.5E-40"), - new TestData<>(-1234567890.1234568E+123, "-1.2345678901234568E132"), + new TestData<>(-1234567890.1234568E+123, "-1.2345678901234568E+132"), new TestData<>(Double.NaN, "NaN"), new TestData<>(Double.NEGATIVE_INFINITY, "-Infinity"), diff --git a/bson/src/test/unit/org/bson/BinaryVectorTest.java b/bson/src/test/unit/org/bson/vector/BinaryVectorProseTest.java similarity index 64% rename from bson/src/test/unit/org/bson/BinaryVectorTest.java rename to bson/src/test/unit/org/bson/vector/BinaryVectorProseTest.java index 57e8b294019..e0643732063 100644 --- a/bson/src/test/unit/org/bson/BinaryVectorTest.java +++ b/bson/src/test/unit/org/bson/vector/BinaryVectorProseTest.java @@ -14,19 +14,110 @@ * limitations under the License. */ -package org.bson; - +package org.bson.vector; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.Logger; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.read.ListAppender; +import org.bson.BinaryVector; +import org.bson.BsonBinary; +import org.bson.Float32BinaryVector; +import org.bson.Int8BinaryVector; +import org.bson.PackedBitBinaryVector; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import org.slf4j.LoggerFactory; import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; -class BinaryVectorTest { +// See Prose Tests README: https://github.com/mongodb/specifications/tree/master/source/bson-binary-vector/tests#prose-tests +class BinaryVectorProseTest { + + private ListAppender logWatcher; + + @BeforeEach + void setup() { + logWatcher = new ListAppender<>(); + logWatcher.start(); + ((Logger) LoggerFactory.getLogger("org.bson.BinaryVector")).addAppender(logWatcher); + } + + @AfterEach + void teardown() { + ((Logger) LoggerFactory.getLogger("org.bson.BinaryVector")).detachAndStopAllAppenders(); + } + + @DisplayName("Treatment of non-zero ignored bits: 1. Encoding") + @Test + void shouldEncodeWithNonZeroIgnoredBits() { + // when + byte[] data = {(byte) 0b11111111}; + + // then + Assertions.assertDoesNotThrow(()-> BinaryVector.packedBitVector(data, (byte) 7)); + ILoggingEvent iLoggingEvent = logWatcher.list.get(0); + assertEquals(Level.WARN, iLoggingEvent.getLevel()); + assertEquals("The last 7 padded bits should be zero in the final byte.", iLoggingEvent.getMessage()); + } + + @DisplayName("Treatment of non-zero ignored bits: 2. Decoding") + @Test + void decodingWithNonZeroIgnoredBits() { + // when + byte[] bytearray = {0x10, 0x07, (byte) 0xFF}; + BsonBinary data = new BsonBinary((byte) 9, bytearray); + + // then + assertDoesNotThrow(data::asVector); + ILoggingEvent iLoggingEvent = logWatcher.list.get(0); + assertEquals(Level.WARN, iLoggingEvent.getLevel()); + assertEquals("The last 7 padded bits should be zero in the final byte.", iLoggingEvent.getMessage()); + } + + @DisplayName("Treatment of non-zero ignored bits: 3. Comparison") + @Test + void shouldCompareVectorsWithIgnoredBits() { + // b1: 1-bit vector, all 0 ignored bits + byte[] b1Bytes = {0x10, 0x07, (byte) 0x80}; + BsonBinary b1 = new BsonBinary((byte) 9, b1Bytes); + + // b2: 1-bit vector, all 1 ignored bits + byte[] b2Bytes = {0x10, 0x07, (byte) 0xFF}; + BsonBinary b2 = new BsonBinary((byte) 9, b2Bytes); + + // b3: same data as b1, constructed from vector + PackedBitBinaryVector vector = BinaryVector.packedBitVector(new byte[]{(byte) 0x80}, (byte) 7); + BsonBinary b3 = new BsonBinary(vector); + + // Vector representations + BinaryVector v1 = b1.asVector(); + BinaryVector v2 = b2.asVector(); + BinaryVector v3 = b3.asVector(); + + // Raw binary equality + assertNotEquals(b1, b2); // Unequal at naive Binary level + assertEquals(b1, b3); // Equal at naive Binary level + + // Vector equality + assertNotEquals(v2, v1); // Unequal at BinaryVector level ([255] != [128]) + assertEquals(v1, v3); // Equal at BinaryVector level + } + + // + // Extra non specification based tests + // @Test void shouldCreateInt8Vector() { // given diff --git a/bson/src/test/unit/org/bson/vector/BinaryVectorGenericBsonTest.java b/bson/src/test/unit/org/bson/vector/BinaryVectorTest.java similarity index 78% rename from bson/src/test/unit/org/bson/vector/BinaryVectorGenericBsonTest.java rename to bson/src/test/unit/org/bson/vector/BinaryVectorTest.java index 35326281c66..73188358b67 100644 --- a/bson/src/test/unit/org/bson/vector/BinaryVectorGenericBsonTest.java +++ b/bson/src/test/unit/org/bson/vector/BinaryVectorTest.java @@ -20,7 +20,7 @@ import org.bson.BsonArray; import org.bson.BsonBinary; import org.bson.BsonDocument; -import org.bson.BsonString; +import org.bson.BsonInt32; import org.bson.BsonValue; import org.bson.Float32BinaryVector; import org.bson.PackedBitBinaryVector; @@ -28,6 +28,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import org.opentest4j.AssertionFailedError; import util.JsonPoweredTestHelper; import java.util.ArrayList; @@ -36,44 +37,47 @@ import java.util.stream.Stream; import static java.lang.String.format; +import static java.util.Arrays.asList; import static org.bson.BsonHelper.decodeToDocument; import static org.bson.BsonHelper.encodeToHex; import static org.bson.internal.vector.BinaryVectorHelper.determineVectorDType; import static org.junit.Assert.assertThrows; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assumptions.assumeFalse; /** * See * JSON-based tests that included in test resources. */ -class BinaryVectorGenericBsonTest { +class BinaryVectorTest { - private static final List TEST_NAMES_TO_IGNORE = Arrays.asList( - //NO API to set padding for floats available. - "FLOAT32 with padding", - //NO API to set padding for floats available. - "INT8 with padding", - //It is impossible to provide float inputs for INT8 in the API. - "INT8 with float inputs", - //It is impossible to provide float inputs for INT8. + private static final List TEST_NAMES_TO_IGNORE = asList( + // It is impossible to overflow byte with values higher than 127 in the API. + "Overflow Vector INT8", + // It is impossible to underflow byte with values lower than -128 in the API. + "Underflow Vector INT8", + // It is impossible to overflow byte with values higher than 127 in the API. + "Overflow Vector PACKED_BIT", + // It is impossible to underflow byte with values lower than -128 in the API. "Underflow Vector PACKED_BIT", - //It is impossible to provide float inputs for PACKED_BIT in the API. + // It is impossible to provide float inputs for INT8 in the API. + "INT8 with float inputs", + // It is impossible to provide float inputs for PACKED_BIT in the API. "Vector with float values PACKED_BIT", - //It is impossible to provide float inputs for INT8. - "Overflow Vector PACKED_BIT", - //It is impossible to overflow byte with values higher than 127 in the API. - "Overflow Vector INT8", - //It is impossible to underflow byte with values lower than -128 in the API. - "Underflow Vector INT8"); - + // It is impossible to provide float inputs with padding for FLOAT32 in the API. + "FLOAT32 with padding", + // It is impossible to provide padding for INT8 in the API. + "INT8 with padding", + // TODO JAVA-5848 in 6.0.0 "Padding specified with no vector data PACKED_BIT" will throw an error (currently logs a warning). + "Padding specified with no vector data PACKED_BIT" +); @ParameterizedTest(name = "{0}") @MethodSource("data") void shouldPassAllOutcomes(@SuppressWarnings("unused") final String description, final BsonDocument testDefinition, final BsonDocument testCase) { - assumeFalse(TEST_NAMES_TO_IGNORE.contains(testCase.get("description").asString().getValue())); + String testDescription = testCase.get("description").asString().getValue(); + assumeFalse(TEST_NAMES_TO_IGNORE.contains(testDescription)); String testKey = testDefinition.getString("test_key").getValue(); boolean isValidVector = testCase.getBoolean("valid").getValue(); @@ -85,29 +89,35 @@ void shouldPassAllOutcomes(@SuppressWarnings("unused") final String description, } private static void runInvalidTestCase(final BsonDocument testCase) { + if (testCase.containsKey("vector")) { + runInvalidTestCaseVector(testCase); + } + } + + private static void runInvalidTestCaseVector(final BsonDocument testCase) { BsonArray arrayVector = testCase.getArray("vector"); - byte expectedPadding = (byte) testCase.getInt32("padding").getValue(); byte dtypeByte = Byte.decode(testCase.getString("dtype_hex").getValue()); BinaryVector.DataType expectedDType = determineVectorDType(dtypeByte); - switch (expectedDType) { - case INT8: - byte[] expectedVectorData = toByteArray(arrayVector); - assertValidationException(assertThrows(RuntimeException.class, - () -> BinaryVector.int8Vector(expectedVectorData))); - break; - case PACKED_BIT: - byte[] expectedVectorPackedBitData = toByteArray(arrayVector); - assertValidationException(assertThrows(RuntimeException.class, - () -> BinaryVector.packedBitVector(expectedVectorPackedBitData, expectedPadding))); - break; - case FLOAT32: - float[] expectedFloatVector = toFloatArray(arrayVector); - assertValidationException(assertThrows(RuntimeException.class, () -> BinaryVector.floatVector(expectedFloatVector))); - break; - default: - throw new IllegalArgumentException("Unsupported vector data type: " + expectedDType); - } + assertThrows(IllegalArgumentException.class, () -> { + switch (expectedDType) { + case INT8: + byte[] expectedVectorData = toByteArray(arrayVector); + BinaryVector.int8Vector(expectedVectorData); + break; + case PACKED_BIT: + byte expectedPadding = (byte) testCase.getInt32("padding", new BsonInt32(0)).getValue(); + byte[] expectedVectorPackedBitData = toByteArray(arrayVector); + BinaryVector.packedBitVector(expectedVectorPackedBitData, expectedPadding); + break; + case FLOAT32: + float[] expectedFloatVector = toFloatArray(arrayVector); + BinaryVector.floatVector(expectedFloatVector); + break; + default: + throw new AssertionFailedError("Unsupported vector data type: " + expectedDType); + } + }); } private static void runValidTestCase(final String testKey, final BsonDocument testCase) { @@ -168,14 +178,10 @@ private static void runValidTestCase(final String testKey, final BsonDocument te description); break; default: - throw new IllegalArgumentException("Unsupported vector data type: " + expectedDType); + throw new AssertionFailedError("Unsupported vector data type: " + expectedDType); } } - private static void assertValidationException(final RuntimeException runtimeException) { - assertTrue(runtimeException instanceof IllegalArgumentException || runtimeException instanceof IllegalStateException); - } - private static void assertThatVectorCreationResultsInCorrectBinary(final BinaryVector expectedVectorData, final String testKey, final BsonDocument actualDecodedDocument, @@ -231,7 +237,7 @@ private static float[] toFloatArray(final BsonArray arrayVector) { for (int i = 0; i < arrayVector.size(); i++) { BsonValue bsonValue = arrayVector.get(i); if (bsonValue.isString()) { - floats[i] = parseFloat(bsonValue.asString()); + floats[i] = Float.parseFloat(bsonValue.asString().getValue()); } else { floats[i] = (float) arrayVector.get(i).asDouble().getValue(); } @@ -239,21 +245,9 @@ private static float[] toFloatArray(final BsonArray arrayVector) { return floats; } - private static float parseFloat(final BsonString bsonValue) { - String floatValue = bsonValue.getValue(); - switch (floatValue) { - case "-inf": - return Float.NEGATIVE_INFINITY; - case "inf": - return Float.POSITIVE_INFINITY; - default: - return Float.parseFloat(floatValue); - } - } - private static Stream data() { List data = new ArrayList<>(); - for (BsonDocument testDocument : JsonPoweredTestHelper.getTestDocuments("/bson-binary-vector")) { + for (BsonDocument testDocument : JsonPoweredTestHelper.getSpecTestDocuments("bson-binary-vector")) { for (BsonValue curValue : testDocument.getArray("tests", new BsonArray())) { BsonDocument testCaseDocument = curValue.asDocument(); data.add(Arguments.of(createTestCaseDescription(testDocument, testCaseDocument), testDocument, testCaseDocument)); diff --git a/buildSrc/src/main/kotlin/conventions/spotbugs.gradle.kts b/buildSrc/src/main/kotlin/conventions/spotbugs.gradle.kts index e7ea096fc33..224c0aa4832 100644 --- a/buildSrc/src/main/kotlin/conventions/spotbugs.gradle.kts +++ b/buildSrc/src/main/kotlin/conventions/spotbugs.gradle.kts @@ -40,10 +40,17 @@ spotbugs { tasks.withType().configureEach { if (name == "spotbugsMain") { - reports { - register("xml") { required.set(project.buildingWith("xmlReports.enabled")) } - register("html") { required.set(!project.buildingWith("xmlReports.enabled")) } - register("sarif") { required.set(project.buildingWith("ssdlcReport.enabled")) } + reports.create("xml") { + required.set(project.buildingWith("xmlReports.enabled")) + outputLocation.set(file("$buildDir/reports/spotbugs/spotbugs.xml")) + } + reports.create("html") { + required.set(!project.buildingWith("xmlReports.enabled")) + outputLocation.set(file("$buildDir/reports/spotbugs/spotbugs.html")) + } + reports.create("sarif") { + required.set(project.buildingWith("ssdlcReport.enabled")) + outputLocation.set(file("$buildDir/reports/spotbugs/spotbugs.sarif")) } } else if (name == "spotbugsTest") { enabled = false diff --git a/driver-core/build.gradle.kts b/driver-core/build.gradle.kts index 9a0faaf8dff..282c478858d 100644 --- a/driver-core/build.gradle.kts +++ b/driver-core/build.gradle.kts @@ -66,6 +66,11 @@ dependencies { } } +tasks.processTestResources { + from("${rootProject.projectDir}/testing/resources") + into("${layout.buildDirectory.get()}/resources/test") +} + configureMavenPublication { pom { name.set("MongoDB Java Driver Core") diff --git a/driver-core/src/main/com/mongodb/internal/TimeoutContext.java b/driver-core/src/main/com/mongodb/internal/TimeoutContext.java index 838c5208807..ee61eacf7d4 100644 --- a/driver-core/src/main/com/mongodb/internal/TimeoutContext.java +++ b/driver-core/src/main/com/mongodb/internal/TimeoutContext.java @@ -168,6 +168,10 @@ public Timeout timeoutIncludingRoundTrip() { return timeout == null ? null : timeout.shortenBy(minRoundTripTimeMS, MILLISECONDS); } + public Timeout timeoutOrAlternative(final Timeout alternative) { + return timeout == null ? alternative : timeout; + } + /** * Returns the remaining {@code timeoutMS} if set or the {@code alternativeTimeoutMS}. * @@ -176,6 +180,7 @@ public Timeout timeoutIncludingRoundTrip() { * @param alternativeTimeoutMS the alternative timeout. * @return timeout to use. */ + @VisibleForTesting(otherwise = PRIVATE) public long timeoutOrAlternative(final long alternativeTimeoutMS) { if (timeout == null) { return alternativeTimeoutMS; @@ -380,11 +385,6 @@ public TimeoutContext withAdditionalReadTimeout(final int additionalReadTimeout) return new TimeoutContext(timeoutSettings.withReadTimeoutMS(newReadTimeout > 0 ? newReadTimeout : Long.MAX_VALUE)); } - // Creates a copy of the timeout context that can be reset without resetting the original. - public TimeoutContext copyTimeoutContext() { - return new TimeoutContext(getTimeoutSettings(), getTimeout()); - } - @Override public String toString() { return "TimeoutContext{" diff --git a/driver-core/src/main/com/mongodb/internal/connection/Time.java b/driver-core/src/main/com/mongodb/internal/connection/Time.java index e3940adf1de..9b7f935e631 100644 --- a/driver-core/src/main/com/mongodb/internal/connection/Time.java +++ b/driver-core/src/main/com/mongodb/internal/connection/Time.java @@ -20,7 +20,11 @@ * To enable unit testing of classes that rely on System.nanoTime * *

This class is not part of the public API and may be removed or changed at any time

+ * + * @deprecated Use {@link com.mongodb.internal.time.SystemNanoTime} in production code, + * and {@code Mockito.mockStatic} in test code to tamper with it. */ +@Deprecated public final class Time { static final long CONSTANT_TIME = 42; diff --git a/driver-core/src/main/com/mongodb/internal/time/ExponentialBackoff.java b/driver-core/src/main/com/mongodb/internal/time/ExponentialBackoff.java new file mode 100644 index 00000000000..5f63d5c01c8 --- /dev/null +++ b/driver-core/src/main/com/mongodb/internal/time/ExponentialBackoff.java @@ -0,0 +1,79 @@ +/* + * Copyright 2008-present MongoDB, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.mongodb.internal.time; + +import com.mongodb.internal.VisibleForTesting; + +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.DoubleSupplier; + +import static com.mongodb.assertions.Assertions.assertTrue; +import static com.mongodb.internal.VisibleForTesting.AccessModifier.PRIVATE; + +/** + * Provides exponential backoff calculations with jitter for retry scenarios. + */ +public final class ExponentialBackoff { + + // Constants for transaction retry backoff + @VisibleForTesting(otherwise = PRIVATE) + static final double TRANSACTION_BASE_MS = 5.0; + @VisibleForTesting(otherwise = PRIVATE) + static final double TRANSACTION_MAX_MS = 500.0; + @VisibleForTesting(otherwise = PRIVATE) + static final double TRANSACTION_GROWTH = 1.5; + + // TODO-JAVA-6079 + private static DoubleSupplier testJitterSupplier = null; + + private ExponentialBackoff() { + } + + /** + * Calculate the backoff in milliseconds for transaction retries. + * + * @param attemptNumber 0-based attempt number + * @return The calculated backoff in milliseconds. + */ + public static long calculateTransactionBackoffMs(final int attemptNumber) { + assertTrue(attemptNumber > 0, "Attempt number must be greater than 0 in the context of transaction backoff calculation"); + double jitter = testJitterSupplier != null + ? testJitterSupplier.getAsDouble() + : ThreadLocalRandom.current().nextDouble(); + return Math.round(jitter * Math.min( + TRANSACTION_BASE_MS * Math.pow(TRANSACTION_GROWTH, attemptNumber - 1), + TRANSACTION_MAX_MS)); + } + + /** + * Set a custom jitter supplier for testing purposes. + * + * @param supplier A DoubleSupplier that returns values in [0, 1) range. + */ + @VisibleForTesting(otherwise = PRIVATE) + public static void setTestJitterSupplier(final DoubleSupplier supplier) { + testJitterSupplier = supplier; + } + + /** + * Clear the test jitter supplier, reverting to default ThreadLocalRandom behavior. + */ + @VisibleForTesting(otherwise = PRIVATE) + public static void clearTestJitterSupplier() { + testJitterSupplier = null; + } +} diff --git a/driver-core/src/main/com/mongodb/internal/time/StartTime.java b/driver-core/src/main/com/mongodb/internal/time/StartTime.java index 1d8f186ab67..650f9a0ebb9 100644 --- a/driver-core/src/main/com/mongodb/internal/time/StartTime.java +++ b/driver-core/src/main/com/mongodb/internal/time/StartTime.java @@ -59,6 +59,6 @@ public interface StartTime { * @return a StartPoint, as of now */ static StartTime now() { - return TimePoint.at(System.nanoTime()); + return TimePoint.at(SystemNanoTime.get()); } } diff --git a/driver-core/src/main/com/mongodb/internal/time/SystemNanoTime.java b/driver-core/src/main/com/mongodb/internal/time/SystemNanoTime.java new file mode 100644 index 00000000000..f047108d509 --- /dev/null +++ b/driver-core/src/main/com/mongodb/internal/time/SystemNanoTime.java @@ -0,0 +1,32 @@ +/* + * Copyright 2008-present MongoDB, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.mongodb.internal.time; + +/** + * Avoid using this class directly and prefer using other program elements from {@link com.mongodb.internal.time}, if possible. + *

+ * We do not use {@link System#nanoTime()} directly in the rest of the {@link com.mongodb.internal.time} package, + * and use {@link SystemNanoTime#get()} instead because we need to tamper with it via {@code Mockito.mockStatic}, + * and mocking methods of {@link System} class is both impossible and unwise. + */ +public final class SystemNanoTime { + private SystemNanoTime() { + } + + public static long get() { + return System.nanoTime(); + } +} diff --git a/driver-core/src/main/com/mongodb/internal/time/TimePoint.java b/driver-core/src/main/com/mongodb/internal/time/TimePoint.java index 811065d13a6..c3b130e584d 100644 --- a/driver-core/src/main/com/mongodb/internal/time/TimePoint.java +++ b/driver-core/src/main/com/mongodb/internal/time/TimePoint.java @@ -61,14 +61,14 @@ static TimePoint at(@Nullable final Long nanos) { @VisibleForTesting(otherwise = PRIVATE) long currentNanos() { - return System.nanoTime(); + return SystemNanoTime.get(); } /** * Returns the current {@link TimePoint}. */ static TimePoint now() { - return at(System.nanoTime()); + return at(SystemNanoTime.get()); } /** diff --git a/driver-core/src/test/resources/specifications b/driver-core/src/test/resources/specifications index a8d34be0df2..28fdaf9b378 160000 --- a/driver-core/src/test/resources/specifications +++ b/driver-core/src/test/resources/specifications @@ -1 +1 @@ -Subproject commit a8d34be0df234365600a9269af5a463f581562fd +Subproject commit 28fdaf9b37851f8d479a510be9f3717338c94608 diff --git a/driver-core/src/test/unit/com/mongodb/connection/ServerSelectionSelectionTest.java b/driver-core/src/test/unit/com/mongodb/connection/ServerSelectionSelectionTest.java index 5ac15e92817..8b878fa77c5 100644 --- a/driver-core/src/test/unit/com/mongodb/connection/ServerSelectionSelectionTest.java +++ b/driver-core/src/test/unit/com/mongodb/connection/ServerSelectionSelectionTest.java @@ -49,7 +49,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.junit.Assume.assumeTrue; +import static org.junit.Assume.assumeFalse; // See https://github.com/mongodb/specifications/tree/master/source/server-selection/tests @RunWith(Parameterized.class) @@ -72,7 +72,9 @@ public ServerSelectionSelectionTest(final String description, final BsonDocument @Test public void shouldPassAllOutcomes() { // skip this test because the driver prohibits maxStaleness or tagSets with mode of primary at a much lower level - assumeTrue(!description.endsWith("/max-staleness/tests/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json")); + assumeFalse(description.endsWith("/max-staleness/tests/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json")); + assumeFalse(description.contains("Deprioritized")); // TODO JAVA-6021 deprioritized server selection" + ServerSelector serverSelector = null; List suitableServers = buildServerDescriptions(definition.getArray("suitable_servers", new BsonArray())); List selectedServers = null; diff --git a/driver-core/src/test/unit/com/mongodb/internal/time/ExponentialBackoffTest.java b/driver-core/src/test/unit/com/mongodb/internal/time/ExponentialBackoffTest.java new file mode 100644 index 00000000000..79931744ea4 --- /dev/null +++ b/driver-core/src/test/unit/com/mongodb/internal/time/ExponentialBackoffTest.java @@ -0,0 +1,80 @@ +/* + * Copyright 2008-present MongoDB, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.mongodb.internal.time; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ExponentialBackoffTest { + // Expected backoffs with jitter=1.0 and growth factor ExponentialBackoff.TRANSACTION_GROWTH + private static final double[] EXPECTED_BACKOFFS_MAX_VALUES = {5.0, 7.5, 11.25, 16.875, 25.3125, 37.96875, 56.953125, 85.4296875, 128.14453125, + 192.21679688, 288.32519531, 432.48779297, 500.0}; + + @Test + void testCalculateTransactionBackoffMs() { + // Test that the backoff sequence follows the expected pattern with growth factor ExponentialBackoff.TRANSACTION_GROWTH + // Expected sequence (without jitter): 5, 7.5, 11.25, ... + // With jitter, actual values will be between 0 and these maxima + + for (int attemptNumber = 1; attemptNumber <= EXPECTED_BACKOFFS_MAX_VALUES.length; attemptNumber++) { + long backoff = ExponentialBackoff.calculateTransactionBackoffMs(attemptNumber); + long expectedBackoff = Math.round(EXPECTED_BACKOFFS_MAX_VALUES[attemptNumber - 1]); + assertTrue(backoff >= 0 && backoff <= expectedBackoff, + String.format("Attempt %d: backoff should be between 0 ms and %d ms, got: %d", attemptNumber, expectedBackoff, backoff)); + } + } + + @Test + void testCalculateTransactionBackoffMsRespectsMaximum() { + // Even at high attempt numbers, backoff should never exceed ExponentialBackoff.TRANSACTION_MAX_MS + for (int attemptNumber = 1; attemptNumber < 26; attemptNumber++) { + long backoff = ExponentialBackoff.calculateTransactionBackoffMs(attemptNumber); + assertTrue(backoff >= 0 && backoff <= ExponentialBackoff.TRANSACTION_MAX_MS, + String.format("Attempt %d: backoff should be capped at %f ms, got: %d ms", + attemptNumber, ExponentialBackoff.TRANSACTION_MAX_MS, backoff)); + } + } + + @Test + void testCustomJitter() { + // Test with jitter = 1.0 + ExponentialBackoff.setTestJitterSupplier(() -> 1.0); + try { + for (int attemptNumber = 1; attemptNumber <= EXPECTED_BACKOFFS_MAX_VALUES.length; attemptNumber++) { + long backoff = ExponentialBackoff.calculateTransactionBackoffMs(attemptNumber); + long expected = Math.round(EXPECTED_BACKOFFS_MAX_VALUES[attemptNumber - 1]); + assertEquals(expected, backoff, + String.format("Attempt %d: with jitter=1.0, backoff should be %d ms", attemptNumber, expected)); + } + } finally { + ExponentialBackoff.clearTestJitterSupplier(); + } + + // Test with jitter = 0, all backoffs should be 0 + ExponentialBackoff.setTestJitterSupplier(() -> 0.0); + try { + for (int attemptNumber = 1; attemptNumber < EXPECTED_BACKOFFS_MAX_VALUES.length; attemptNumber++) { + long backoff = ExponentialBackoff.calculateTransactionBackoffMs(attemptNumber); + assertEquals(0, backoff, "With jitter=0, backoff should always be 0 ms"); + } + } finally { + ExponentialBackoff.clearTestJitterSupplier(); + } + } +} diff --git a/driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/ClientSideEncryptionBsonSizeLimitsSpecification.groovy b/driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/ClientSideEncryptionBsonSizeLimitsSpecification.groovy index 874f2204c6d..d053202cada 100644 --- a/driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/ClientSideEncryptionBsonSizeLimitsSpecification.groovy +++ b/driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/ClientSideEncryptionBsonSizeLimitsSpecification.groovy @@ -50,6 +50,7 @@ class ClientSideEncryptionBsonSizeLimitsSpecification extends FunctionalSpecific private MongoCollection autoEncryptingDataCollection def setup() { + assumeTrue("TODO JAVA-6077", false); assumeTrue('Key vault tests disabled', !System.getProperty('AWS_ACCESS_KEY_ID', '').isEmpty()) drop(keyVaultNamespace) diff --git a/driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/ClientSideEncryptionCorpusTest.java b/driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/ClientSideEncryptionCorpusTest.java index 1d98ede1ead..b24c695c317 100644 --- a/driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/ClientSideEncryptionCorpusTest.java +++ b/driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/ClientSideEncryptionCorpusTest.java @@ -72,6 +72,7 @@ public ClientSideEncryptionCorpusTest(final boolean useLocalSchema) { @Before public void setUp() throws IOException, URISyntaxException { + assumeTrue("TODO JAVA-6077", false); assumeTrue("Corpus tests disabled", hasEncryptionTestsEnabled()); MongoClientSettings clientSettings = getMongoClientBuilderFromConnectionString() diff --git a/driver-sync/src/main/com/mongodb/client/internal/ClientSessionClock.java b/driver-sync/src/main/com/mongodb/client/internal/ClientSessionClock.java deleted file mode 100644 index a5ba63e3cd6..00000000000 --- a/driver-sync/src/main/com/mongodb/client/internal/ClientSessionClock.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2008-present MongoDB, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.mongodb.client.internal; - -/** - *

This class is not part of the public API and may be removed or changed at any time

- */ -public final class ClientSessionClock { - public static final ClientSessionClock INSTANCE = new ClientSessionClock(0L); - - private long currentTime; - - private ClientSessionClock(final long millis) { - currentTime = millis; - } - - public long now() { - if (currentTime == 0L) { - return System.currentTimeMillis(); - } - return currentTime; - } - - public void setTime(final long millis) { - currentTime = millis; - } -} diff --git a/driver-sync/src/main/com/mongodb/client/internal/ClientSessionImpl.java b/driver-sync/src/main/com/mongodb/client/internal/ClientSessionImpl.java index aa1414dce5d..18f782728ac 100644 --- a/driver-sync/src/main/com/mongodb/client/internal/ClientSessionImpl.java +++ b/driver-sync/src/main/com/mongodb/client/internal/ClientSessionImpl.java @@ -22,12 +22,15 @@ import com.mongodb.MongoExecutionTimeoutException; import com.mongodb.MongoInternalException; import com.mongodb.MongoOperationTimeoutException; +import com.mongodb.MongoTimeoutException; import com.mongodb.ReadConcern; import com.mongodb.TransactionOptions; import com.mongodb.WriteConcern; import com.mongodb.client.ClientSession; import com.mongodb.client.TransactionBody; import com.mongodb.internal.TimeoutContext; +import com.mongodb.internal.observability.micrometer.TracingManager; +import com.mongodb.internal.observability.micrometer.TransactionSpan; import com.mongodb.internal.operation.AbortTransactionOperation; import com.mongodb.internal.operation.CommitTransactionOperation; import com.mongodb.internal.operation.OperationHelper; @@ -36,20 +39,25 @@ import com.mongodb.internal.operation.WriteOperation; import com.mongodb.internal.session.BaseClientSessionImpl; import com.mongodb.internal.session.ServerSessionPool; -import com.mongodb.internal.observability.micrometer.TracingManager; -import com.mongodb.internal.observability.micrometer.TransactionSpan; +import com.mongodb.internal.time.ExponentialBackoff; +import com.mongodb.internal.time.Timeout; import com.mongodb.lang.Nullable; +import java.util.concurrent.TimeUnit; +import java.util.function.BooleanSupplier; + import static com.mongodb.MongoException.TRANSIENT_TRANSACTION_ERROR_LABEL; import static com.mongodb.MongoException.UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL; import static com.mongodb.assertions.Assertions.assertNotNull; import static com.mongodb.assertions.Assertions.assertTrue; import static com.mongodb.assertions.Assertions.isTrue; import static com.mongodb.assertions.Assertions.notNull; +import static com.mongodb.internal.TimeoutContext.createMongoTimeoutException; +import static com.mongodb.internal.thread.InterruptionUtil.interruptAndCreateMongoInterruptedException; final class ClientSessionImpl extends BaseClientSessionImpl implements ClientSession { - private static final int MAX_RETRY_TIME_LIMIT_MS = 120000; + private static final long MAX_RETRY_TIME_LIMIT_MS = 120000; private final OperationExecutor operationExecutor; private TransactionState transactionState = TransactionState.NONE; @@ -249,15 +257,26 @@ public T withTransaction(final TransactionBody transactionBody) { @Override public T withTransaction(final TransactionBody transactionBody, final TransactionOptions options) { notNull("transactionBody", transactionBody); - long startTime = ClientSessionClock.INSTANCE.now(); TimeoutContext withTransactionTimeoutContext = createTimeoutContext(options); + final boolean hasTimeoutMS = withTransactionTimeoutContext.hasTimeoutMS(); + Timeout withTransactionTimeout = withTransactionTimeoutContext.timeoutOrAlternative( + assertNotNull(TimeoutContext.startTimeout(MAX_RETRY_TIME_LIMIT_MS))); + BooleanSupplier withTransactionTimeoutExpired = () -> withTransactionTimeout.call(TimeUnit.MILLISECONDS, + () -> false, ms -> false, () -> true); + int transactionAttempt = 0; + MongoException lastError = null; try { outer: while (true) { + if (transactionAttempt > 0) { + backoff(transactionAttempt, withTransactionTimeout, assertNotNull(lastError), hasTimeoutMS); + } T retVal; try { - startTransaction(options, withTransactionTimeoutContext.copyTimeoutContext()); + startTransaction(options, withTransactionTimeoutContext); + transactionAttempt++; + if (transactionSpan != null) { transactionSpan.setIsConvenientTransaction(); } @@ -266,14 +285,20 @@ public T withTransaction(final TransactionBody transactionBody, final Tra if (transactionState == TransactionState.IN) { abortTransaction(); } - if (e instanceof MongoException && !(e instanceof MongoOperationTimeoutException)) { - MongoException exceptionToHandle = OperationHelper.unwrap((MongoException) e); - if (exceptionToHandle.hasErrorLabel(TRANSIENT_TRANSACTION_ERROR_LABEL) - && ClientSessionClock.INSTANCE.now() - startTime < MAX_RETRY_TIME_LIMIT_MS) { - if (transactionSpan != null) { - transactionSpan.spanFinalizing(false); + if (e instanceof MongoException) { + lastError = (MongoException) e; + if (!(e instanceof MongoOperationTimeoutException)) { + MongoException exceptionToHandle = OperationHelper.unwrap((MongoException) e); + if (exceptionToHandle.hasErrorLabel(TRANSIENT_TRANSACTION_ERROR_LABEL)) { + if (withTransactionTimeoutExpired.getAsBoolean()) { + throw timeoutException(hasTimeoutMS, e); + } else { + if (transactionSpan != null) { + transactionSpan.spanFinalizing(false); + } + continue; + } } - continue; } } throw e; @@ -284,19 +309,24 @@ public T withTransaction(final TransactionBody transactionBody, final Tra commitTransaction(false); break; } catch (MongoException e) { + lastError = e; clearTransactionContextOnError(e); - if (!(e instanceof MongoOperationTimeoutException) - && ClientSessionClock.INSTANCE.now() - startTime < MAX_RETRY_TIME_LIMIT_MS) { - applyMajorityWriteConcernToTransactionOptions(); + if (!(e instanceof MongoOperationTimeoutException)) { + if (withTransactionTimeoutExpired.getAsBoolean()) { + throw timeoutException(hasTimeoutMS, e); - if (!(e instanceof MongoExecutionTimeoutException) - && e.hasErrorLabel(UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL)) { - continue; - } else if (e.hasErrorLabel(TRANSIENT_TRANSACTION_ERROR_LABEL)) { - if (transactionSpan != null) { - transactionSpan.spanFinalizing(true); + } else { + applyMajorityWriteConcernToTransactionOptions(); + + if (!(e instanceof MongoExecutionTimeoutException) + && e.hasErrorLabel(UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL)) { + continue; + } else if (e.hasErrorLabel(TRANSIENT_TRANSACTION_ERROR_LABEL)) { + if (transactionSpan != null) { + transactionSpan.spanFinalizing(true); + } + continue outer; } - continue outer; } } throw e; @@ -359,4 +389,25 @@ private TimeoutContext createTimeoutContext(final TransactionOptions transaction TransactionOptions.merge(transactionOptions, getOptions().getDefaultTransactionOptions()), operationExecutor.getTimeoutSettings())); } + + private static void backoff(final int transactionAttempt, + final Timeout withTransactionTimeout, final MongoException lastError, final boolean hasTimeoutMS) { + long backoffMs = ExponentialBackoff.calculateTransactionBackoffMs(transactionAttempt); + withTransactionTimeout.shortenBy(backoffMs, TimeUnit.MILLISECONDS).onExpired(() -> { + throw timeoutException(hasTimeoutMS, lastError); + }); + try { + if (backoffMs > 0) { + Thread.sleep(backoffMs); + } + } catch (InterruptedException e) { + throw interruptAndCreateMongoInterruptedException("Transaction retry interrupted", e); + } + } + + private static MongoException timeoutException(final boolean hasTimeoutMS, final Throwable cause) { + return hasTimeoutMS + ? createMongoTimeoutException(cause) // CSOT timeout exception + : new MongoTimeoutException("Operation exceeded the timeout limit", cause); // Legacy timeout exception + } } diff --git a/driver-sync/src/test/functional/com/mongodb/client/AbstractClientSideOperationsTimeoutProseTest.java b/driver-sync/src/test/functional/com/mongodb/client/AbstractClientSideOperationsTimeoutProseTest.java index 9ce58b1654f..d4908dc4b49 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/AbstractClientSideOperationsTimeoutProseTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/AbstractClientSideOperationsTimeoutProseTest.java @@ -47,10 +47,6 @@ import com.mongodb.event.ConnectionClosedEvent; import com.mongodb.event.ConnectionCreatedEvent; import com.mongodb.event.ConnectionReadyEvent; - -import static com.mongodb.internal.connection.CommandHelper.HELLO; -import static com.mongodb.internal.connection.CommandHelper.LEGACY_HELLO; - import com.mongodb.internal.connection.InternalStreamConnection; import com.mongodb.internal.connection.ServerHelper; import com.mongodb.internal.connection.TestCommandListener; @@ -93,6 +89,8 @@ import static com.mongodb.ClusterFixture.sleep; import static com.mongodb.client.Fixture.getDefaultDatabaseName; import static com.mongodb.client.Fixture.getPrimary; +import static com.mongodb.internal.connection.CommandHelper.HELLO; +import static com.mongodb.internal.connection.CommandHelper.LEGACY_HELLO; import static java.lang.Long.MAX_VALUE; import static java.lang.String.join; import static java.util.Arrays.asList; @@ -1106,6 +1104,7 @@ public void setUp() { filesCollectionHelper = new CollectionHelper<>(new BsonDocumentCodec(), gridFsFileNamespace); chunksCollectionHelper = new CollectionHelper<>(new BsonDocumentCodec(), gridFsChunksNamespace); commandListener = new TestCommandListener(); + } @AfterEach diff --git a/driver-sync/src/test/functional/com/mongodb/client/ClientSideEncryptionBsonSizeLimitsSpecification.groovy b/driver-sync/src/test/functional/com/mongodb/client/ClientSideEncryptionBsonSizeLimitsSpecification.groovy index 68a5c1e9a1c..305df4dea83 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/ClientSideEncryptionBsonSizeLimitsSpecification.groovy +++ b/driver-sync/src/test/functional/com/mongodb/client/ClientSideEncryptionBsonSizeLimitsSpecification.groovy @@ -55,6 +55,7 @@ class ClientSideEncryptionBsonSizeLimitsSpecification extends FunctionalSpecific private MongoCollection autoEncryptingDataCollection def setup() { + assumeTrue("TODO JAVA-6077", false); assumeTrue(isClientSideEncryptionTest()) dataKeyCollection.drop() dataCollection.drop() diff --git a/driver-sync/src/test/functional/com/mongodb/client/ClientSideEncryptionCorpusTest.java b/driver-sync/src/test/functional/com/mongodb/client/ClientSideEncryptionCorpusTest.java index 3b4980e430d..dd90c57a419 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/ClientSideEncryptionCorpusTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/ClientSideEncryptionCorpusTest.java @@ -71,6 +71,7 @@ public ClientSideEncryptionCorpusTest(final boolean useLocalSchema) { @Before public void setUp() throws IOException, URISyntaxException { + assumeTrue("TODO JAVA-6077", false); assumeTrue("Corpus tests disabled", hasEncryptionTestsEnabled()); MongoClientSettings clientSettings = getMongoClientSettingsBuilder() diff --git a/driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutProseTest.java b/driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutProseTest.java index 4dcbc4d1a0f..978fece912b 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutProseTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutProseTest.java @@ -19,6 +19,7 @@ import com.mongodb.MongoClientSettings; import com.mongodb.client.gridfs.GridFSBucket; import com.mongodb.client.gridfs.GridFSBuckets; +import com.mongodb.internal.time.ExponentialBackoff; /** @@ -36,6 +37,22 @@ protected GridFSBucket createGridFsBucket(final MongoDatabase mongoDatabase, fin return GridFSBuckets.create(mongoDatabase, bucketName); } + @Override + public void setUp() { + super.setUp(); + ExponentialBackoff.setTestJitterSupplier(() -> 0); + } + + @Override + public void tearDown() throws InterruptedException { + super.tearDown(); + try { + super.tearDown(); + } finally { + ExponentialBackoff.clearTestJitterSupplier(); + } + } + @Override protected boolean isAsync() { return false; diff --git a/driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutTest.java b/driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutTest.java index cb62545f4e4..9fc2f0e6acc 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutTest.java @@ -23,7 +23,6 @@ import static org.junit.jupiter.api.Assumptions.assumeFalse; - // See https://github.com/mongodb/specifications/tree/master/source/client-side-operation-timeout/tests public class ClientSideOperationTimeoutTest extends UnifiedSyncTest { diff --git a/driver-sync/src/test/functional/com/mongodb/client/WithTransactionProseTest.java b/driver-sync/src/test/functional/com/mongodb/client/WithTransactionProseTest.java index 1afbf61565e..27cc55038c9 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/WithTransactionProseTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/WithTransactionProseTest.java @@ -20,17 +20,27 @@ import com.mongodb.MongoClientException; import com.mongodb.MongoException; import com.mongodb.TransactionOptions; -import com.mongodb.client.internal.ClientSessionClock; import com.mongodb.client.model.Sorts; +import com.mongodb.internal.time.ExponentialBackoff; +import com.mongodb.internal.time.StartTime; +import com.mongodb.internal.time.SystemNanoTime; +import org.bson.BsonDocument; import org.bson.Document; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.mockito.MockedStatic; +import org.mockito.Mockito; +import java.time.Duration; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; import static com.mongodb.ClusterFixture.TIMEOUT; import static com.mongodb.ClusterFixture.isDiscoverableReplicaSet; import static com.mongodb.ClusterFixture.isSharded; +import static com.mongodb.client.Fixture.getPrimary; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -39,8 +49,7 @@ // See https://github.com/mongodb/specifications/blob/master/source/transactions-convenient-api/tests/README.md#prose-tests public class WithTransactionProseTest extends DatabaseTestCase { - private static final long START_TIME_MS = 1L; - private static final long ERROR_GENERATING_INTERVAL = 121000L; + private static final Duration ERROR_GENERATING_INTERVAL = Duration.ofSeconds(120); @BeforeEach @Override @@ -61,7 +70,7 @@ public void setUp() { public void testCallbackRaisesCustomError() { final String exceptionMessage = "NotTransientOrUnknownError"; try (ClientSession session = client.startSession()) { - session.withTransaction((TransactionBody) () -> { + session.withTransaction(() -> { throw new MongoException(exceptionMessage); }); // should not get here @@ -96,13 +105,13 @@ public void testRetryTimeoutEnforcedTransientTransactionError() { final String errorMessage = "transient transaction error"; try (ClientSession session = client.startSession()) { - ClientSessionClock.INSTANCE.setTime(START_TIME_MS); - session.withTransaction((TransactionBody) () -> { - ClientSessionClock.INSTANCE.setTime(ERROR_GENERATING_INTERVAL); - MongoException e = new MongoException(112, errorMessage); - e.addLabel(MongoException.TRANSIENT_TRANSACTION_ERROR_LABEL); - throw e; - }); + doWithSystemNanoTimeHandle(systemNanoTimeHandle -> + session.withTransaction(() -> { + systemNanoTimeHandle.setRelativeToStart(ERROR_GENERATING_INTERVAL); + MongoException e = new MongoException(112, errorMessage); + e.addLabel(MongoException.TRANSIENT_TRANSACTION_ERROR_LABEL); + throw e; + })); fail("Test should have thrown an exception."); } catch (Exception e) { assertEquals(errorMessage, e.getMessage()); @@ -122,12 +131,12 @@ public void testRetryTimeoutEnforcedUnknownTransactionCommit() { + "'data': {'failCommands': ['commitTransaction'], 'errorCode': 91, 'closeConnection': false}}")); try (ClientSession session = client.startSession()) { - ClientSessionClock.INSTANCE.setTime(START_TIME_MS); - session.withTransaction((TransactionBody) () -> { - ClientSessionClock.INSTANCE.setTime(ERROR_GENERATING_INTERVAL); - collection.insertOne(session, new Document("_id", 2)); - return null; - }); + doWithSystemNanoTimeHandle(systemNanoTimeHandle -> + session.withTransaction(() -> { + systemNanoTimeHandle.setRelativeToStart(ERROR_GENERATING_INTERVAL); + collection.insertOne(session, new Document("_id", 2)); + return null; + })); fail("Test should have thrown an exception."); } catch (Exception e) { assertEquals(91, ((MongoException) e).getCode()); @@ -151,12 +160,12 @@ public void testRetryTimeoutEnforcedTransientTransactionErrorOnCommit() { + "'errmsg': 'Transaction 0 has been aborted', 'closeConnection': false}}")); try (ClientSession session = client.startSession()) { - ClientSessionClock.INSTANCE.setTime(START_TIME_MS); - session.withTransaction((TransactionBody) () -> { - ClientSessionClock.INSTANCE.setTime(ERROR_GENERATING_INTERVAL); - collection.insertOne(session, Document.parse("{ _id : 1 }")); - return null; - }); + doWithSystemNanoTimeHandle(systemNanoTimeHandle -> + session.withTransaction(() -> { + systemNanoTimeHandle.setRelativeToStart(ERROR_GENERATING_INTERVAL); + collection.insertOne(session, Document.parse("{ _id : 1 }")); + return null; + })); fail("Test should have thrown an exception."); } catch (Exception e) { assertEquals(251, ((MongoException) e).getCode()); @@ -203,7 +212,74 @@ public void testTimeoutMSAndLegacySettings() { } } - private boolean canRunTests() { + /** + * See + * Retry Backoff is Enforced. + */ + @DisplayName("Retry Backoff is Enforced") + @Test + public void testRetryBackoffIsEnforced() throws InterruptedException { + final BsonDocument failPointDocument = BsonDocument.parse("{'configureFailPoint': 'failCommand', 'mode': {'times': 13}, " + + "'data': {'failCommands': ['commitTransaction'], 'errorCode': 251}}"); + + long noBackoffTime = measureTransactionLatency(0.0, failPointDocument); + long withBackoffTime = measureTransactionLatency(1.0, failPointDocument); + + long expectedWithBackoffTime = noBackoffTime + 1800; + long actualDifference = Math.abs(withBackoffTime - expectedWithBackoffTime); + + assertTrue(actualDifference < 500, String.format("Expected withBackoffTime to be ~% dms (noBackoffTime %d ms + 1800 ms), but" + + " got %d ms. Difference: %d ms (tolerance: 500 ms per spec)", expectedWithBackoffTime, noBackoffTime, withBackoffTime, + actualDifference)); + } + + /** + * This test is not from the specification. + */ + @Test + public void testExponentialBackoffOnTransientError() throws InterruptedException { + BsonDocument failPointDocument = BsonDocument.parse("{'configureFailPoint': 'failCommand', 'mode': {'times': 3}, " + + "'data': {'failCommands': ['insert'], 'errorCode': 112, " + + "'errorLabels': ['TransientTransactionError']}}"); + + try (ClientSession session = client.startSession(); + FailPoint ignored = FailPoint.enable(failPointDocument, getPrimary())) { + AtomicInteger attemptsCount = new AtomicInteger(0); + + session.withTransaction(() -> { + attemptsCount.incrementAndGet(); // Count the attempt before the operation that might fail + return collection.insertOne(session, Document.parse("{}")); + }); + + assertEquals(4, attemptsCount.get(), "Expected 1 initial attempt + 3 retries"); + } + } + + private long measureTransactionLatency(final double jitter, final BsonDocument failPointDocument) throws InterruptedException { + ExponentialBackoff.setTestJitterSupplier(() -> jitter); + try (ClientSession session = client.startSession(); + FailPoint ignored = FailPoint.enable(failPointDocument, getPrimary())) { + StartTime startTime = StartTime.now(); + session.withTransaction(() -> collection.insertOne(session, Document.parse("{}"))); + return startTime.elapsed().toMillis(); + } finally { + ExponentialBackoff.clearTestJitterSupplier(); + } + } + + private static boolean canRunTests() { return isSharded() || isDiscoverableReplicaSet(); } + + private static void doWithSystemNanoTimeHandle(final Consumer action) { + long startNanos = SystemNanoTime.get(); + try (MockedStatic mockedStaticSystemNanoTime = Mockito.mockStatic(SystemNanoTime.class)) { + mockedStaticSystemNanoTime.when(SystemNanoTime::get).thenReturn(startNanos); + action.accept(change -> mockedStaticSystemNanoTime.when(SystemNanoTime::get).thenReturn(startNanos + change.toNanos())); + } + } + + private interface SystemNanoTimeHandle { + void setRelativeToStart(Duration change); + } } diff --git a/driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java b/driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java index e63cf1490c4..2225f837ec5 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java +++ b/driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java @@ -421,9 +421,13 @@ public static void applyCustomizations(final TestDef def) { def.skipJira("https://jira.mongodb.org/browse/JAVA-5664") .file("server-discovery-and-monitoring", "pool-cleared-on-min-pool-size-population-error"); def.skipJira("https://jira.mongodb.org/browse/JAVA-5949") - .file("server-discovery-and-monitoring", "backpressure-network-error-fail"); + .file("server-discovery-and-monitoring", "backpressure-network-error-fail-single"); def.skipJira("https://jira.mongodb.org/browse/JAVA-5949") - .file("server-discovery-and-monitoring", "backpressure-network-timeout-error"); + .file("server-discovery-and-monitoring", "backpressure-network-timeout-error-single"); + def.skipJira("https://jira.mongodb.org/browse/JAVA-5949") + .file("server-discovery-and-monitoring", "backpressure-network-error-fail-replicaset"); + def.skipJira("https://jira.mongodb.org/browse/JAVA-5949") + .file("server-discovery-and-monitoring", "backpressure-network-timeout-error-replicaset"); def.skipJira("https://jira.mongodb.org/browse/JAVA-5949") .file("server-discovery-and-monitoring", "backpressure-server-description-unchanged-on-min-pool-size-population-error"); diff --git a/driver-core/src/test/resources/logback-test.xml b/testing/resources/logback-test.xml similarity index 100% rename from driver-core/src/test/resources/logback-test.xml rename to testing/resources/logback-test.xml diff --git a/testing/resources/specifications b/testing/resources/specifications new file mode 160000 index 00000000000..de684cf1ef9 --- /dev/null +++ b/testing/resources/specifications @@ -0,0 +1 @@ +Subproject commit de684cf1ef9feede71d358cbb7d253840f1a8647