Skip to content

Commit 417572b

Browse files
committed
Rename GetCurDir to GetCurrentDirName and fixes it
1 parent 43fae10 commit 417572b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/includes_normalize_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424

2525
namespace {
2626

27-
std::string GetCurDir() {
27+
std::string GetCurrentDirName() {
2828
char buf[_MAX_PATH];
2929
_getcwd(buf, sizeof(buf));
3030
std::vector<StringPiece> parts = SplitStringPiece(buf, '\\');
31-
return parts[parts.size() - 1].AsString();
31+
return parts.back().AsString();
3232
}
3333

3434
std::string NormalizeAndCheckNoError(const std::string& input) {
@@ -59,7 +59,7 @@ TEST(IncludesNormalize, Simple) {
5959

6060
TEST(IncludesNormalize, WithRelative) {
6161
std::string err;
62-
std::string currentdir = GetCurDir();
62+
std::string currentdir = GetCurrentDirName();
6363
EXPECT_EQ("c", NormalizeRelativeAndCheckNoError("a/b/c", "a/b"));
6464
EXPECT_EQ("a",
6565
NormalizeAndCheckNoError(IncludesNormalize::AbsPath("a", &err)));

0 commit comments

Comments
 (0)