fix empty key

This commit is contained in:
Alexander Zhirov 2023-03-24 08:56:02 +03:00
parent 391ba8e797
commit d7341373d4
2 changed files with 3 additions and 5 deletions

View File

@ -28,7 +28,7 @@ private:
*/
@property bool empty()
{
return this.property.length = 0;
return this.property.length == 0;
}
/**

View File

@ -13,10 +13,8 @@ unittest
assert(Config.file.key("value7") == "1234567890");
assert(Config.file.key("value8") == "12345.67890");
assert(Config.file.key("value9") == "You can use large margins");
assert(!Config.file.key("value10").empty);
assert(Config.file.key("value10") == "");
assert(!Config.file.key("value11").empty);
assert(Config.file.key("value11") == "");
assert(Config.file.key("value10").empty);
assert(Config.file.key("value11").empty);
assert(Config.file.key("value12") == "//path");
}