Page MenuHomePhabricator

[services] Backup - Add unit test for getUtf8Length
AbandonedPublic

Authored by jakub on Jul 15 2022, 1:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 14, 6:41 AM
Unknown Object (File)
Tue, Apr 30, 6:17 PM
Unknown Object (File)
Fri, Apr 19, 4:30 PM
Unknown Object (File)
Fri, Apr 19, 4:30 PM
Unknown Object (File)
Fri, Apr 19, 4:30 PM
Unknown Object (File)
Fri, Apr 19, 4:29 PM
Unknown Object (File)
Fri, Apr 19, 4:25 PM
Unknown Object (File)
Apr 13 2024, 1:46 PM

Details

Reviewers
tomek
karol
Summary

Depends on D4544

Add unit test for function for getting proper length of string encoded in utf8 multibyte format.

Test Plan

cd services && yarn run-unit-tests backup

Diff Detail

Repository
rCOMM Comm
Branch
unittest
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 15 2022, 1:57 AM
Harbormaster failed remote builds in B10548: Diff 14513!

Adding missing <algorithm> library

jakub edited the test plan for this revision. (Show Details)

Can you make sure that lines don't exceed 80 chars?

karol added inline comments.
services/backup/test/ToolsTest.cpp
113 ↗(On Diff #14521)

I think we do not want to use random data for tests. Tests should be constructed so we can easily repeat them. I think the data sets should be just hardcoded.

148 ↗(On Diff #14521)

please, add a new line

This revision now requires changes to proceed.Jul 18 2022, 2:08 AM

Replacing random data sets with already generated examples

This revision is now accepted and ready to land.Jul 27 2022, 4:47 AM
tomek requested changes to this revision.Jul 27 2022, 5:06 AM
tomek added inline comments.
services/backup/test/ToolsTest.cpp
24–26

What is the reason for putting the last two chars in their own lines? I guess the string can fit in one line.

83

Doesn't matter that much, but we don't need to copy the data during iteration

This revision now requires changes to proceed.Jul 27 2022, 5:06 AM

Abandoning, explained in previous diff D4544