mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 68242: Added tests for `Resources` move semantics.
Date Mon, 06 Aug 2018 21:27:11 GMT

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




src/tests/resources_tests.cpp
Lines 800 (patched)
<https://reviews.apache.org/r/68242/#comment290044>

    I think `MoveConstruction` could the name for this and we only test all the move flavors
(Resource, vector, repeated ptr field, Resources), so a bit of a merging of the two tests
you have here.
    
    It seems we should test addition separately per my other comment.



src/tests/resources_tests.cpp
Line 1069 (original), 1136 (patched)
<https://reviews.apache.org/r/68242/#comment290043>

    Is it possible to instead augment any existing tests of addition (e.g. this one) to also
do rvalue addition? It should be pretty easy?
    
    E.g. here we could have r2 use += of rvalues, and have different sums as well:
    
    ```
      Resources sum1 = r1 + r2;
      Resources sum2 = Resources(r1) + r2;
      Resources sum3 = r1 + Resources(r2);
      Resources sum4 = Resources(r1) + Resources(r2);
    ```


- Benjamin Mahler


On Aug. 6, 2018, 7:01 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68242/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2018, 7:01 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9110
>     https://issues.apache.org/jira/browse/MESOS-9110
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   src/tests/resources_tests.cpp 9475b6ea014434b8d9c7a5c1ba793cd78b10536b 
> 
> 
> Diff: https://reviews.apache.org/r/68242/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


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