59 checkSymbolCreation();
74 CHECK (
sizeof(
Literal) ==
sizeof(
char*));
77 CHECK (!isSameObject (li1,li2));
82 CHECK (
"string" == typeStr (li1 +
string{
"night"}));
83 CHECK (
"string" == typeStr (
string{
"minus " +li1}));
84 cout << li1 +
string{
"night"} << endl;
85 cout <<
string{
"minus " +li1} << endl;
86 cout << li2+string(
"..") << string(
"..")+li2 << endl;
103 CHECK (!isnil (nnn));
108 checkSymbolCreation()
115 CHECK (not isSameObject (l1,sy1));
116 CHECK (not isSameObject (sy1,sy2));
117 CHECK (l1.c() != sy1.c());
118 CHECK (sy1.c() == sy2.c());
127 CHECK (sy3 ==
Symbol{
"⟂"});
128 CHECK (sy3.c() ==
Symbol{
"⟂"}.c());
132 CHECK (Symbol::EMPTY ==
Symbol{
""});
133 CHECK (Symbol::BOTTOM ==
Symbol{
"⟂"});
134 CHECK (Symbol::EMPTY != Symbol::BOTTOM);
135 CHECK (
Symbol{
nullptr} == Symbol::BOTTOM);
136 CHECK (Symbol::EMPTY.empty());
137 CHECK (Symbol::BOTTOM.empty());
138 CHECK (not Symbol::FAILURE.empty());
139 CHECK (isnil (
Symbol{
"⟂"}));
140 CHECK (isnil (
Symbol{
""}));
148 CHECK (sy4 ==
"1.11");
149 CHECK (not isSameObject(sy4.c(),
"1.11"));
150 CHECK (sy4.c() ==
Symbol{
"1.11"}.c());
151 CHECK (sy4.c() == (
const char*)sy4);
159 const char* s1 =
"1";
160 const char* s3 =
"11";
161 const char* s2 = s3+1;
183 CHECK (not isSameObject(l1, l2));
184 CHECK (not isSameObject(l1.c(), l2.c()));
191 CHECK (y1.c() == y2.c());
192 CHECK (not isSameObject (y1.c(), y2.c()));
193 CHECK ( isSameObject (*y1.c(), *y2.c()));
199 CHECK (y1 == l1); CHECK (l1 == y1);
200 CHECK (y1 == s1); CHECK (s1 == y1);
201 CHECK (y1 == l2); CHECK (l2 == y1);
202 CHECK (y1 == s2); CHECK (s2 == y1);
203 CHECK (y3 != l1); CHECK (l1 != y3);
204 CHECK (y3 != s1); CHECK (s1 != y3);
205 CHECK (y3 != l2); CHECK (l2 != y3);
206 CHECK (y3 != s2); CHECK (s2 != y3);
219 map<Literal, int> mli;
220 map<Symbol, int> myi;
221 map<string, int> msi;
225 string s1{y1}, s2{
"2"};
227 mli[l1] = 1; myi[y1] = 1; msi[s1] = 1;
228 mli[l2] = 2; myi[y2] = 2; msi[s2] = 2;
230 CHECK (mli[l1] == 1);
231 CHECK (mli[l2] == 2);
232 CHECK (myi[y1] == 1);
233 CHECK (myi[y2] == 2);
234 CHECK (msi[s1] == 1);
235 CHECK (msi[s2] == 2);
237 const char* x =
"11";
inline string literal This is a marker type to indicate that
string showSizeof(size_t siz, string name)
for printing sizeof().
Implementation namespace for support and library code.
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 isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities. ...