-
Notifications
You must be signed in to change notification settings - Fork 99
If no document, omit "documents" key from DeviceResponse map #577
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
Conversation
dyiop
commented
Apr 10, 2024
- Tests pass
- Appropriate changes to README are included in PR
val deviceResponseGenerator = DeviceResponseGenerator(20) | ||
val encodedDeviceResponse = deviceResponseGenerator.generate() | ||
|
||
Assert.assertEquals(TestVectors.DEVICE_RESPONSE_NO_DOCUMENTS_STATUS_20.fromHex, encodedDeviceResponse) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally stuff in TestVectors.kt
are the test vectors from Annex D. I think it would be cleaner to do
Assert.assertEquals("<insert pretty-printed-CBOR>", Cbor.toDiagnostics(encodedDeviceResponse, setOf(DiagnosticOption.PRETTY_PRINT)))
and then maybe add a comment above to say that there's no "documents" map entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still using hex and not pretty-print...
…nse_if_no_docs_added' into omit_documents_from_device_response_if_no_docs_added
Ping. Also please squash all your commits into one when possible. |