mirror of https://github.com/deavmi/niknaks
Registry (unittests)
- Added unittest for `in` operator support
This commit is contained in:
parent
fa80d17cd2
commit
4771d5fafe
|
@ -490,7 +490,13 @@ unittest
|
|||
reg["age"] = 25;
|
||||
assert(cast(int)reg["age"] == 25);
|
||||
|
||||
// Obtain a handle on the configuration
|
||||
// entry, then update it and read it back
|
||||
// to confirm
|
||||
ConfigEntry* ageEntry = "age" in reg;
|
||||
*ageEntry = ConfigEntry.ofNumeric(69_420);
|
||||
assert(cast(int)reg["age"] == 69_420);
|
||||
|
||||
|
||||
// Should not be able to set entry it not yet existent
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue