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 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #endif | 74 #endif |
75 TEST_F(FileUtilsTest, MAYBE_OutputPathFromUnchangedWorkingDir) { | 75 TEST_F(FileUtilsTest, MAYBE_OutputPathFromUnchangedWorkingDir) { |
76 std::string path = webrtc::test::OutputPath(); | 76 std::string path = webrtc::test::OutputPath(); |
77 std::string expected_end = "out"; | 77 std::string expected_end = "out"; |
78 expected_end = kPathDelimiter + expected_end + kPathDelimiter; | 78 expected_end = kPathDelimiter + expected_end + kPathDelimiter; |
79 ASSERT_EQ(path.length() - expected_end.length(), path.find(expected_end)); | 79 ASSERT_EQ(path.length() - expected_end.length(), path.find(expected_end)); |
80 } | 80 } |
81 | 81 |
82 // Tests with current working directory set to a directory higher up in the | 82 // Tests with current working directory set to a directory higher up in the |
83 // directory tree than the project root dir. | 83 // directory tree than the project root dir. |
84 #if defined(WEBRTC_ANDROID) | 84 #if defined(WEBRTC_ANDROID) || defined(WIN32) |
85 #define MAYBE_OutputPathFromRootWorkingDir DISABLED_OutputPathFromRootWorkingDir | 85 #define MAYBE_OutputPathFromRootWorkingDir DISABLED_OutputPathFromRootWorkingDir |
86 #else | 86 #else |
87 #define MAYBE_OutputPathFromRootWorkingDir OutputPathFromRootWorkingDir | 87 #define MAYBE_OutputPathFromRootWorkingDir OutputPathFromRootWorkingDir |
88 #endif | 88 #endif |
89 TEST_F(FileUtilsTest, MAYBE_OutputPathFromRootWorkingDir) { | 89 TEST_F(FileUtilsTest, MAYBE_OutputPathFromRootWorkingDir) { |
90 ASSERT_EQ(0, chdir(kPathDelimiter)); | 90 ASSERT_EQ(0, chdir(kPathDelimiter)); |
91 ASSERT_EQ("./", webrtc::test::OutputPath()); | 91 ASSERT_EQ("./", webrtc::test::OutputPath()); |
92 } | 92 } |
93 | 93 |
94 TEST_F(FileUtilsTest, TempFilename) { | 94 TEST_F(FileUtilsTest, TempFilename) { |
(...skipping 49 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 |