fixup! Implementation of Lengauer-Tarjan algorithm to find dominators

This commit is contained in:
Kamil Śliwak
2023-09-22 14:49:15 +02:00
committed by r0qs
parent d5dbab0b91
commit bf938d2712
+3 -3
View File
@@ -28,12 +28,12 @@ namespace solidity::yul::test
struct ImmediateDominatorTest
{
struct Vertex {
std::string data;
std::string name;
std::vector<Vertex*> successors;
bool operator<(Vertex const& _other) const
{
return data < _other.data;
return name < _other.name;
}
};
@@ -457,7 +457,7 @@ BOOST_FIXTURE_TEST_CASE(immediate_dominator, DominatorFixture)
> dominatorFinder(*test->entry, test->numVertices);
for (auto const&[v, idx]: dominatorFinder.vertexIndices())
BOOST_CHECK(test->expectedDFSIndices.at(v.data) == idx);
BOOST_CHECK(test->expectedDFSIndices.at(v.name) == idx);
BOOST_TEST(dominatorFinder.immediateDominators() == test->expectedIdom);
}
}