@@ -117,7 +117,6 @@ import org.bson.codecs.kotlinx.samples.SealedInterface
117117import org.bson.codecs.kotlinx.samples.ValueClass
118118import org.bson.json.JsonMode
119119import org.bson.json.JsonWriterSettings
120- import org.bson.types.Decimal128
121120import org.junit.jupiter.api.Test
122121import org.junit.jupiter.api.assertThrows
123122import org.junit.jupiter.params.ParameterizedTest
@@ -224,18 +223,27 @@ class KotlinSerializerCodecTest {
224223 @JvmStatic
225224 fun testJsonPrimitiveNumberEncoding (): Stream <Pair <String , String >> {
226225 return Stream .of(
227- """ {"value": 0}""" to """ {"value": 0}""" ,
226+ """ {"value": 0}""" to """ {"value": 0}""" ,
228227 """ {"value": 0}""" to """ {"value": 0.0}""" ,
229- """ {"value": 1.1}""" to """ {"value": 1.1E0}""" ,
230- """ {"value": 11}""" to """ {"value": 1.1E1}""" ,
231- """ {"value": 110}""" to """ {"value": 1.1E2}""" ,
232- """ {"value": 1100}""" to """ {"value": 1.1E3}""" ,
233- """ {"value": 0.1}""" to """ {"value": 1E-1}""" ,
234- """ {"value": 0.01}""" to """ {"value": 1E-2}""" ,
235- """ {"value": 0.001}""" to """ {"value": 1E-3}""" ,
236- """ {"value": 35485464}""" to """ {"value": 35485464}""" ,
237- """ {"value": 35485464}""" to """ {"value": 35485464.0}""" ,
238- """ {"value": {"${' $' } numberDecimal": "123456789123456789123456789"}}""" to """ {"value": 123456789123456789123456789}"""
228+ """ {"value": 1.1}""" to """ {"value": 1.1E0}""" ,
229+ """ {"value": 11}""" to """ {"value": 1.1E1}""" ,
230+ """ {"value": 110}""" to """ {"value": 1.1E2}""" ,
231+ """ {"value": 1100}""" to """ {"value": 1.1E3}""" ,
232+ """ {"value": 0.1}""" to """ {"value": 1E-1}""" ,
233+ """ {"value": 0.01}""" to """ {"value": 1E-2}""" ,
234+ """ {"value": 0.001}""" to """ {"value": 1E-3}""" ,
235+ """ {"value": -1.1}""" to """ {"value": -1.1E0}""" ,
236+ """ {"value": -11}""" to """ {"value": -1.1E1}""" ,
237+ """ {"value": -110}""" to """ {"value": -1.1E2}""" ,
238+ """ {"value": -1100}""" to """ {"value": -1.1E3}""" ,
239+ """ {"value": -0.1}""" to """ {"value": -1E-1}""" ,
240+ """ {"value": -0.01}""" to """ {"value": -1E-2}""" ,
241+ """ {"value": -0.001}""" to """ {"value": -1E-3}""" ,
242+ """ {"value": 9223372036854775807}""" to """ {"value": 9223372036854775807}""" ,
243+ """ {"value": {"${' $' } numberDecimal": "9223372036854775808"}}""" to """ {"value": 9223372036854775808}""" ,
244+ """ {"value": -9223372036854775808}""" to """ {"value": -9223372036854775808}""" ,
245+ """ {"value": {"${' $' } numberDecimal": "-9223372036854775809"}}""" to
246+ """ {"value": -9223372036854775809}""" ,
239247 )
240248 }
241249 }
0 commit comments