Commit 92a80477 authored by Martin Thomson's avatar Martin Thomson

Bug 1162897 - Use braces, a=bustage

parent 4563164a
......@@ -32,12 +32,16 @@ class PK11URITest : public ::testing::Test {
for (i = 0; i < num_pattrs; i++) {
const char *value = PK11URI_GetPathAttribute(tmp.get(), pattrs[i].name);
EXPECT_TRUE(value);
if (value) EXPECT_EQ(std::string(value), std::string(pattrs[i].value));
if (value) {
EXPECT_EQ(std::string(value), std::string(pattrs[i].value));
}
}
for (i = 0; i < num_qattrs; i++) {
const char *value = PK11URI_GetQueryAttribute(tmp.get(), qattrs[i].name);
EXPECT_TRUE(value);
if (value) EXPECT_EQ(std::string(value), std::string(qattrs[i].value));
if (value) {
EXPECT_EQ(std::string(value), std::string(qattrs[i].value));
}
}
}
......@@ -49,7 +53,9 @@ class PK11URITest : public ::testing::Test {
ASSERT_TRUE(tmp);
char *out = PK11URI_FormatURI(nullptr, tmp.get());
EXPECT_TRUE(out);
if (out) EXPECT_EQ(std::string(out), formatted);
if (out) {
EXPECT_EQ(std::string(out), formatted);
}
PORT_Free(out);
}
......@@ -68,12 +74,16 @@ class PK11URITest : public ::testing::Test {
for (i = 0; i < num_pattrs; i++) {
const char *value = PK11URI_GetPathAttribute(tmp.get(), pattrs[i].name);
EXPECT_TRUE(value);
if (value) EXPECT_EQ(std::string(value), std::string(pattrs[i].value));
if (value) {
EXPECT_EQ(std::string(value), std::string(pattrs[i].value));
}
}
for (i = 0; i < num_qattrs; i++) {
const char *value = PK11URI_GetQueryAttribute(tmp.get(), qattrs[i].name);
EXPECT_TRUE(value);
if (value) EXPECT_EQ(std::string(value), std::string(qattrs[i].value));
if (value) {
EXPECT_EQ(std::string(value), std::string(qattrs[i].value));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment