Registry (unittests)

- Added unittest for `in` operator support
This commit is contained in:
Tristan B. Velloza Kildaire 2024-04-26 22:58:01 +02:00
parent fa80d17cd2
commit 4771d5fafe
1 changed files with 6 additions and 0 deletions

View File

@ -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