/*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
//
// Author: andrei.alexandrescu@fb.com
-#include <folly/Foreach.h>
-#include <folly/Traits.h>
-#include <folly/Random.h>
-#include <folly/FBString.h>
#include <folly/FBVector.h>
-#include <folly/portability/GTest.h>
#include <list>
#include <map>
#include <memory>
+
#include <boost/random.hpp>
+#include <folly/FBString.h>
+#include <folly/Foreach.h>
+#include <folly/Random.h>
+#include <folly/Traits.h>
+#include <folly/portability/GTest.h>
+
using namespace std;
using namespace folly;
str.resize(strlen(str.c_str()));
}
-template<class T> T randomObject();
+template <class T> T randomObject();
-template<> int randomObject<int>() {
+template <> int randomObject<int>() {
return random(0, 1024);
}
}
TEST(fbvector, clause_23_3_6_4_ambiguity) {
fbvector<int> v;
- fbvector<int>::const_iterator i = v.end();
- v.insert(i, 10, 20);
+ fbvector<int>::const_iterator it = v.end();
+ v.insert(it, 10, 20);
EXPECT_EQ(v.size(), 10);
- FOR_EACH (i, v) {
- EXPECT_EQ(*i, 20);
+ for (auto i : v) {
+ EXPECT_EQ(i, 20);
}
}