Skip to content

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

Closed

Conversation

dyiop
Copy link
Contributor

@dyiop 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)
Copy link
Contributor

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.

Copy link
Contributor

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

dyiop added 4 commits April 11, 2024 11:49
…nse_if_no_docs_added' into omit_documents_from_device_response_if_no_docs_added
@davidz25
Copy link
Contributor

Ping. Also please squash all your commits into one when possible.

@davidz25
Copy link
Contributor

As discussed, Akash will open a new PR which includes the fixes for PR #590, #585, #580, #577, #510.

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