mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <klue...@gmail.com>
Subject Re: Review Request 49673: Fixed a bug in JSON::Object.find: array subscript is dropped.
Date Wed, 06 Jul 2016 04:34:25 GMT

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




3rdparty/stout/tests/json_tests.cpp (line 340)
<https://reviews.apache.org/r/49673/#comment206313>

    Maybe we should add a test here to explicitly test for the case wher the nested lookup
is on a `null` value and it has a subscript, e.g.:
    
    ```
      EXPECT_ERROR(object.find<JSON::String>("nested1.nested3[1].string"));
    ```


- Kevin Klues


On July 6, 2016, 12:34 a.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49673/
> -----------------------------------------------------------
> 
> (Updated July 6, 2016, 12:34 a.m.)
> 
> 
> Review request for mesos, Joseph Wu and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a subscript is used on a non-array type, this was not being
> treated as an error. The tests introduced show some examples.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/json.hpp 829838ba95702b536f6badc9ac14fb483668d016 
>   3rdparty/stout/tests/json_tests.cpp 12eaf8e10ea5d1d661975e518ec7f30886b66c0a 
> 
> Diff: https://reviews.apache.org/r/49673/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>


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