Skip to content

Commit 9e348b7

Browse files
committed
Fix sharing map unit tests bug that assumed that irep_idts are lexicographically ordered
1 parent 560ecc9 commit 9e348b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

unit/util/sharing_map.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ TEST_CASE("Sharing map views and iteration", "[core][util]")
309309

310310
SECTION("View")
311311
{
312-
typedef std::pair<dstringt, std::string> pt;
312+
typedef std::pair<std::string, std::string> pt;
313313

314314
sharing_map_standardt sm;
315315
sharing_map_standardt::viewt view;
@@ -319,7 +319,7 @@ TEST_CASE("Sharing map views and iteration", "[core][util]")
319319
pairs.clear();
320320
for(auto &p : view)
321321
{
322-
pairs.push_back({p.first, p.second});
322+
pairs.push_back({id2string(p.first), p.second});
323323
}
324324
std::sort(pairs.begin(), pairs.end());
325325
};
@@ -354,11 +354,11 @@ TEST_CASE("Sharing map views and iteration", "[core][util]")
354354
sharing_map_standardt sm;
355355
fill(sm);
356356

357-
typedef std::pair<dstringt, std::string> pt;
357+
typedef std::pair<std::string, std::string> pt;
358358
std::vector<pt> pairs;
359359

360360
sm.iterate([&pairs](const irep_idt &key, const std::string &value) {
361-
pairs.push_back({key, value});
361+
pairs.push_back({id2string(key), value});
362362
});
363363

364364
std::sort(pairs.begin(), pairs.end());

0 commit comments

Comments
 (0)