26 #include <boost/functional/hash.hpp> 27 #include <unordered_map> 52 typedef std::unordered_map< Symbol, string, hash<Symbol>> HTable;
73 table[KEY1] = string (KEY1);
74 table[KEY2] = string (KEY2);
75 table[KEY3] = string (KEY3);
76 table[KEY4] = string (KEY4);
78 CHECK (!isnil(table));
79 CHECK (4 == table.size());
80 CHECK (contains (table, KEY1));
81 CHECK (contains (table, KEY2));
82 CHECK (contains (table, KEY3));
83 CHECK (contains (table, KEY4));
84 CHECK (!contains (table, KEY5));
86 CHECK (
string (KEY1) == table[KEY1]);
87 CHECK (
string (KEY2) == table[KEY2]);
88 CHECK (
string (KEY3) == table[KEY3]);
89 CHECK (
string (KEY4) == table[KEY4]);
92 CHECK (
string(KEY3) != table[KEY3]);
93 CHECK (
string(KEY3)+
"..." == table[KEY3]);
95 CHECK (isnil (table[KEY5]));
96 CHECK (5 == table.size());
105 string copy1(random);
108 string copy2(random);
116 Literal l52 (random.substr(0,5).c_str());
inline string literal This is a marker type to indicate that
int rani(uint bound=_iBOUND())
const size_t STRING_MAX_RELEVANT
safety guard: maximum number of chars to process.
Implementation namespace for support and library code.
string randStr(size_t len)
create garbage string of given length
Token or Atom with distinct identity.
Marker types to indicate a literal string and a Symbol.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
A collection of frequently used helper functions to support unit testing.
HashVal hash_value(QueryText const &entry)
support using queries in hashtables.
bool contains(SEQ const &cont, typename SEQ::const_reference val)
shortcut for brute-force containment test in any sequential container