| /external/kotlinx.serialization/formats/cbor/commonTest/src/kotlinx/serialization/cbor/ |
| D | CborDecoderTest.kt | 20 … 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 …]
|
| D | CborTaggedTest.kt | 247 …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 …]
|
| D | CborLabelTest.kt | 37 …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()
|
| D | CborArrayTest.kt | 20 … 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()
|
| D | CborIsoTest.kt | 28 … assertEquals(reference, cbor.decodeFromHexString(DataClass.serializer(), referenceHexString)) in writeReadVerifyCoseSigned()
|
| /external/kotlinx.serialization/formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/ |
| D | ProtobufOneOfTest.kt | 77 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 …]
|
| D | CustomSerializersProtobufTest.kt | 29 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 …]
|
| D | ProtoTagExceptionTest.kt | 8 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()
|
| D | PackedArraySerializerTest.kt | 85 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()
|
| D | InvalidFieldNumberTest.kt | 30 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()
|
| D | SkipFieldsTest.kt | 20 val holder = ProtoBuf.decodeFromHexString<Holder>(hexString) in testSkipBigFieldNumber() 28 val holder = ProtoBuf.decodeFromHexString<Holder>(hexString) in testSkipUnknownFiledNumberForString()
|
| D | TestFunctions.kt | 14 assertEquals(data, ProtoBuf.decodeFromHexString(serializer, string)) in testConversion() 20 assertEquals(data, ProtoBuf.decodeFromHexString(string)) in testConversion()
|
| D | MapEntryTest.kt | 20 … assertEquals(e.e.toPair(), ProtoBuf.decodeFromHexString(Wrapper.serializer(), output).e.toPair()) in testEntry()
|
| D | ProtoOneofInline.kt | 38 ProtoBuf.decodeFromHexString<OneOfDataNullable>("62036261721a03666f6f").also { in testOneOfStringTypeNullable()
|
| D | ProtobufPolymorphismTest.kt | 40 assertEquals(Single.Impl(42), ProtoBuf.decodeFromHexString(Single.serializer(), expected)) in testSingleSealedClass()
|
| D | ByteArraySerializerTest.kt | 40 val obj2 = ProtoBuf.decodeFromHexString(ByteArrayCarrier.serializer(), s) in testByteArrayProtobuf()
|
| D | ProtobufEnumTest.kt | 23 val restored = ProtoBuf.decodeFromHexString(EnumWithUnion.serializer(), hex) in testEnumWithUnion()
|
| D | ScatteredArraysTest.kt | 54 val parsed = ProtoBuf.decodeFromHexString(serializer, testData) in doTest()
|
| /external/kotlinx.serialization/core/commonMain/src/kotlinx/serialization/ |
| D | SerialFormat.kt | 149 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/ |
| D | example-formats-08.kt | 34 println(ProtoBuf.decodeFromHexString<Data>(stringTom)) in main() 35 println(ProtoBuf.decodeFromHexString<Data>(stringJerry)) in main()
|
| D | example-formats-02.kt | 14 val data = format.decodeFromHexString<Project>( in main()
|
| /external/kotlinx.serialization/formats/protobuf/jvmTest/src/kotlinx/serialization/protobuf/ |
| D | ProtoCompatibilityTest.kt | 21 val deserializedData: RandomTest.KTestData.KTestMap = ProtoBuf.decodeFromHexString(kxHex) in testMap()
|
| D | PolymorphicWithJvmClassTest.kt | 42 val restored = protobuf.decodeFromHexString<DateWrapper>(bytes) in testPolymorphicWrappedOverride()
|
| D | FormatConverterHelpers.kt | 69 obj = protoBuf.decodeFromHexString<T>(hex) in readCompare()
|
| D | ProtobufTopLevelPrimitivesCompatibilityTest.kt | 194 val deserialized = ProtoBuf.decodeFromHexString(serializer, string) in testCompatibility()
|