Skip to content

Conversation

@shahmal1yev
Copy link
Member

No description provided.

…nd tests

- Implement `TextString` class with an `encode` method for CBOR text string encoding based on the length.
- Placeholder added for the `decode` method (not yet implemented).
- Create `TextStringTest` to validate encoding functionality with various test cases.
- Include a data provider for encoding tests, covering short and long strings.

Note: Decoding functionality is still pending implementation.
- Add support for encoding string data using the `TextString` class within the `CBOR::encode` method.
- Update the CBOR class to handle the `string` type by delegating encoding to `TextString::encode`.
- Keep the `decode` method as a placeholder for future implementation.
@shahmal1yev shahmal1yev added the enhancement New feature or request label Jan 8, 2025
@shahmal1yev shahmal1yev self-assigned this Jan 8, 2025
@shahmal1yev shahmal1yev marked this pull request as draft January 8, 2025 16:23
…h validation

- Implemented `decode` method in `CBOR` class to support both `TextString` and `UnsignedInteger` types.
- Added `validate` method to `TextString` and `UnsignedInteger` classes for type-specific validation.
- Updated `decode` methods in `TextString` and `UnsignedInteger` to use their respective `validate` methods.
- Enhanced `CBORTest` to include tests for decoding mixed types (`TextString` and `UnsignedInteger`).
- Fixed and refactored exception messages for better consistency and readability in `UnsignedInteger`.
@codecov
Copy link

codecov bot commented Jan 9, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@shahmal1yev shahmal1yev marked this pull request as ready for review January 9, 2025 14:32
@shahmal1yev shahmal1yev merged commit b1d6967 into 1.x Jan 9, 2025
6 checks passed
@shahmal1yev shahmal1yev deleted the apc-3 branch January 9, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant