OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 class TestAnnotations { | 230 class TestAnnotations { |
231 public: | 231 public: |
232 TestAnnotations() : test_var_(false) {} | 232 TestAnnotations() : test_var_(false) {} |
233 | 233 |
234 void ModifyTestVar() { | 234 void ModifyTestVar() { |
235 RTC_DCHECK_CALLED_SEQUENTIALLY(&checker_); | 235 RTC_DCHECK_CALLED_SEQUENTIALLY(&checker_); |
236 test_var_ = true; | 236 test_var_ = true; |
237 } | 237 } |
238 | 238 |
239 private: | 239 private: |
240 bool test_var_ GUARDED_BY(&checker_); | 240 bool test_var_ RTC_GUARDED_BY(&checker_); |
241 SequencedTaskChecker checker_; | 241 SequencedTaskChecker checker_; |
242 }; | 242 }; |
243 | 243 |
244 TEST(SequencedTaskCheckerTest, TestAnnotations) { | 244 TEST(SequencedTaskCheckerTest, TestAnnotations) { |
245 TestAnnotations annotations; | 245 TestAnnotations annotations; |
246 annotations.ModifyTestVar(); | 246 annotations.ModifyTestVar(); |
247 } | 247 } |
248 | 248 |
249 #if GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 249 #if GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
250 | 250 |
(...skipping 13 matching lines...) Expand all Loading... |
264 TEST(SequencedTaskCheckerTest, TestAnnotationsOnWrongQueueDebug) { | 264 TEST(SequencedTaskCheckerTest, TestAnnotationsOnWrongQueueDebug) { |
265 ASSERT_DEATH({ TestAnnotationsOnWrongQueue(); }, ""); | 265 ASSERT_DEATH({ TestAnnotationsOnWrongQueue(); }, ""); |
266 } | 266 } |
267 #else | 267 #else |
268 TEST(SequencedTaskCheckerTest, TestAnnotationsOnWrongQueueRelease) { | 268 TEST(SequencedTaskCheckerTest, TestAnnotationsOnWrongQueueRelease) { |
269 TestAnnotationsOnWrongQueue(); | 269 TestAnnotationsOnWrongQueue(); |
270 } | 270 } |
271 #endif | 271 #endif |
272 #endif // GTEST_HAS_DEATH_TEST | 272 #endif // GTEST_HAS_DEATH_TEST |
273 } // namespace rtc | 273 } // namespace rtc |
OLD | NEW |