diff options
Diffstat (limited to 'src/fs/virtfs/virtfs1_unittest.cc')
-rw-r--r-- | src/fs/virtfs/virtfs1_unittest.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/fs/virtfs/virtfs1_unittest.cc b/src/fs/virtfs/virtfs1_unittest.cc index ee8e97e3e..a48f9829c 100644 --- a/src/fs/virtfs/virtfs1_unittest.cc +++ b/src/fs/virtfs/virtfs1_unittest.cc @@ -1433,8 +1433,8 @@ TEST_CASE("VirtFs1 loadFile1") VirtFs::mountDir(prefix + "data", Append_false); - char *const buffer = VirtFs::loadFile("test/test.txt", fileSize); - REQUIRE(static_cast<void*>(buffer) != nullptr); + const char *const buffer = VirtFs::loadFile("test/test.txt", fileSize); + REQUIRE(static_cast<const void*>(buffer) != nullptr); REQUIRE(fileSize == 23); REQUIRE(strncmp(buffer, "test line 1\ntest line 2", 23) == 0); delete [] buffer; @@ -1459,8 +1459,9 @@ TEST_CASE("VirtFs1 loadFile2") SECTION("test 1") { - char *restrict buffer = VirtFs::loadFile("dir2//test.txt", fileSize); - REQUIRE(static_cast<void*>(buffer) != nullptr); + const char *restrict buffer = VirtFs::loadFile("dir2//test.txt", + fileSize); + REQUIRE(static_cast<const void*>(buffer) != nullptr); REQUIRE(fileSize == 23); REQUIRE(strncmp(buffer, "test line 1\ntest line 2", 23) == 0); delete [] buffer; @@ -1468,8 +1469,9 @@ TEST_CASE("VirtFs1 loadFile2") SECTION("test 2") { - char *restrict buffer = VirtFs::loadFile("dir2\\/test.txt", fileSize); - REQUIRE(static_cast<void*>(buffer) != nullptr); + const char *restrict buffer = VirtFs::loadFile("dir2\\/test.txt", + fileSize); + REQUIRE(static_cast<const void*>(buffer) != nullptr); REQUIRE(fileSize == 23); REQUIRE(strncmp(buffer, "test line 1\ntest line 2", 23) == 0); delete [] buffer; |