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

Update TestSystemPacketBuffer #4305

Merged
merged 2 commits into from
Jan 14, 2021
Merged

Conversation

kpschoedel
Copy link
Contributor

Problem

Uses of PacketBuffer have largely been replaced by PacketBufferHandle. The unit test had not kept up.

Summary of Changes

  • Added tests for PacketBufferHandle specifically.
  • Added many checks of reference counts to verify the ownership model.
  • Some more refactoring into PacketBufferTest, friend class of PacketBuffer and PacketBufferHandle, to use private fields and track buffer allocations.

part of #2707 - Figure out a way to express PacketBuffer ownership in the type system

#### Problem

Uses of `PacketBuffer` have largely been replaced by
`PacketBufferHandle`. The unit test had not kept up.

#### Summary of Changes

- Added tests for PacketBufferHandle specifically.
- Added many checks of reference counts to verify the ownership model.
- Some more refactoring into `PacketBufferTest`, friend class of
  `PacketBuffer` and `PacketBufferHandle`, to use private fields
  and track buffer allocations.

part of project-chip#2707 - Figure out a way to express PacketBuffer ownership in the type system
@andy31415 andy31415 merged commit 530f741 into project-chip:master Jan 14, 2021
@kpschoedel kpschoedel deleted the x2707-18-test branch January 14, 2021 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants