diff options
author | chrome-bot <chrome-bot@chromium.org> | 2019-01-13 13:52:20 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-13 13:52:20 -0800 |
commit | bacee4044e68cb5d7044e54fe8cfa87baf2960ba (patch) | |
tree | add5e4a6b9effaf558701198868fbe95c33961f1 /common/test_utils.h | |
parent | ef13c92c549fee1a73118c32315e4472a5c4ffa3 (diff) | |
parent | 7438410328547d8f55b6555ebdcfd9768978fcb9 (diff) |
Merge commit '7438410328547d8f55b6555ebdcfd9768978fcb9' into patch_branch
Change-Id: Idc4f0d63865479d4e3b85069270c6c21d52a747d
Diffstat (limited to 'common/test_utils.h')
-rw-r--r-- | common/test_utils.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/common/test_utils.h b/common/test_utils.h index ffe6f670..5be48cf4 100644 --- a/common/test_utils.h +++ b/common/test_utils.h @@ -24,18 +24,15 @@ // Streams used for gtest's PrintTo() functions. #include <iostream> // NOLINT(readability/streams) #include <memory> -#include <set> #include <string> #include <vector> -#include <base/callback.h> #include <base/files/file_path.h> #include <base/files/scoped_temp_dir.h> #include <gmock/gmock.h> #include <gtest/gtest.h> #include "update_engine/common/action.h" -#include "update_engine/common/subprocess.h" #include "update_engine/common/utils.h" #include "update_engine/update_metadata.pb.h" @@ -76,22 +73,6 @@ inline int System(const std::string& cmd) { return system(cmd.c_str()); } -inline int Symlink(const std::string& oldpath, const std::string& newpath) { - return symlink(oldpath.c_str(), newpath.c_str()); -} - -inline int Chmod(const std::string& path, mode_t mode) { - return chmod(path.c_str(), mode); -} - -inline int Mkdir(const std::string& path, mode_t mode) { - return mkdir(path.c_str(), mode); -} - -inline int Chdir(const std::string& path) { - return chdir(path.c_str()); -} - // Reads a symlink from disk. Returns empty string on failure. std::string Readlink(const std::string& path); @@ -144,7 +125,7 @@ class ScopedLoopbackDeviceBinder { ADD_FAILURE(); } - const std::string &dev() { + const std::string& dev() const { EXPECT_TRUE(is_bound_); return dev_; } |