File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,11 @@ class symbol_table_baset
144144 typedef symbolst::const_iterator::reference reference; // NOLINT
145145 typedef symbolst::iterator::iterator_category iterator_category; // NOLINT
146146
147+ bool operator !=(const iteratort &other) const
148+ {
149+ return it != other.it ;
150+ }
151+
147152 bool operator ==(const iteratort &other) const
148153 {
149154 return it == other.it ;
Original file line number Diff line number Diff line change 55#include < testing-utils/catch.hpp>
66#include < util/journalling_symbol_table.h>
77
8+ TEST_CASE (" Iterating through a symbol table" , " [core][utils][symbol_tablet]" )
9+ {
10+ symbol_tablet symbol_table;
11+
12+ symbolt symbol;
13+ irep_idt symbol_name = " Test" ;
14+ symbol.name = symbol_name;
15+
16+ symbol_table.insert (symbol);
17+
18+ int counter = 0 ;
19+ for (auto &entry : symbol_table)
20+ {
21+ ++counter;
22+ }
23+
24+ REQUIRE (counter == 1 );
25+ }
26+
827SCENARIO (" journalling_symbol_table_writer" ,
928 " [core][utils][journalling_symbol_table_writer]" )
1029{
You can’t perform that action at this time.
0 commit comments