// 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
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.
EXPECT_EQ(Data2, toReference(DieDG.find(Attr_DW_FORM_ref2), 0));
EXPECT_EQ(Data4, toReference(DieDG.find(Attr_DW_FORM_ref4), 0));
EXPECT_EQ(Data8, toReference(DieDG.find(Attr_DW_FORM_ref8), 0));
- if (Version >= 4)
+ if (Version >= 4) {
EXPECT_EQ(Data8_2, toReference(DieDG.find(Attr_DW_FORM_ref_sig8), 0));
+ }
EXPECT_EQ(UData[0], toReference(DieDG.find(Attr_DW_FORM_ref_udata), 0));
//----------------------------------------------------------------------
//----------------------------------------------------------------------
EXPECT_EQ(1ULL, toUnsigned(DieDG.find(Attr_DW_FORM_flag_true), 0));
EXPECT_EQ(0ULL, toUnsigned(DieDG.find(Attr_DW_FORM_flag_false), 1));
- if (Version >= 4)
+ if (Version >= 4) {
EXPECT_EQ(1ULL, toUnsigned(DieDG.find(Attr_DW_FORM_flag_present), 0));
+ }
//----------------------------------------------------------------------
// Test SLEB128 based forms
//----------------------------------------------------------------------
EXPECT_EQ(SData, toSigned(DieDG.find(Attr_DW_FORM_sdata), 0));
- if (Version >= 5)
+ if (Version >= 5) {
EXPECT_EQ(ICSData, toSigned(DieDG.find(Attr_DW_FORM_implicit_const), 0));
+ }
//----------------------------------------------------------------------
// Test ULEB128 based forms
//----------------------------------------------------------------------
EXPECT_EQ(Dwarf32Values[0],
toReference(DieDG.find(Attr_DW_FORM_GNU_ref_alt), 0));
- if (Version >= 4)
+ if (Version >= 4) {
EXPECT_EQ(Dwarf32Values[1],
toSectionOffset(DieDG.find(Attr_DW_FORM_sec_offset), 0));
+ }
//----------------------------------------------------------------------
// Add an address at the end to make sure we can decode this value
parse(Input, Saver, Actual, /*MarkEOLs=*/false);
EXPECT_EQ(OutputSize, Actual.size());
for (unsigned I = 0, E = Actual.size(); I != E; ++I) {
- if (I < OutputSize)
+ if (I < OutputSize) {
EXPECT_STREQ(Output[I], Actual[I]);
+ }
}
}
EXPECT_FALSE(Opt1);
EXPECT_FALSE(Opt2);
for (auto *S : cl::getRegisteredSubcommands()) {
- if (*S)
+ if (*S) {
EXPECT_EQ("sc1", S->getName());
+ }
}
cl::ResetAllOptionOccurrences();
EXPECT_FALSE(Opt1);
EXPECT_FALSE(Opt2);
for (auto *S : cl::getRegisteredSubcommands()) {
- if (*S)
+ if (*S) {
EXPECT_EQ("sc2", S->getName());
+ }
}
}