> On Nov. 14, 2012, 2:14 a.m., Ben Mahler wrote: > > src/tests/stout_tests.cpp, line 102 > > <https://reviews.apache.org/r/8043/diff/1/?file=189507#file189507line102> > > > > maybe throw in a few more tests: > > -replace.size() == 0 > > -from.size() > 1 > > > > and perhaps: > > -from.size() == 0 > > > > depending on what is supposed to happen in that case.
done > On Nov. 14, 2012, 2:14 a.m., Ben Mahler wrote: > > third_party/libprocess/include/stout/strings.hpp, line 63 > > <https://reviews.apache.org/r/8043/diff/1/?file=189509#file189509line63> > > > > Curious, what happens when search is empty? turns out the while loop never finished in that case! yikes! thanks for catching this. i think, we could either do an explicit CHECK(!find.empty()) or just return the original string. I opted for the latter. Now, I have my next interview question :) - Vinod ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/8043/#review13411 ----------------------------------------------------------- On Nov. 13, 2012, 10:24 p.m., Vinod Kone wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/8043/ > ----------------------------------------------------------- > > (Updated Nov. 13, 2012, 10:24 p.m.) > > > Review request for mesos, Benjamin Hindman and Ben Mahler. > > > Description > ------- > > Needed this while I was doing the refactor for properly cleaning up slave > work directories during tests. > > > Diffs > ----- > > src/tests/stout_tests.cpp efdb47f1d2401f9175a05fc65922d9ab7e383666 > src/tests/utils.cpp deef0bba1374cf8a8591813877a6170974d6de94 > third_party/libprocess/include/stout/strings.hpp > 914c280a994733764957d19f37b48d151bb93778 > > Diff: https://reviews.apache.org/r/8043/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Vinod Kone > >
