Home
last modified time | relevance | path

Searched refs:decodeFromHexString (Results 1 – 25 of 28) sorted by relevance

12

/external/kotlinx.serialization/formats/cbor/commonTest/src/kotlinx/serialization/cbor/
DCborDecoderTest.kt20 … assertEquals(Simple("str"), Cbor.decodeFromHexString(Simple.serializer(), "bf616163737472ff")) in testDecodeSimpleObject()
38 test, Cbor.decodeFromHexString( in testDecodeComplicatedObject()
45 test, Cbor.decodeFromHexString( in testDecodeComplicatedObject()
62 actual = Cbor.decodeFromHexString( in testReadByteStringWhenNullable()
75 actual = Cbor.decodeFromHexString( in testReadByteStringWhenNullable()
84 Cbor.decodeFromHexString<NullableByteStringDefaultNull>("a0") in testNullables()
95 ignoreUnknownKeys.decodeFromHexString( in testIgnoreUnknownKeysFailsWhenCborDataIsMissingKeysThatArePresentInKotlinClass()
103 ignoreUnknownKeys.decodeFromHexString( in testIgnoreUnknownKeysFailsWhenCborDataIsMissingKeysThatArePresentInKotlinClass()
125 ignoreUnknownKeys.decodeFromHexString( in testIgnoreUnknownKeysFailsWhenDecodingIncompleteCbor()
145 ignoreUnknownKeys.decodeFromHexString( in testIgnoreUnknownKeysFailsWhenDecodingIncompleteCbor()
[all …]
DCborTaggedTest.kt247 …assertEquals(reference, Cbor.CoseCompliant.decodeFromHexString(DataWithTags.serializer(), referenc… in writeReadVerifyTaggedClass()
250 … Cbor.CoseCompliant.decodeFromHexString(DataWithTags.serializer(), referenceHexStringDefLen) in writeReadVerifyTaggedClass()
286 }.decodeFromHexString(noKeyTags)) in writeReadUntaggedKeys()
294 }.decodeFromHexString(noKeyTagsDefLen)) in writeReadUntaggedKeys()
302 }.decodeFromHexString(referenceHexString)) in writeReadUntaggedKeys()
305 Cbor.CoseCompliant.decodeFromHexString( in writeReadUntaggedKeys()
319 }.decodeFromHexString(DataWithTags.serializer(), noValueTags) in writeReadUntaggedKeys()
343 }.decodeFromHexString(noValueTags)) in writeReadUntaggedValues()
351 }.decodeFromHexString(referenceHexString)) in writeReadUntaggedValues()
361 }.decodeFromHexString( in writeReadUntaggedValues()
[all …]
DCborLabelTest.kt37 …assertEquals(reference, cbor.decodeFromHexString(ClassWithCborLabel.serializer(), referenceHexLabe… in writeReadVerifyCborLabel()
46 …assertEquals(reference, cbor.decodeFromHexString(ClassWithCborLabel.serializer(), referenceHexName… in writeReadVerifySerialName()
66 …assertEquals(referenceWithTag, cbor.decodeFromHexString(ClassWithCborLabelAndTag.serializer(), ref… in writeReadVerifyCborLabelWithTags()
85 … cbor.decodeFromHexString(ClassWithCborLabelAndTag.serializer(), referenceHexLabelWithTagString) in writeReadVerifyCborLabelWithTagsThrowing()
109 …assertEquals(referenceWithTag, cbor.decodeFromHexString(ClassWithCborLabelAndTag.serializer(), ref… in writeReadVerifyCborLabelWithTagsAndUnknownKeys()
130 …assertEquals(referenceWithoutLabel, cbor.decodeFromHexString(ClassWithoutCborLabel.serializer(), r… in writeClassWithoutLabelBuPreferLabel()
DCborArrayTest.kt20 … assertEquals(reference, cbor.decodeFromHexString(ClassAs1Array.serializer(), referenceHexString)) in writeReadVerifyArraySize1()
37 … assertEquals(reference, cbor.decodeFromHexString(ClassAs2Array.serializer(), referenceHexString)) in writeReadVerifyArraySize2()
56 …assertEquals(reference, cbor.decodeFromHexString(ClassAs4ArrayNullable.serializer(), referenceHexS… in writeReadVerifyArraySize4Nullable()
76 … assertEquals(reference, cbor.decodeFromHexString(ClassWithArray.serializer(), referenceHexString)) in writeReadVerifyClassWithArray()
105 …assertEquals(reference, cbor.decodeFromHexString(DoubleTaggedClassWithArray.serializer(), referenc… in writeReadVerifyDoubleTaggedClassWithArray()
DCborIsoTest.kt28 … assertEquals(reference, cbor.decodeFromHexString(DataClass.serializer(), referenceHexString)) in writeReadVerifyCoseSigned()
/external/kotlinx.serialization/formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/
DProtobufOneOfTest.kt77 val dataString = ProtoBuf.decodeFromHexString<OneOfData>("32036261721a03666f6f") in <lambda>()
87 val dataInt = ProtoBuf.decodeFromHexString<OneOfData>("282a1a03666f6f") in <lambda>()
129 ProtoBuf.decodeFromHexString<OneOfDataNullable>("32036261721a03666f6f").let { in <lambda>()
136 ProtoBuf.decodeFromHexString<OneOfDataNullable>("282a1a03666f6f").let { in <lambda>()
142 ProtoBuf.decodeFromHexString<OneOfDataNullable>("1a03666f6f").let { in <lambda>()
214 ProtoBuf.decodeFromHexString<OneOfData>("3a0228201a03666f6f").also { in <lambda>()
255 ProtoBuf.decodeFromHexString<FailOuter>("282a1a03666f6f") in <lambda>()
268 ProtoBuf.decodeFromHexString<FailOuter>( in <lambda>()
315 ProtoBuf.decodeFromHexString<OneOfData>("4a0208201a03666f6f").also { in <lambda>()
398 buf.decodeFromHexString<DoubleOneOfElement>("28201a03666f6f6203626172").also { in <lambda>()
[all …]
DCustomSerializersProtobufTest.kt29 val s = j.decodeFromHexString<A>("0802") in readCustom()
45 val bs = j.decodeFromHexString<BList>("080108020803") in readCustomList()
59 val s = ProtoBuf.decodeFromHexString<C>("10020801") in readCustomInvertedOrder()
73 val s = ProtoBuf.decodeFromHexString<C>("1002") in readCustomOmitDefault()
88 assertEquals(obj, ProtoBuf.decodeFromHexString(j)) in readOptionalList1()
102 assertEquals(obj, ProtoBuf.decodeFromHexString(CList2Serializer, j)) in readOptionalList2a()
116 assertEquals(obj, ProtoBuf.decodeFromHexString(CList2Serializer, j)) in readOptionalList2b()
130 assertEquals(obj, ProtoBuf.decodeFromHexString(CList3Serializer, j)) in readOptionalList3a()
144 assertEquals(obj, ProtoBuf.decodeFromHexString(CList3Serializer, j)) in readOptionalList3b()
158 assertEquals(obj, ProtoBuf.decodeFromHexString(CList4Serializer, j)) in readOptionalList4a()
[all …]
DProtoTagExceptionTest.kt8 import kotlinx.serialization.decodeFromHexString
41 ProtoBuf.decodeFromHexString<TestData>(build) in testWrongTypeMessage()
71 ProtoBuf.decodeFromHexString<TestNestedData>(build) in testWrongIntFieldInNestedMessage()
82 ProtoBuf.decodeFromHexString<TestData>(build) in testWrongIntFieldInNestedMessage()
98 ProtoBuf.decodeFromHexString<TestData>(build) in testWrongStringFieldInNestedMessage()
126 val result = ProtoBuf.decodeFromHexString<TestDataWithMessageList>(build) in testWrongIntFieldInNestedMessageInList()
155 ProtoBuf.decodeFromHexString<TestDataWithMessageMapValue>(build) in testWrongIntFieldInNestedMapValue()
197 ProtoBuf.decodeFromHexString<DuplicatingIdData>("1a03666f6f182a") in testDuplicatedIdClass()
DPackedArraySerializerTest.kt85 val decodedPacked = ProtoBuf.decodeFromHexString(PackedFloatArrayCarrier.serializer(), s) in testDecodePackedFloatArrayProtobuf()
87 … val decodedNonPacked = ProtoBuf.decodeFromHexString(NonPackedFloatArrayCarrier.serializer(), s) in testDecodePackedFloatArrayProtobuf()
100 val decodedPacked = ProtoBuf.decodeFromHexString(PackedFloatArrayCarrier.serializer(), s) in testDecodeNonPackedFloatArrayProtobuf()
102 … val decodedNonPacked = ProtoBuf.decodeFromHexString(NonPackedFloatArrayCarrier.serializer(), s) in testDecodeNonPackedFloatArrayProtobuf()
115 assertEquals(obj, ProtoBuf.decodeFromHexString<PackedStringCarrier>(expectedHex)) in testEncodeAnnotatedStringList()
118 val decoded = ProtoBuf.decodeFromHexString<PackedStringCarrier>(invalidPackedHex) in testEncodeAnnotatedStringList()
130 val decoded = ProtoBuf.decodeFromHexString<List<Int>>(input) in testDecodeToplevelPackedList()
DInvalidFieldNumberTest.kt30 ProtoBuf.decodeFromHexString<Holder>(hexString) in testDeserializeZeroInput()
39 ProtoBuf.decodeFromHexString<ListHolder>(hexString) in testDeserializeZeroInputForElement()
53 ProtoBuf.decodeFromHexString<ZeroProtoNumber>("000f") in testDeserializeZeroProtoNumber()
67 ProtoBuf.decodeFromHexString<NegativeProtoNumber>("000f") in testDeserializeNegativeProtoNumber()
DSkipFieldsTest.kt20 val holder = ProtoBuf.decodeFromHexString<Holder>(hexString) in testSkipBigFieldNumber()
28 val holder = ProtoBuf.decodeFromHexString<Holder>(hexString) in testSkipUnknownFiledNumberForString()
DTestFunctions.kt14 assertEquals(data, ProtoBuf.decodeFromHexString(serializer, string)) in testConversion()
20 assertEquals(data, ProtoBuf.decodeFromHexString(string)) in testConversion()
DMapEntryTest.kt20 … assertEquals(e.e.toPair(), ProtoBuf.decodeFromHexString(Wrapper.serializer(), output).e.toPair()) in testEntry()
DProtoOneofInline.kt38 ProtoBuf.decodeFromHexString<OneOfDataNullable>("62036261721a03666f6f").also { in testOneOfStringTypeNullable()
DProtobufPolymorphismTest.kt40 assertEquals(Single.Impl(42), ProtoBuf.decodeFromHexString(Single.serializer(), expected)) in testSingleSealedClass()
DByteArraySerializerTest.kt40 val obj2 = ProtoBuf.decodeFromHexString(ByteArrayCarrier.serializer(), s) in testByteArrayProtobuf()
DProtobufEnumTest.kt23 val restored = ProtoBuf.decodeFromHexString(EnumWithUnion.serializer(), hex) in testEnumWithUnion()
DScatteredArraysTest.kt54 val parsed = ProtoBuf.decodeFromHexString(serializer, testData) in doTest()
/external/kotlinx.serialization/core/commonMain/src/kotlinx/serialization/
DSerialFormat.kt149 public fun <T> BinaryFormat.decodeFromHexString(deserializer: DeserializationStrategy<T>, hex: Stri… method
175 public inline fun <reified T> BinaryFormat.decodeFromHexString(hex: String): T = method
176 decodeFromHexString(serializersModule.serializer(), hex)
/external/kotlinx.serialization/guide/example/
Dexample-formats-08.kt34 println(ProtoBuf.decodeFromHexString<Data>(stringTom)) in main()
35 println(ProtoBuf.decodeFromHexString<Data>(stringJerry)) in main()
Dexample-formats-02.kt14 val data = format.decodeFromHexString<Project>( in main()
/external/kotlinx.serialization/formats/protobuf/jvmTest/src/kotlinx/serialization/protobuf/
DProtoCompatibilityTest.kt21 val deserializedData: RandomTest.KTestData.KTestMap = ProtoBuf.decodeFromHexString(kxHex) in testMap()
DPolymorphicWithJvmClassTest.kt42 val restored = protobuf.decodeFromHexString<DateWrapper>(bytes) in testPolymorphicWrappedOverride()
DFormatConverterHelpers.kt69 obj = protoBuf.decodeFromHexString<T>(hex) in readCompare()
DProtobufTopLevelPrimitivesCompatibilityTest.kt194 val deserialized = ProtoBuf.decodeFromHexString(serializer, string) in testCompatibility()

12