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

Add tests for CHIPMemString. #9619

Merged
merged 3 commits into from
Sep 13, 2021
Merged

Conversation

cecille
Copy link
Contributor

@cecille cecille commented Sep 11, 2021

Problem

I wanted to add something in CHIPMemString and noticed that we didn't have any tests currently.

Change overview

Add tests for functionality currently in CHIPMemString.

Testing

Added new unit tests and nothing else. Verified that the new tests are running by forcing a failure.

@github-actions
Copy link

Size increase report for "esp32-example-build" from eda07d5

File Section File VM
chip-lock-app.elf .flash.text 60 60
chip-temperature-measurement-app.elf .flash.text 32 32
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-ipv6only-app.elf and ./pull_artifact/chip-ipv6only-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-bridge-app.elf and ./pull_artifact/chip-bridge-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize
.flash.text,60,60
.debug_loc,0,-4
.xt.lit._ZNK4chip4SpanIhE7SubSpanEjj,0,-8
.xt.prop._ZNK4chip4SpanIhE7SubSpanEjj,0,-12
[Unmapped],0,-60

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize
.flash.text,32,32
[Unmapped],0,-32


src/lib/support/tests/TestCHIPMemString.cpp Outdated Show resolved Hide resolved
src/lib/support/tests/TestCHIPMemString.cpp Outdated Show resolved Hide resolved
src/lib/support/tests/TestCHIPMemString.cpp Outdated Show resolved Hide resolved
src/lib/support/tests/TestCHIPMemString.cpp Show resolved Hide resolved
src/lib/support/tests/TestCHIPMemString.cpp Outdated Show resolved Hide resolved
Use buf len instead of strlen to make it more clear about what the
buffer sizes really mean.
@mspang mspang merged commit 7c00fa2 into project-chip:master Sep 13, 2021
@cecille cecille deleted the chip_mem_string_tests branch September 20, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants