OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/test/testsupport/fileutils.h" | 11 #include "webrtc/test/testsupport/fileutils.h" |
12 | 12 |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 | 14 |
15 #include <list> | 15 #include <list> |
16 #include <string> | 16 #include <string> |
17 | 17 |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "webrtc/test/gtest.h" |
19 | 19 |
20 #ifdef WIN32 | 20 #ifdef WIN32 |
21 #define chdir _chdir | 21 #define chdir _chdir |
22 static const char* kPathDelimiter = "\\"; | 22 static const char* kPathDelimiter = "\\"; |
23 #else | 23 #else |
24 static const char* kPathDelimiter = "/"; | 24 static const char* kPathDelimiter = "/"; |
25 #endif | 25 #endif |
26 | 26 |
27 static const std::string kResourcesDir = "resources"; | 27 static const std::string kResourcesDir = "resources"; |
28 static const std::string kTestName = "fileutils_unittest"; | 28 static const std::string kTestName = "fileutils_unittest"; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 fclose(file); | 144 fclose(file); |
145 ASSERT_GT(webrtc::test::GetFileSize(std::string(temp_filename.c_str())), 0u); | 145 ASSERT_GT(webrtc::test::GetFileSize(std::string(temp_filename.c_str())), 0u); |
146 remove(temp_filename.c_str()); | 146 remove(temp_filename.c_str()); |
147 } | 147 } |
148 | 148 |
149 TEST_F(FileUtilsTest, GetFileSizeNonExistingFile) { | 149 TEST_F(FileUtilsTest, GetFileSizeNonExistingFile) { |
150 ASSERT_EQ(0u, webrtc::test::GetFileSize("non-existing-file.tmp")); | 150 ASSERT_EQ(0u, webrtc::test::GetFileSize("non-existing-file.tmp")); |
151 } | 151 } |
152 | 152 |
153 } // namespace webrtc | 153 } // namespace webrtc |
OLD | NEW |