Skip to content

Commit 4ae8eb6

Browse files
committed
Move sharing map friends declarations to unit tests
1 parent 186897c commit 4ae8eb6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/util/sharing_map.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ template <class keyT,
130130
class sharing_mapt
131131
{
132132
public:
133-
friend void sharing_map_interface_test();
134-
friend void sharing_map_copy_test();
135-
friend void sharing_map_collision_test();
136-
friend void sharing_map_view_test();
137-
friend void sharing_map_sharing_stats_test();
138-
139133
~sharing_mapt()
140134
{
141135
}

unit/util/sharing_map.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ Author: Daniel Poetzl
1616
#include <testing-utils/catch.hpp>
1717
#include <util/sharing_map.h>
1818

19-
typedef sharing_mapt<irep_idt, std::string, irep_id_hash> smt;
19+
class smt : public sharing_mapt<irep_idt, std::string, irep_id_hash>
20+
{
21+
friend void sharing_map_interface_test();
22+
friend void sharing_map_copy_test();
23+
friend void sharing_map_collision_test();
24+
friend void sharing_map_view_test();
25+
friend void sharing_map_sharing_stats_test();
26+
};
2027

2128
// helpers
2229
void fill(smt &sm)

0 commit comments

Comments
 (0)