Run clang-format.

This commit is contained in:
Jesse Beder
2016-10-12 00:00:39 -05:00
parent 086fec5c35
commit b5b03bb9ad
10 changed files with 35 additions and 43 deletions

View File

@@ -14,10 +14,10 @@ using ::testing::Eq;
#define EXPECT_THROW_REPRESENTATION_EXCEPTION(statement, message) \
ASSERT_THROW(statement, RepresentationException); \
try { \
statement; \
try { \
statement; \
} catch (const RepresentationException& e) { \
EXPECT_EQ(e.msg, message); \
EXPECT_EQ(e.msg, message); \
}
namespace YAML {
@@ -132,7 +132,7 @@ TEST(NodeTest, ConstIteratorOnConstUndefinedNode) {
std::size_t count = 0;
for (const_iterator it = undefinedCn.begin(); it != undefinedCn.end(); ++it) {
count++;
}
}
EXPECT_EQ(0, count);
}
@@ -144,7 +144,8 @@ TEST(NodeTest, IteratorOnConstUndefinedNode) {
Node& nonConstUndefinedNode = const_cast<Node&>(undefinedCn);
std::size_t count = 0;
for (iterator it = nonConstUndefinedNode.begin(); it != nonConstUndefinedNode.end(); ++it) {
for (iterator it = nonConstUndefinedNode.begin();
it != nonConstUndefinedNode.end(); ++it) {
count++;
}
EXPECT_EQ(0, count);
@@ -163,7 +164,7 @@ TEST(NodeTest, SimpleSubkeys) {
}
TEST(NodeTest, StdArray) {
std::array<int, 5> evens {{ 2, 4, 6, 8, 10 }};
std::array<int, 5> evens{{2, 4, 6, 8, 10}};
Node node;
node["evens"] = evens;
std::array<int, 5> actualEvens = node["evens"].as<std::array<int, 5>>();
@@ -171,11 +172,11 @@ TEST(NodeTest, StdArray) {
}
TEST(NodeTest, StdArrayWrongSize) {
std::array<int, 3> evens {{ 2, 4, 6 }};
std::array<int, 3> evens{{2, 4, 6}};
Node node;
node["evens"] = evens;
EXPECT_THROW_REPRESENTATION_EXCEPTION((node["evens"].as<std::array<int, 5>>()),
ErrorMsg::BAD_CONVERSION);
EXPECT_THROW_REPRESENTATION_EXCEPTION(
(node["evens"].as<std::array<int, 5>>()), ErrorMsg::BAD_CONVERSION);
}
TEST(NodeTest, StdVector) {
@@ -189,7 +190,7 @@ TEST(NodeTest, StdVector) {
Node node;
node["primes"] = primes;
EXPECT_EQ(primes, node["primes"].as<std::vector<int> >());
EXPECT_EQ(primes, node["primes"].as<std::vector<int>>());
}
TEST(NodeTest, StdList) {
@@ -203,7 +204,7 @@ TEST(NodeTest, StdList) {
Node node;
node["primes"] = primes;
EXPECT_EQ(primes, node["primes"].as<std::list<int> >());
EXPECT_EQ(primes, node["primes"].as<std::list<int>>());
}
TEST(NodeTest, StdMap) {
@@ -216,7 +217,7 @@ TEST(NodeTest, StdMap) {
Node node;
node["squares"] = squares;
std::map<int, int> actualSquares = node["squares"].as<std::map<int, int> >();
std::map<int, int> actualSquares = node["squares"].as<std::map<int, int>>();
EXPECT_EQ(squares, actualSquares);
}
@@ -228,7 +229,7 @@ TEST(NodeTest, StdPair) {
Node node;
node["pair"] = p;
std::pair<int, std::string> actualP =
node["pair"].as<std::pair<int, std::string> >();
node["pair"].as<std::pair<int, std::string>>();
EXPECT_EQ(p, actualP);
}