Skip to content

Fix broken but supported protovalidate conformance tests#348

Merged
andrewparmet merged 3 commits intomainfrom
fix-some-protovalidate-conformance-tests
Feb 24, 2025
Merged

Fix broken but supported protovalidate conformance tests#348
andrewparmet merged 3 commits intomainfrom
fix-some-protovalidate-conformance-tests

Conversation

@andrewparmet
Copy link
Collaborator

@andrewparmet andrewparmet commented Feb 23, 2025

The remaining failing tests are for fields with features.message_encoding = DELIMITED, which the docs note:

DELIMITED: Message-typed fields are encoded as groups.

which we don't support.


// Limit the number of bytes per line.
private const val BYTES_PER_LINE = 40
private const val BYTES_PER_LINE = 200
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheapo version of #239 for now.

@andrewparmet andrewparmet changed the title Fix most broken protovalidate conformance tests Fix broken but supported protovalidate conformance tests Feb 23, 2025
fun `file with explicit presence and no field features has correct behavior on primitive`() {
assertThat(TestFileImplicit::class.propertyIsMarkedNullable("foo")).isFalse()
assertThat(TestFileImplicit {}.foo).isEqualTo(0)
assertThat(TestFileExplicit::class.propertyIsMarkedNullable("foo")).isTrue()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was broken due to bad copypasta of the message type being asserted on.

@andrewparmet andrewparmet merged commit 7ddaf5a into main Feb 24, 2025
37 checks passed
@andrewparmet andrewparmet deleted the fix-some-protovalidate-conformance-tests branch February 24, 2025 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants