OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | |
6 | |
7 #ifndef COURGETTE_BASE_TEST_UNITTEST_H_ | 5 #ifndef COURGETTE_BASE_TEST_UNITTEST_H_ |
8 #define COURGETTE_BASE_TEST_UNITTEST_H_ | 6 #define COURGETTE_BASE_TEST_UNITTEST_H_ |
9 | 7 |
10 #include <list> | 8 #include <list> |
11 #include <string> | 9 #include <string> |
12 | 10 |
13 #include "base/file_util.h" | 11 #include "base/file_util.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
15 | 13 |
16 class BaseTest : public testing::Test { | 14 class BaseTest : public testing::Test { |
17 public: | 15 public: |
18 std::string FileContents(const char* file_name) const; | 16 std::string FileContents(const char* file_name) const; |
19 | 17 |
20 // Pass a list of strings, and get back the concatenated contents | 18 // Pass a list of strings, and get back the concatenated contents |
21 // of each of the mentioned files. | 19 // of each of the mentioned files. |
22 std::string FilesContents(std::list<std::string> file_names) const; | 20 std::string FilesContents(std::list<std::string> file_names) const; |
23 | 21 |
24 private: | 22 private: |
25 virtual void SetUp(); | 23 virtual void SetUp(); |
26 virtual void TearDown(); | 24 virtual void TearDown(); |
27 | 25 |
28 FilePath test_dir_; | 26 FilePath test_dir_; |
29 }; | 27 }; |
30 | 28 |
31 #endif // COURGETTE_BASE_TEST_UNITTEST_H_ | 29 #endif // COURGETTE_BASE_TEST_UNITTEST_H_ |
OLD | NEW |