diff options
| author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-01 03:18:33 +0000 |
|---|---|---|
| committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-01 03:18:33 +0000 |
| commit | 956955ed8b5954b31c39cff09c342abad8a28596 (patch) | |
| tree | cdb7f7af4a915d9dbb7340a286870c04bfc1ffea /llvm/unittests/Support/Path.cpp | |
| parent | 142692006bb824796ea3ddf1907db81af7956fd8 (diff) | |
| download | bcm5719-llvm-956955ed8b5954b31c39cff09c342abad8a28596.tar.gz bcm5719-llvm-956955ed8b5954b31c39cff09c342abad8a28596.zip | |
Support/PathV2: Add stem implementation.
llvm-svn: 120547
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
| -rw-r--r-- | llvm/unittests/Support/Path.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp index 0dae960f48f..70cf213f191 100644 --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -97,6 +97,9 @@ TEST(Support, Path) { if (error_code ec = sys::path::filename(*i, res)) ASSERT_FALSE(ec.message().c_str()); outs() << " filename: " << res << '\n'; + if (error_code ec = sys::path::stem(*i, res)) + ASSERT_FALSE(ec.message().c_str()); + outs() << " stem: " << res << '\n'; temp_store = *i; if (error_code ec = sys::path::make_absolute(temp_store)) @@ -110,6 +113,10 @@ TEST(Support, Path) { if (error_code ec = sys::path::replace_extension(temp_store, "ext")) ASSERT_FALSE(ec.message().c_str()); outs() << " replace_extension: " << temp_store << '\n'; + if (error_code ec = sys::path::stem( + StringRef(temp_store.begin(), temp_store.size()), res)) + ASSERT_FALSE(ec.message().c_str()); + outs() << " stem: " << res << '\n'; if (error_code ec = sys::path::native(*i, temp_store)) ASSERT_FALSE(ec.message().c_str()); outs() << " native: " << temp_store << '\n'; |

