summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT')
-rw-r--r--llvm/unittests/ADT/SCCIteratorTest.cpp6
-rw-r--r--llvm/unittests/ADT/StringRefTest.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/llvm/unittests/ADT/SCCIteratorTest.cpp b/llvm/unittests/ADT/SCCIteratorTest.cpp
index ca6d84ed2f3..57a999bea9d 100644
--- a/llvm/unittests/ADT/SCCIteratorTest.cpp
+++ b/llvm/unittests/ADT/SCCIteratorTest.cpp
@@ -63,8 +63,9 @@ TEST(SCCIteratorTest, AllSmallGraphs) {
// Check that every node in the SCC is reachable from every other node in
// the SCC.
for (unsigned i = 0; i != NUM_NODES; ++i)
- if (NodesInThisSCC.count(i))
+ if (NodesInThisSCC.count(i)) {
EXPECT_TRUE(NodesInThisSCC.isSubsetOf(G.NodesReachableFrom(i)));
+ }
// OK, now that we now that every node in the SCC is reachable from every
// other, this means that the set of nodes reachable from any node in the
@@ -78,8 +79,9 @@ TEST(SCCIteratorTest, AllSmallGraphs) {
NodesReachableFromSCC.Meet(NodesInThisSCC.Complement());
for (unsigned j = 0; j != NUM_NODES; ++j)
- if (ReachableButNotInSCC.count(j))
+ if (ReachableButNotInSCC.count(j)) {
EXPECT_TRUE(G.NodesReachableFrom(j).Meet(NodesInThisSCC).isEmpty());
+ }
// The result must be the same for all other nodes in this SCC, so
// there is no point in checking them.
diff --git a/llvm/unittests/ADT/StringRefTest.cpp b/llvm/unittests/ADT/StringRefTest.cpp
index e308f2d7c64..0684afe678f 100644
--- a/llvm/unittests/ADT/StringRefTest.cpp
+++ b/llvm/unittests/ADT/StringRefTest.cpp
@@ -882,8 +882,9 @@ TEST(StringRefTest, getAsDouble) {
double Result;
StringRef S(Entry.Str);
EXPECT_EQ(Entry.ShouldFail, S.getAsDouble(Result, Entry.AllowInexact));
- if (!Entry.ShouldFail)
+ if (!Entry.ShouldFail) {
EXPECT_EQ(Result, Entry.D);
+ }
}
}
OpenPOWER on IntegriCloud