projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure curly-braces around control-flow
[folly.git]
/
folly
/
test
/
sorted_vector_test.cpp
diff --git
a/folly/test/sorted_vector_test.cpp
b/folly/test/sorted_vector_test.cpp
index 0dcd8d006644c94b9dd4420f8f47429fd21c5878..834ed4cbedd7136bee33bfc14e7218c36ff83a11 100644
(file)
--- a/
folly/test/sorted_vector_test.cpp
+++ b/
folly/test/sorted_vector_test.cpp
@@
-39,8
+39,9
@@
template <class Container>
void check_invariant(Container& c) {
auto it = c.begin();
auto end = c.end();
void check_invariant(Container& c) {
auto it = c.begin();
auto end = c.end();
- if (it == end)
+ if (it == end)
{
return;
return;
+ }
auto prev = it;
++it;
for (; it != end; ++it, ++prev) {
auto prev = it;
++it;
for (; it != end; ++it, ++prev) {
@@
-267,13
+268,15
@@
TEST(SortedVectorTypes, InitializerLists) {
TEST(SortedVectorTypes, CustomCompare) {
sorted_vector_set<int,less_invert<int> > s;
TEST(SortedVectorTypes, CustomCompare) {
sorted_vector_set<int,less_invert<int> > s;
- for (int i = 0; i < 200; ++i)
+ for (int i = 0; i < 200; ++i)
{
s.insert(i);
s.insert(i);
+ }
check_invariant(s);
sorted_vector_map<int,float,less_invert<int> > m;
check_invariant(s);
sorted_vector_map<int,float,less_invert<int> > m;
- for (int i = 0; i < 200; ++i)
+ for (int i = 0; i < 200; ++i)
{
m[i] = 12.0;
m[i] = 12.0;
+ }
check_invariant(m);
}
check_invariant(m);
}