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

Side by Side Diff: webrtc/system_wrappers/source/thread_posix_unittest.cc

Issue 1469013002: Move ThreadWrapper to ProcessThread in base. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removed comment Created 5 years 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
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/system_wrappers/source/thread_posix.h"
12
13 #include "testing/gtest/include/gtest/gtest.h"
14
15 TEST(ThreadTestPosix, PrioritySettings) {
16 // API assumes that max_prio - min_prio > 2. Test the extreme case.
17 const int kMinPrio = -1;
18 const int kMaxPrio = 2;
19
20 int last_priority = kMinPrio;
21 for (int priority = webrtc::kLowPriority;
22 priority <= webrtc::kRealtimePriority; ++priority) {
23 int system_priority = webrtc::ConvertToSystemPriority(
24 static_cast<webrtc::ThreadPriority>(priority), kMinPrio, kMaxPrio);
25 EXPECT_GT(system_priority, kMinPrio);
26 EXPECT_LT(system_priority, kMaxPrio);
27 EXPECT_GE(system_priority, last_priority);
28 last_priority = system_priority;
29 }
30 }
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/thread_posix.cc ('k') | webrtc/system_wrappers/source/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698