- Test:
- proof-of-concept test for a combined symbolic and hash based ID.
- create some symbolic IDs
- check default assignment works properly
- check comparisons
- check hashing
- use the embedded hash ID (LUID) as hashtable key
- See also
- lib::HashIndexed::Id
-
mobject::Placement real world usage example
Definition at line 83 of file entry-id-test.cpp.
|
void | buildHashtable () |
|
void | checkBasicProperties () |
|
void | checkComparisions () |
|
void | checkCreation () |
|
void | checkErasure () |
|
virtual void | run (Arg) |
|
|
static bool | checkForHashCollision (string const &key, string const &val) |
|
static bool | verifyEntry (Hashtable::value_type entry) |
|
◆ checkErasure()
- Test:
- handling of EntryIDs through their common base class, which means erasing the specific type information.
While this type information can't be recovered after erasure, we can try to upcast back to a known type; this upcast is safe, because the embedded hash-ID is based on the type info.
Definition at line 220 of file entry-id-test.cpp.
References BareEntryID::recast(), and VERIFY_ERROR.
◆ buildHashtable()
- Test:
- build a hashtable, using EntryID as key, thereby using the embedded hash-ID
- Note
- there is a known weakness of the boost::hash when used on IDs with a running number suffix. /////TICKET #587 We use a trick to spread the numbers better.
- See also
- HashGenerator_test::verify_Knuth_workaround
Definition at line 282 of file entry-id-test.cpp.
The documentation for this class was generated from the following file: