summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2015-12-07 16:31:13 -0600
committerElliott Hughes2015-12-07 16:31:53 -0600
commitf2584be414037aaab9e344bc9f65872da624d9f0 (patch)
tree1d2643eec68c8d8b03ccd6cabf9856182e197708 /base/include/android-base/test_utils.h
parentd1379a8aedb7b80edac8849d2e64ceffa409632e (diff)
downloadplatform-system-core-f2584be414037aaab9e344bc9f65872da624d9f0.tar.gz
platform-system-core-f2584be414037aaab9e344bc9f65872da624d9f0.tar.xz
platform-system-core-f2584be414037aaab9e344bc9f65872da624d9f0.zip
Rename base/ to android-base/.
Bug: http://b/26023797 Change-Id: Ie6c63bf86bed05faab87d290de6f34d9af3532a8
Diffstat (limited to 'base/include/android-base/test_utils.h')
-rw-r--r--base/include/android-base/test_utils.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/base/include/android-base/test_utils.h b/base/include/android-base/test_utils.h
new file mode 100644
index 000000000..3f6872c3b
--- /dev/null
+++ b/base/include/android-base/test_utils.h
@@ -0,0 +1,51 @@
1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef TEST_UTILS_H
18#define TEST_UTILS_H
19
20#include <string>
21
22#include <android-base/macros.h>
23
24class TemporaryFile {
25 public:
26 TemporaryFile();
27 ~TemporaryFile();
28
29 int fd;
30 char path[1024];
31
32 private:
33 void init(const std::string& tmp_dir);
34
35 DISALLOW_COPY_AND_ASSIGN(TemporaryFile);
36};
37
38class TemporaryDir {
39 public:
40 TemporaryDir();
41 ~TemporaryDir();
42
43 char path[1024];
44
45 private:
46 bool init(const std::string& tmp_dir);
47
48 DISALLOW_COPY_AND_ASSIGN(TemporaryDir);
49};
50
51#endif // TEST_UTILS_H