Closed
Bug 1314497
Opened 8 years ago
Closed 8 years ago
Convert intl/lwbrk/tests/TestLineBreak.cpp to a gtest
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(2 files)
18.32 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
6.81 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
intl/lwbrk/tests/TestLineBreak.cpp is a horrible old test that also happens to be a GeckoCppUnitTest and so its presence blocks bug 1313141. I will change it to a gtest.
Assignee | ||
Comment 1•8 years ago
|
||
This commit does the following. - Converts the test to a gtest, including renaming the directory. - Factors out the duplicated checking code into a separate Check() function. - Avoids printing any output unless a failure occurs. (The gtest harness prints out minimal output, like the name of the current test.) - Removes SampleWordBreakUsage(), which prints some output but doesn't actually test anything, and so isn't useful.
Attachment #8806575 -
Flags: review?(VYV03354)
Assignee | ||
Comment 2•8 years ago
|
||
This patch makes no functional changes.
Attachment #8806576 -
Flags: review?(VYV03354)
Updated•8 years ago
|
Comment 4•8 years ago
|
||
Comment on attachment 8806575 [details] [diff] [review] (part 1) - Convert intl/lwbrk/tests/TestLineBreak.cpp to a gtest Review of attachment 8806575 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the following comment resolved. ::: intl/lwbrk/gtest/TestLineBreak.cpp @@ -314,5 @@ > -static const char wb3[] = "ernationali"; > -static const char wb4[] = "zation work."; > - > -static const char* wb[] = {wb0,wb1,wb2,wb3,wb4}; > -void SampleWordBreakUsage() Could you leave this function (and sub-functions) intact? I'll convert them to automated tests later on. Originally TestLineBreak.cpp was a manual test. Bug 754176 changed the file to a CppUnitTest, but the bug didn't convert this function. It's the reason why this function only output the result.
Attachment #8806575 -
Flags: review?(VYV03354) → review+
Updated•8 years ago
|
Attachment #8806576 -
Flags: review?(VYV03354) → review+
Pushed by nnethercote@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b4e3d21a447d (part 1) - Convert intl/lwbrk/tests/TestLineBreak.cpp to a gtest. r=emk. https://hg.mozilla.org/integration/mozilla-inbound/rev/50d2cc0d4cbd (part 2) - Reformat intl/lwbrk/tests/TestLineBreak.cpp.
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b4e3d21a447d https://hg.mozilla.org/mozilla-central/rev/50d2cc0d4cbd
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•