mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qian Zhang <zhq527...@gmail.com>
Subject Re: Review Request 59989: Added a test `ProtobufTest.JsonifyMap`.
Date Thu, 15 Mar 2018 02:39:28 GMT


> On March 2, 2018, 9:33 a.m., Benjamin Mahler wrote:
> > 3rdparty/stout/tests/protobuf_tests.cpp
> > Lines 675-676 (patched)
> > <https://reviews.apache.org/r/59989/diff/4/?file=1922649#file1922649line675>
> >
> >     Do you want to use a raw string literal here to avoid all the escaping? (6)
from here: http://en.cppreference.com/w/cpp/language/string_literal
> 
> Qian Zhang wrote:
>     Yeah, I thought that before. However I see all other protobuf tests in this file
are using `strings::remove()`, I think it may not appropriate to change them to use raw string
in this patch. How about I post a follow-up patch to change all of them?
> 
> Qian Zhang wrote:
>     Second thought, it seems we cannot do it in these tests, because raw string literal
will keep all the whitespaces and newlines, but `stringify(JSON::Object)` will not, so the
comparison between them in the test will always fail.

We can combine the use of raw string literal and `strings::remove()`, i.e., use `strings:remove()`
to remove the spaces and newlines in the raw string literal.

Here is the patch:
https://reviews.apache.org/r/66076/


- Qian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59989/#review198502
-----------------------------------------------------------


On March 6, 2018, 5:29 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59989/
> -----------------------------------------------------------
> 
> (Updated March 6, 2018, 5:29 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Benjamin Mahler, Chun-Hung Hsiao, and Zhitao
Li.
> 
> 
> Bugs: MESOS-7656
>     https://issues.apache.org/jira/browse/MESOS-7656
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ProtobufTest.JsonifyMap`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/tests/protobuf_tests.cpp be35ad0d1e16501df67752a1818f79751419a43d 
> 
> 
> Diff: https://reviews.apache.org/r/59989/diff/5/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message