Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken but supported protovalidate conformance tests #348

Merged
merged 3 commits into from
Feb 24, 2025

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.

@@ -23,7 +23,7 @@ import com.google.protobuf.DescriptorProtos.FileDescriptorProto
// https://github.com/protocolbuffers/protobuf/blob/5e84a6169cf0f9716c9285c95c860bcb355dbdc1/src/google/protobuf/stubs/strutil.cc#L595

// 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
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