/aosp_15_r20/external/kotlinx.serialization/formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/ |
H A D | ProtobufAbsenceTest.kt | 5 import kotlinx.serialization.decodeFromByteArray 41 …assertFailsWith(SerializationException::class) { ProtoBuf.decodeFromByteArray<SimpleValue>(ByteArr… in testSimpleValue() 49 val decoded = ProtoBuf.decodeFromByteArray<DefaultValue>(bytes) in testDefaultValue() 58 val decoded = ProtoBuf.decodeFromByteArray<NullableValue>(bytes) in testNullableValue() 69 val decoded = ProtoBuf.decodeFromByteArray<DefaultAndNullValue>(bytes) in testDefaultAndNullValue() 79 val decoded = ProtoBuf.decodeFromByteArray<SimpleList>(bytes) in testSimpleList() 88 val decoded = ProtoBuf.decodeFromByteArray<DefaultList>(bytes) in testDefaultList() 99 val decoded = ProtoBuf.decodeFromByteArray<NullableList>(bytes) in testNullableList() 111 val decoded = ProtoBuf.decodeFromByteArray<DefaultNullableList>(bytes) in testDefaultNullableList() 119 val decoded = ProtoBuf.decodeFromByteArray<SimpleMap>(bytes) in testSimpleMap() [all …]
|
H A D | ProtobufCollectionsTest.kt | 42 val emptyList = ProtoBuf.decodeFromByteArray<ListWithNestedList>(emptyListBytes) in testEmptyListIsNotListOfEmpty() 43 val listOfEmpty = ProtoBuf.decodeFromByteArray<ListWithNestedList>(listOfEmptyBytes) in testEmptyListIsNotListOfEmpty() 52 val decoded = ProtoBuf.decodeFromByteArray<NullableMapKey>(bytes) in testEncodeMapWithNullableKey() 65 val decoded = ProtoBuf.decodeFromByteArray<NullableMapValue>(bytes) in testEncodeMapWithNullableValue() 73 val decoded = ProtoBuf.decodeFromByteArray<ListWithNestedList>(bytes) in testNestedList() 86 val decoded = ProtoBuf.decodeFromByteArray<ListWithNestedMap>(bytes) in testNestedMapInList() 94 val decoded = ProtoBuf.decodeFromByteArray<MapWithNullableNestedLists>(bytes) in testNestedListsInMap()
|
H A D | ProtobufEnumTest.kt | 34 assertFailsWith<SerializationException> { ProtoBuf.decodeFromByteArray<EnumHolder>(bytes) } in testUnknownValue() 36 assertFailsWith<SerializationException> { ProtoBuf.decodeFromByteArray<EnumHolder>(bytes) } in testUnknownValue() 52 assertFailsWith<SerializationException> { ProtoBuf.decodeFromByteArray<Holder>(bytes) } in testUnknownValueForAnnotatedEnum() 54 assertFailsWith<SerializationException> { ProtoBuf.decodeFromByteArray<Holder>(bytes) } in testUnknownValueForAnnotatedEnum()
|
H A D | ProtobufHugeClassTest.kt | 5 import kotlinx.serialization.decodeFromByteArray 575 val decoded = ProtoBuf.decodeFromByteArray<Lists64>(bytes) in testLists64() 584 val decoded = ProtoBuf.decodeFromByteArray<Values70>(bytes) in testValues70() 593 val decoded = ProtoBuf.decodeFromByteArray<Values128>(bytes) in testValues128() 602 val decoded = ProtoBuf.decodeFromByteArray<Values130>(bytes) in testValues130()
|
H A D | AutoAssignIdsTest.kt | 21 val w2 = ProtoBuf.decodeFromByteArray(WithoutIds.serializer(), bytes) in saveAndRestoreWithoutIds() 29 val w2 = ProtoBuf.decodeFromByteArray(WithId.serializer(), bytes) in incrementalIds()
|
H A D | ProtobufMissingFieldsTest.kt | 19 val items = ProtoBuf.decodeFromByteArray(Items.serializer(), buffer) in testDeserializeAllFields() 31 val items = ProtoBuf.decodeFromByteArray(ItemsWithoutPageSize.serializer(), buffer) in testDeserializeSomeTagsAreNotInSchema()
|
H A D | ByteArraySerializerTest.kt | 50 assertEquals(obj, ProtoBuf.decodeFromByteArray(ByteArrayCarrier.serializer(), bytes)) in testWrappedByteArrayProtobuf()
|
/aosp_15_r20/external/kotlinx.serialization/formats/cbor/commonTest/src/kotlinx/serialization/cbor/ |
H A D | CborNumberEncodingTest.kt | 3 import kotlinx.serialization.decodeFromByteArray 87 actual = Cbor.decodeFromByteArray(byteArrayOf(23)), in testDecodingLargestPositiveTinyNumber() 104 actual = Cbor.decodeFromByteArray(byteArrayOf(55)), in testDecodingLargestNegativeTinyNumber() 122 actual = Cbor.decodeFromByteArray(bytes), in testDecodingLargestPositive8BitNumber() 140 actual = Cbor.decodeFromByteArray(bytes), in testDecodingLargestNegative8BitNumber() 158 actual = Cbor.decodeFromByteArray(bytes), in testDecodingLargestPositive16BitNumber() 176 actual = Cbor.decodeFromByteArray(bytes), in testDecodingLargestNegative16BitNumber() 194 actual = Cbor.decodeFromByteArray(bytes), in testDecodingLargestPositive32BitNumber() 212 actual = Cbor.decodeFromByteArray(bytes), in testDecodingLargestNegative32BitNumber()
|
/aosp_15_r20/external/kotlinx.serialization/core/commonMain/src/kotlinx/serialization/ |
H A D | SerialFormat.kt | 74 … public fun <T> decodeFromByteArray(deserializer: DeserializationStrategy<T>, bytes: ByteArray): T in encodeToByteArray() method 150 decodeFromByteArray(deserializer, InternalHexConverter.parseHexBinary(hex)) 195 public inline fun <reified T> BinaryFormat.decodeFromByteArray(bytes: ByteArray): T = method 196 decodeFromByteArray(serializersModule.serializer(), bytes)
|
/aosp_15_r20/external/kotlinx.serialization/formats/cbor/jvmTest/src/kotlinx/serialization/cbor/ |
H A D | CborCompatibilityTest.kt | 39 assertEquals(obj, Cbor.decodeFromByteArray(serializer, bytes)) in compare() 45 assertEquals(doubleWrapper, Cbor.decodeFromByteArray(DoubleData.serializer(), bytes)) in compareDouble() 51 assertEquals(floatWrapper, Cbor.decodeFromByteArray(FloatData.serializer(), bytes)) in compareFloat()
|
H A D | CborStacktraceRecoveryTest.kt | 15 Cbor.decodeFromByteArray<String>(byteArrayOf(0xFF.toByte())) in <lambda>()
|
/aosp_15_r20/external/kotlinx.serialization/formats/protobuf/jvmTest/src/kotlinx/serialization/protobuf/conformance/ |
H A D | Proto3PackedTest.kt | 50 …val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Packed>(restored.toByteArray… in default() 77 …val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Packed>(restored.toByteArray… in signedAndFixed() 96 …val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Packed>(restored.toByteArray… in unsigned()
|
H A D | Proto3RepeatedTest.kt | 76 …val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Repeated>(restored.toByteArr… in default() 110 …val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Repeated>(restored.toByteArr… in signedAndFixed() 130 …val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Repeated>(restored.toByteArr… in unsigned()
|
H A D | Proto3UnpackedTest.kt | 54 …val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Unpacked>(restored.toByteArr… in default() 81 …val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Unpacked>(restored.toByteArr… in signedAndFixed()
|
H A D | Proto3MapTest.kt | 116 … val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Map>(restored.toByteArray()) in default() 151 … val restoredMessage = ProtoBuf.decodeFromByteArray<KTestMessagesProto3Map>(restored.toByteArray()) in signedAndFixed()
|
/aosp_15_r20/external/kotlinx.serialization/formats/protobuf/jvmTest/src/kotlinx/serialization/protobuf/ |
H A D | ProtoBufNullTest.kt | 115 val parsed = protoBuf.decodeFromByteArray<MessageWithOptionals>(data.toByteArray()) in <lambda>() 138 val parsed = protoBuf.decodeFromByteArray<MessageWithOptionals>(data.toByteArray()) in <lambda>() 161 val parsed = protoBuf.decodeFromByteArray<MessageWithOptionals>(data.toByteArray()) in <lambda>()
|
/aosp_15_r20/external/kotlinx.serialization/benchmark/src/jmh/kotlin/kotlinx/benchmarks/protobuf/ |
H A D | ProtoBaseline.kt | 35 fun fromBytes() = ProtoBuf.decodeFromByteArray(Holder.serializer(), holderBytes) 41 …fun fromBytesExplicit() = ProtoBuf.decodeFromByteArray(HolderExplicit.serializer(), holderHolderEx…
|
H A D | ProtoListLikeBenchmark.kt | 33 fun fromBytes() = ProtoBuf.decodeFromByteArray(HolderList.serializer(), bytes)
|
/aosp_15_r20/external/kotlinx.serialization/guide/example/ |
H A D | example-formats-01.kt | 19 val obj = Cbor.decodeFromByteArray<Project>(bytes) in main()
|
H A D | example-formats-04.kt | 19 val obj = ProtoBuf.decodeFromByteArray<Project>(bytes) in main()
|
H A D | example-formats-05.kt | 24 val obj = ProtoBuf.decodeFromByteArray<Project>(bytes) in main()
|
H A D | example-formats-03.kt | 23 val obj = Cbor.decodeFromByteArray<Data>(bytes) in main()
|
H A D | example-formats-07.kt | 22 println(ProtoBuf.decodeFromByteArray<Data>(bytes)) in main()
|
/aosp_15_r20/external/kotlinx.serialization/formats/protobuf/commonTest/src/kotlinx/serialization/ |
H A D | TestUtils.kt | 28 val restored = format.decodeFromByteArray(serializer, bytes) in assertSerializedToBinaryAndRestored()
|
/aosp_15_r20/external/kotlinx.serialization/formats/cbor/commonTest/src/kotlinx/serialization/ |
H A D | TestUtilities.kt | 28 val restored = format.decodeFromByteArray(serializer, bytes) in assertSerializedToBinaryAndRestored()
|