diff --git a/source/readconf.d b/source/readconf.d index ac6e942..42cdcf8 100644 --- a/source/readconf.d +++ b/source/readconf.d @@ -28,7 +28,7 @@ private: */ @property bool empty() { - return this.property.length = 0; + return this.property.length == 0; } /** diff --git a/tests/test.d b/tests/test.d index 9187e15..280c692 100644 --- a/tests/test.d +++ b/tests/test.d @@ -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"); }