Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29685634: Noissue - Allow displaying String in tests (Closed)

Created:
Jan. 31, 2018, 8:45 p.m. by hub
Modified:
Feb. 5, 2018, 2:51 p.m.
Reviewers:
sergei
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

Noissue - Allow displaying String in tests

Patch Set 1 #

Total comments: 7

Patch Set 2 : Add utf8 conversion #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -1 line) Patch
M compiled/String.h View 1 4 chunks +27 lines, -0 lines 0 comments Download
M meson.build View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
hub
Jan. 31, 2018, 8:45 p.m. (2018-01-31 20:45:07 UTC) #1
hub
It doesn't handle non-ASCII properly but it's good enough to *display* from TEST_EQ().
Jan. 31, 2018, 8:47 p.m. (2018-01-31 20:47:36 UTC) #2
sergei
https://codereview.adblockplus.org/29685634/diff/29685635/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29685634/diff/29685635/compiled/String.h#newcode24 compiled/String.h:24: #include <iostream> Could you please wrap it by #ifdef ...
Feb. 1, 2018, 4:10 p.m. (2018-02-01 16:10:46 UTC) #3
hub
https://codereview.adblockplus.org/29685634/diff/29685635/compiled/String.h File compiled/String.h (right): https://codereview.adblockplus.org/29685634/diff/29685635/compiled/String.h#newcode24 compiled/String.h:24: #include <iostream> On 2018/02/01 16:10:46, sergei wrote: > Could ...
Feb. 1, 2018, 7:16 p.m. (2018-02-01 19:16:30 UTC) #4
sergei
Feb. 2, 2018, 3:03 p.m. (2018-02-02 15:03:32 UTC) #5
LGTM

https://codereview.adblockplus.org/29685634/diff/29685635/compiled/String.h
File compiled/String.h (right):

https://codereview.adblockplus.org/29685634/diff/29685635/compiled/String.h#n...
compiled/String.h:271: inline std::ostream& operator<<(std::ostream& os, const
DependentString& str)
On 2018/02/01 19:16:30, hub wrote:
> On 2018/02/01 16:10:46, sergei wrote:
> > It should not be required.
> 
> Without this it operator<< doesn't get called, unless I actually cast to const
> String& on the TEST_EQ() call.
> 
> To be complete I'd need to do the same for OwnedString.

Acknowledged. I think it is worth investigation, because it's strange. BTW, I
have tried PrintTo and it does not work at all.

Powered by Google App Engine
This is Rietveld