diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-30 20:25:53 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-30 20:25:53 +0000 |
commit | f4ab63f3d8efa70053786d8a0e57b3bf76ae4ee5 (patch) | |
tree | eded553504522fd281f273bf5f9b08aca87cbdec /unittests/Support | |
parent | 8838da6587e60a248b07d4db0e874429ad4e9747 (diff) | |
download | external_llvm-f4ab63f3d8efa70053786d8a0e57b3bf76ae4ee5.zip external_llvm-f4ab63f3d8efa70053786d8a0e57b3bf76ae4ee5.tar.gz external_llvm-f4ab63f3d8efa70053786d8a0e57b3bf76ae4ee5.tar.bz2 |
Implement getUniqueID for directories on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support')
-rw-r--r-- | unittests/Support/Path.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/unittests/Support/Path.cpp b/unittests/Support/Path.cpp index 165668d..c9a2fb2 100644 --- a/unittests/Support/Path.cpp +++ b/unittests/Support/Path.cpp @@ -195,6 +195,19 @@ TEST_F(FileSystemTest, Unique) { ASSERT_EQ(D2, F1); ::close(FileDescriptor); + + SmallString<128> Dir1; + ASSERT_NO_ERROR( + fs::createUniqueDirectory("dir1", Dir1)); + ASSERT_NO_ERROR(fs::getUniqueID(Dir1.c_str(), F1)); + ASSERT_NO_ERROR(fs::getUniqueID(Dir1.c_str(), F2)); + ASSERT_EQ(F1, F2); + + SmallString<128> Dir2; + ASSERT_NO_ERROR( + fs::createUniqueDirectory("dir2", Dir2)); + ASSERT_NO_ERROR(fs::getUniqueID(Dir2.c_str(), F2)); + ASSERT_NE(F1, F2); } TEST_F(FileSystemTest, TempFiles) { |