summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Startsev <sandwwraith@gmail.com>2022-05-05 21:28:23 +0300
committerLeonid Startsev <sandwwraith@gmail.com>2022-05-05 21:28:23 +0300
commit85986d8e3b3138b4a6a1c09a18b111033e15eac3 (patch)
treec1862dc5b6a814bb199830c8bf50b0482041ee2e
parent0542df5b121d80c54936265b0f0eb1de57339692 (diff)
downloadkotlinx.serialization-85986d8e3b3138b4a6a1c09a18b111033e15eac3.tar.gz
Fix broken build after 0542df5b121d80c54936265b0f0eb1de57339692
-rw-r--r--docs/formats.md1
-rw-r--r--docs/serialization-guide.md1
-rw-r--r--formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/schema/SchemaValidationsTest.kt21
3 files changed, 2 insertions, 21 deletions
diff --git a/docs/formats.md b/docs/formats.md
index afcc79b0..7a6b0a07 100644
--- a/docs/formats.md
+++ b/docs/formats.md
@@ -17,6 +17,7 @@ stable, these are currently experimental features of Kotlin Serialization.
* [Field numbers](#field-numbers)
* [Integer types](#integer-types)
* [Lists as repeated fields](#lists-as-repeated-fields)
+ * [Packed fields](#packed-fields)
* [Properties (experimental)](#properties-experimental)
* [Custom formats (experimental)](#custom-formats-experimental)
* [Basic encoder](#basic-encoder)
diff --git a/docs/serialization-guide.md b/docs/serialization-guide.md
index ef65696e..56415e99 100644
--- a/docs/serialization-guide.md
+++ b/docs/serialization-guide.md
@@ -140,6 +140,7 @@ Once the project is set up, we can start serializing some classes.
* <a name='field-numbers'></a>[Field numbers](formats.md#field-numbers)
* <a name='integer-types'></a>[Integer types](formats.md#integer-types)
* <a name='lists-as-repeated-fields'></a>[Lists as repeated fields](formats.md#lists-as-repeated-fields)
+ * <a name='packed-fields'></a>[Packed fields](formats.md#packed-fields)
* <a name='properties-experimental'></a>[Properties (experimental)](formats.md#properties-experimental)
* <a name='custom-formats-experimental'></a>[Custom formats (experimental)](formats.md#custom-formats-experimental)
* <a name='basic-encoder'></a>[Basic encoder](formats.md#basic-encoder)
diff --git a/formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/schema/SchemaValidationsTest.kt b/formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/schema/SchemaValidationsTest.kt
index 81858df2..b7332312 100644
--- a/formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/schema/SchemaValidationsTest.kt
+++ b/formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/schema/SchemaValidationsTest.kt
@@ -39,13 +39,6 @@ class SchemaValidationsTest {
SECOND
}
- @Serializable
- class NonListPackedField(@ProtoPacked val i: Int)
-
- @Serializable
- class ListOfNonNumberPackedField(@ProtoPacked val s: List<String>)
-
-
@Test
fun testInvalidEnumElementSerialName() {
val descriptors = listOf(InvalidEnumElementName.serializer().descriptor)
@@ -83,20 +76,6 @@ class SchemaValidationsTest {
}
@Test
- fun testNonListPackedField() {
- val descriptor = NonListPackedField.serializer().descriptor
- val e = assertFailsWith(IllegalArgumentException::class) { ProtoBufSchemaGenerator.generateSchemaText(descriptor) }
- assertContains(e.message ?: "", "only valid on repeated fields (lists)")
- }
-
- @Test
- fun testNonNumberPackedField() {
- val descriptor = ListOfNonNumberPackedField.serializer().descriptor
- val e = assertFailsWith(IllegalArgumentException::class) { ProtoBufSchemaGenerator.generateSchemaText(descriptor) }
- assertContains(e.message ?: "", "packed can only be applied to primitive numeric types")
- }
-
- @Test
fun testInvalidOptionName() {
val descriptors = listOf(ValidClass.serializer().descriptor)
assertFailsWith(IllegalArgumentException::class) {