summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfs_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-08 01:22:43 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-08 01:22:43 +0300
commit34a83475636164cf43551d9ec83ec30da5a7e7f2 (patch)
treec6b3e22f789422e06a96c2ca87dd94fc61eb1dd1 /src/fs/virtfs/virtfs_unittest.cc
parentaf4fcff19a986990d58c50c62bc498690c8293b8 (diff)
downloadManaVerse-34a83475636164cf43551d9ec83ec30da5a7e7f2.tar.gz
ManaVerse-34a83475636164cf43551d9ec83ec30da5a7e7f2.tar.bz2
ManaVerse-34a83475636164cf43551d9ec83ec30da5a7e7f2.tar.xz
ManaVerse-34a83475636164cf43551d9ec83ec30da5a7e7f2.zip
Replace size() to empty() where is possible
Diffstat (limited to 'src/fs/virtfs/virtfs_unittest.cc')
-rw-r--r--src/fs/virtfs/virtfs_unittest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/fs/virtfs/virtfs_unittest.cc b/src/fs/virtfs/virtfs_unittest.cc
index 705f68ad8..3305c0264 100644
--- a/src/fs/virtfs/virtfs_unittest.cc
+++ b/src/fs/virtfs/virtfs_unittest.cc
@@ -295,7 +295,7 @@ TEST_CASE("VirtFs enumerateFiles1", "")
list = VirtFs::enumerateFiles("test/units.xml");
removeTemp(list->names);
- REQUIRE(list->names.size() == 0);
+ REQUIRE(list->names.empty());
VirtFs::freeList(list);
VirtFs::unmountDirSilent("data");
@@ -634,8 +634,8 @@ TEST_CASE("VirtFs getRealDir1", "")
{
logger = new Logger();
const std::string sep = dirSeparator;
- REQUIRE(VirtFs::getRealDir(".") == "");
- REQUIRE(VirtFs::getRealDir("..") == "");
+ REQUIRE(VirtFs::getRealDir(".").empty());
+ REQUIRE(VirtFs::getRealDir("..").empty());
const bool dir1 = VirtFs::mountDirSilent("data", Append_false);
REQUIRE((dir1 || VirtFs::mountDirSilent("../data", Append_false))
== true);
@@ -651,7 +651,7 @@ TEST_CASE("VirtFs getRealDir1", "")
REQUIRE(VirtFs::getRealDir("test/test.txt") ==
"../data");
}
- REQUIRE(VirtFs::getRealDir("zzz") == "");
+ REQUIRE(VirtFs::getRealDir("zzz").empty());
VirtFs::mountDirSilent("data/test", Append_false);
VirtFs::mountDirSilent("../data/test", Append_false);
@@ -671,7 +671,7 @@ TEST_CASE("VirtFs getRealDir1", "")
REQUIRE(VirtFs::getRealDir("test.txt") ==
".." + sep + "data" + sep + "test");
}
- REQUIRE(VirtFs::getRealDir("zzz") == "");
+ REQUIRE(VirtFs::getRealDir("zzz").empty());
if (dir1 == true)
{
@@ -710,7 +710,7 @@ TEST_CASE("VirtFs getRealDir1", "")
".." + sep + "data" + sep + "test" + sep + "test.zip");
}
REQUIRE(VirtFs::exists("dir/hide.png"));
- REQUIRE(VirtFs::getRealDir("zzz") == "");
+ REQUIRE(VirtFs::getRealDir("zzz").empty());
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
@@ -734,7 +734,7 @@ TEST_CASE("VirtFs getrealDir2", "")
VirtFs::mountDir(prefix + "data/test", Append_false);
VirtFs::mountDir(prefix + "data", Append_false);
- REQUIRE(VirtFs::getRealDir("zzz") == "");
+ REQUIRE(VirtFs::getRealDir("zzz").empty());
REQUIRE(VirtFs::getRealDir("dir1/file1.txt") ==
prefix + "data" + sep + "test");
@@ -765,7 +765,7 @@ TEST_CASE("VirtFs getrealDir3", "")
Append_false);
VirtFs::mountDir(prefix + "data/test", Append_false);
- REQUIRE(VirtFs::getRealDir("zzz") == "");
+ REQUIRE(VirtFs::getRealDir("zzz").empty());
REQUIRE(VirtFs::getRealDir("dir1/file1.txt") ==
prefix + "data" + sep + "test");