----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69601/#review211695 -----------------------------------------------------------
Fix it, then Ship it! Much easier to read the tests now, thanks! src/common/resources.cpp Lines 1518 (patched) <https://reviews.apache.org/r/69601/#comment297193> foreach ( src/common/resources.cpp Lines 1520-1522 (patched) <https://reviews.apache.org/r/69601/#comment297192> Maybe: ``` foreach (const Resource& r, get(quantity.first)) { ``` src/tests/resources_tests.cpp Lines 2070-2074 (patched) <https://reviews.apache.org/r/69601/#comment297196> Why not do the same thing as set? 3,2,1 to test the boundaries? src/tests/resources_tests.cpp Lines 2112 (patched) <https://reviews.apache.org/r/69601/#comment297197> newline above this? src/tests/resources_tests.cpp Lines 2128 (patched) <https://reviews.apache.org/r/69601/#comment297198> newline above this? src/v1/resources.cpp Lines 1536 (patched) <https://reviews.apache.org/r/69601/#comment297194> foreach ( src/v1/resources.cpp Lines 1538-1540 (patched) <https://reviews.apache.org/r/69601/#comment297195> Maybe: ``` foreach (const Resource& r, get(quantity.first)) { ``` - Benjamin Mahler On Jan. 4, 2019, 8:16 p.m., Meng Zhu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69601/ > ----------------------------------------------------------- > > (Updated Jan. 4, 2019, 8:16 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Repository: mesos > > > Description > ------- > > This method checks if the quantities of this `Resources` is a > superset of the given `ResourceQuantities`. If a `Resource` object > is `SCALAR` type, its quantity is its scalar value. For `RANGES` > and `SET` type, their quantities are the number of different > instances in the range or set. For example, "range:[1-5]" has a > quantity of 5 and "set:{a,b}" has a quantity of 2. > > Also added a dedicated test. > > > Diffs > ----- > > include/mesos/resources.hpp 36ccf0e1135ce15898d31db51c80fa7b5826907b > include/mesos/v1/resources.hpp 1a9ea44e78d985286e04e040879d022838ddcc3f > src/common/resources.cpp 758b5a2fac101bfb0a07ba76c204b02d1554b3ac > src/tests/resources_tests.cpp 5337a5c9af9431cc1c7822c78945ffc369488900 > src/v1/resources.cpp d717f5327a45cfe9bc075bc3acf37316223d389d > > > Diff: https://reviews.apache.org/r/69601/diff/3/ > > > Testing > ------- > > make check > > > Thanks, > > Meng Zhu > >
