> On Feb. 27, 2019, 8:34 a.m., Benjamin Mahler wrote: > > src/tests/resource_quantities_tests.cpp > > Lines 207-220 (patched) > > <https://reviews.apache.org/r/70063/diff/1/?file=2127056#file2127056line207> > > > > It feels like we could make the test quite succinct with some test > > lambdas? > > > > ``` > > quantities = from("apus:1;cpus:10.1") - from("cpus:1;mem:100"); > > > > EXPECT_EQ({{"apus", 1}, {"cpus", 1}, {"mem", 1}}, asVector(quantities)); > > ```
Thanks. Introduced a helper and refactored existing tests in https://reviews.apache.org/r/70069/. > On Feb. 27, 2019, 8:34 a.m., Benjamin Mahler wrote: > > src/tests/resource_quantities_tests.cpp > > Lines 235 (patched) > > <https://reviews.apache.org/r/70063/diff/1/?file=2127056#file2127056line235> > > > > We should probably assert all sizes in these tests since the subsequent > > lines can crash if the size is violated. No longer need to the size after introducing the helper. Dropping. - Meng ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70063/#review213259 ----------------------------------------------------------- On Feb. 26, 2019, 5:30 p.m., Meng Zhu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70063/ > ----------------------------------------------------------- > > (Updated Feb. 26, 2019, 5:30 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Bugs: MESOS-9608 > https://issues.apache.org/jira/browse/MESOS-9608 > > > Repository: mesos > > > Description > ------- > > Added tests for `+=` and `-=` operators. > > > Diffs > ----- > > src/tests/resource_quantities_tests.cpp > 435a4949b95e9a83be73781388eb4be9c7da695b > > > Diff: https://reviews.apache.org/r/70063/diff/2/ > > > Testing > ------- > > make check > > > Thanks, > > Meng Zhu > >
