Lumiera  0.pre.03
»edit your freedom«
Symbol_test Class Reference

Description

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 61 of file symbol-test.cpp.

Private Member Functions

void checkComparisons ()
 
void checkEmptyLiteral ()
 
void checkLiteral ()
 
void checkSymbolCreation ()
 
virtual void run (Arg)
 
void use_as_map_key ()
 

Member Function Documentation

◆ use_as_map_key()

void use_as_map_key ( )
inlineprivate
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 226 of file symbol-test.cpp.

+ Inheritance diagram for Symbol_test:
+ Collaboration diagram for Symbol_test:

The documentation for this class was generated from the following file: