diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 |
| commit | bab175ec4b075c8076ba14c762900392533f6ee4 (patch) | |
| tree | 01f4f29419a2cb10abe13c1e63cd2a66068b0137 /unittests/Basic/FileManagerTest.cpp | |
| parent | 8b7a8012d223fac5d17d16a66bb39168a9a1dfc0 (diff) | |
Notes
Diffstat (limited to 'unittests/Basic/FileManagerTest.cpp')
| -rw-r--r-- | unittests/Basic/FileManagerTest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/unittests/Basic/FileManagerTest.cpp b/unittests/Basic/FileManagerTest.cpp index d8d85dd76c382..4cf21cd8459ab 100644 --- a/unittests/Basic/FileManagerTest.cpp +++ b/unittests/Basic/FileManagerTest.cpp @@ -52,7 +52,7 @@ public: } // Implement FileSystemStatCache::getStat(). - LookupResult getStat(const char *Path, FileData &Data, bool isFile, + LookupResult getStat(StringRef Path, FileData &Data, bool isFile, std::unique_ptr<vfs::File> *F, vfs::FileSystem &FS) override { if (StatCalls.count(Path) != 0) { @@ -82,14 +82,14 @@ TEST_F(FileManagerTest, getVirtualFileSetsTheDirFieldCorrectly) { const DirectoryEntry *dir = file->getDir(); ASSERT_TRUE(dir != nullptr); - EXPECT_STREQ(".", dir->getName()); + EXPECT_EQ(".", dir->getName()); file = manager.getVirtualFile("x/y/z.cpp", 42, 0); ASSERT_TRUE(file != nullptr); dir = file->getDir(); ASSERT_TRUE(dir != nullptr); - EXPECT_STREQ("x/y", dir->getName()); + EXPECT_EQ("x/y", dir->getName()); } // Before any virtual file is added, no virtual directory exists. @@ -115,11 +115,11 @@ TEST_F(FileManagerTest, getVirtualFileCreatesDirectoryEntriesForAncestors) { const DirectoryEntry *dir = manager.getDirectory("virtual/dir"); ASSERT_TRUE(dir != nullptr); - EXPECT_STREQ("virtual/dir", dir->getName()); + EXPECT_EQ("virtual/dir", dir->getName()); dir = manager.getDirectory("virtual"); ASSERT_TRUE(dir != nullptr); - EXPECT_STREQ("virtual", dir->getName()); + EXPECT_EQ("virtual", dir->getName()); } // getFile() returns non-NULL if a real file exists at the given path. @@ -140,11 +140,11 @@ TEST_F(FileManagerTest, getFileReturnsValidFileEntryForExistingRealFile) { const FileEntry *file = manager.getFile("/tmp/test"); ASSERT_TRUE(file != nullptr); - EXPECT_STREQ("/tmp/test", file->getName()); + EXPECT_EQ("/tmp/test", file->getName()); const DirectoryEntry *dir = file->getDir(); ASSERT_TRUE(dir != nullptr); - EXPECT_STREQ("/tmp", dir->getName()); + EXPECT_EQ("/tmp", dir->getName()); #ifdef LLVM_ON_WIN32 file = manager.getFile(FileName); @@ -152,7 +152,7 @@ TEST_F(FileManagerTest, getFileReturnsValidFileEntryForExistingRealFile) { dir = file->getDir(); ASSERT_TRUE(dir != NULL); - EXPECT_STREQ(DirName, dir->getName()); + EXPECT_EQ(DirName, dir->getName()); #endif } @@ -164,11 +164,11 @@ TEST_F(FileManagerTest, getFileReturnsValidFileEntryForExistingVirtualFile) { manager.getVirtualFile("virtual/dir/bar.h", 100, 0); const FileEntry *file = manager.getFile("virtual/dir/bar.h"); ASSERT_TRUE(file != nullptr); - EXPECT_STREQ("virtual/dir/bar.h", file->getName()); + EXPECT_EQ("virtual/dir/bar.h", file->getName()); const DirectoryEntry *dir = file->getDir(); ASSERT_TRUE(dir != nullptr); - EXPECT_STREQ("virtual/dir", dir->getName()); + EXPECT_EQ("virtual/dir", dir->getName()); } // getFile() returns different FileEntries for different paths when |
