- Test:
- properties of Literal and Symbol data types.
- a lib::Literal is just a thin wrapper for a
const char *
- lib::Symbol uses the same implementation, but relies on character string constants interned into a symbol table.
- Todo:
- 2023 this test is very much in preliminary shape, as the implementation of a real symbol table remains was lacking. At some point, a simplistic implementation of »interned strings« was added (TICKET #157) — yet still the actual relevance of unique Symbols remains nebulous
Definition at line 52 of file symbol-test.cpp.
|
void | checkComparisons () |
|
void | checkEmptyLiteral () |
|
void | checkLiteral () |
|
void | checkSymbolCreation () |
|
virtual void | run (Arg) |
|
void | use_as_map_key () |
|
◆ use_as_map_key()
- Test:
- use Literal and Symbol as keys in a tree map.
- Note
- neither Literal, nor Symbol defines an
operator<
so the map specialisation has to fall back on const char*, which are compared based on pointer identity. Contrast this with std::string, which does define its own ordering.
Definition at line 217 of file symbol-test.cpp.
The documentation for this class was generated from the following file: