X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2Ftest%2Fsorted_vector_test.cpp;h=834ed4cbedd7136bee33bfc14e7218c36ff83a11;hp=0dcd8d006644c94b9dd4420f8f47429fd21c5878;hb=7ebe7c2a249de44209e8bcc453e1a70bafd4ed19;hpb=bfa61031d36f41aaa907d40371c28ac0e84c8e0d diff --git a/folly/test/sorted_vector_test.cpp b/folly/test/sorted_vector_test.cpp index 0dcd8d00..834ed4cb 100644 --- a/folly/test/sorted_vector_test.cpp +++ b/folly/test/sorted_vector_test.cpp @@ -39,8 +39,9 @@ template void check_invariant(Container& c) { auto it = c.begin(); auto end = c.end(); - if (it == end) + if (it == end) { return; + } auto prev = it; ++it; for (; it != end; ++it, ++prev) { @@ -267,13 +268,15 @@ TEST(SortedVectorTypes, InitializerLists) { TEST(SortedVectorTypes, CustomCompare) { sorted_vector_set > s; - for (int i = 0; i < 200; ++i) + for (int i = 0; i < 200; ++i) { s.insert(i); + } check_invariant(s); sorted_vector_map > m; - for (int i = 0; i < 200; ++i) + for (int i = 0; i < 200; ++i) { m[i] = 12.0; + } check_invariant(m); }