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)
Fri, Nov 8, 8:28 PM
Unknown Object (File)
Fri, Nov 8, 8:28 PM
Unknown Object (File)
Fri, Nov 8, 8:28 PM
Unknown Object (File)
Fri, Nov 8, 8:10 AM
Unknown Object (File)
Thu, Nov 7, 4:52 PM
Unknown Object (File)
Tue, Nov 5, 2:05 AM
Unknown Object (File)
Thu, Oct 31, 11:43 PM
Unknown Object (File)
Oct 24 2024, 4:59 AM

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