Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Issue 1916083002: Fix unittest with embedded NUL character. (Closed)

Created:
4 years, 8 months ago by etienneb
Modified:
4 years, 8 months ago
Reviewers:
Tom Sepez, dsinclair
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Fix unittest with embedded NUL character. There is an embedded NUL character (previously line 40). The test was working because the beginning ot the string is identical. But, the rest of the string wasn't compare at all. TESTED: manually etienneb@burger:~/src/pdfium/pdfium$ out/Debug/pdfium_embeddertests --gtest_filter=*.EmptyCreation Note: Google Test filter = *.EmptyCreation [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from FPDFEditEmbeddertest [ RUN ] FPDFEditEmbeddertest.EmptyCreation [ OK ] FPDFEditEmbeddertest.EmptyCreation (13 ms) [----------] 1 test from FPDFEditEmbeddertest (13 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (13 ms total) [ PASSED ] 1 test. R=dsinclair BUG=589955 Committed: https://pdfium.googlesource.com/pdfium/+/7712c26b05c85399afbf8cb3d363836e678ad443

Patch Set 1 #

Patch Set 2 : fix tests #

Total comments: 2

Patch Set 3 : add comments #

Total comments: 2

Patch Set 4 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -39 lines) Patch
M fpdfsdk/fpdfedit_embeddertest.cpp View 1 2 3 1 chunk +49 lines, -39 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
dsinclair
This looks right to me, tsepez@ can you take a peek that there isn't something ...
4 years, 8 months ago (2016-04-25 19:32:48 UTC) #2
Tom Sepez
Can we use something besides 'X', maybe something less likely to occur, ctrl-A \01 for ...
4 years, 8 months ago (2016-04-25 20:20:40 UTC) #3
etienneb
What about this? https://codereview.chromium.org/1916083002/diff/20001/fpdfsdk/fpdfedit_embeddertest.cpp File fpdfsdk/fpdfedit_embeddertest.cpp (right): https://codereview.chromium.org/1916083002/diff/20001/fpdfsdk/fpdfedit_embeddertest.cpp#newcode34 fpdfsdk/fpdfedit_embeddertest.cpp:34: "x\x9C\x3xxxx\x1\r\n" On 2016/04/25 20:20:40, Tom Sepez ...
4 years, 8 months ago (2016-04-25 20:30:31 UTC) #4
Tom Sepez
LGTM. I'm good with the _.
4 years, 8 months ago (2016-04-25 20:35:29 UTC) #5
Tom Sepez
On 2016/04/25 20:35:29, Tom Sepez wrote: > LGTM. I'm good with the _. (Thanks, btw)
4 years, 8 months ago (2016-04-25 20:35:45 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916083002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916083002/40001
4 years, 8 months ago (2016-04-25 20:36:47 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_xfa on master.tryserver.client.pdfium (JOB_FAILED, https://build.chromium.org/p/tryserver.client.pdfium/builders/linux_xfa/builds/373)
4 years, 8 months ago (2016-04-25 20:41:38 UTC) #10
Tom Sepez
https://codereview.chromium.org/1916083002/diff/40001/fpdfsdk/fpdfedit_embeddertest.cpp File fpdfsdk/fpdfedit_embeddertest.cpp (right): https://codereview.chromium.org/1916083002/diff/40001/fpdfsdk/fpdfedit_embeddertest.cpp#newcode67 fpdfsdk/fpdfedit_embeddertest.cpp:67: EXPECT_THAT(result, testing::MatchesRegex( Ooops. Need to make this match the ...
4 years, 8 months ago (2016-04-25 22:31:42 UTC) #11
etienneb
oups! :) https://codereview.chromium.org/1916083002/diff/40001/fpdfsdk/fpdfedit_embeddertest.cpp File fpdfsdk/fpdfedit_embeddertest.cpp (right): https://codereview.chromium.org/1916083002/diff/40001/fpdfsdk/fpdfedit_embeddertest.cpp#newcode67 fpdfsdk/fpdfedit_embeddertest.cpp:67: EXPECT_THAT(result, testing::MatchesRegex( On 2016/04/25 22:31:42, Tom Sepez ...
4 years, 8 months ago (2016-04-26 15:02:33 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916083002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916083002/60001
4 years, 8 months ago (2016-04-26 15:02:50 UTC) #15
commit-bot: I haz the power
4 years, 8 months ago (2016-04-26 15:13:49 UTC) #17
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://pdfium.googlesource.com/pdfium/+/7712c26b05c85399afbf8cb3d363836e678a...

Powered by Google App Engine
This is Rietveld 408576698