summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'base/include')
-rw-r--r--base/include/android-base/test_utils.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/base/include/android-base/test_utils.h b/base/include/android-base/test_utils.h
index 4ea3c8e48..c0bf0c1e1 100644
--- a/base/include/android-base/test_utils.h
+++ b/base/include/android-base/test_utils.h
@@ -48,4 +48,21 @@ class TemporaryDir {
48 DISALLOW_COPY_AND_ASSIGN(TemporaryDir); 48 DISALLOW_COPY_AND_ASSIGN(TemporaryDir);
49}; 49};
50 50
51class CapturedStderr {
52 public:
53 CapturedStderr();
54 ~CapturedStderr();
55
56 int fd() const;
57
58 private:
59 void init();
60 void reset();
61
62 TemporaryFile temp_file_;
63 int old_stderr_;
64
65 DISALLOW_COPY_AND_ASSIGN(CapturedStderr);
66};
67
51#endif // ANDROID_BASE_TEST_UTILS_H 68#endif // ANDROID_BASE_TEST_UTILS_H