Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: webrtc/rtc_base/sequenced_task_checker_unittest.cc

Issue 3006133002: Update thread annotiation macros in rtc_base to use RTC_ prefix (Closed)
Patch Set: Rebase Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/rtc_base/sequenced_task_checker.h ('k') | webrtc/rtc_base/signalthread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/rtc_base/sequenced_task_checker.h ('k') | webrtc/rtc_base/signalthread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698