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

Side by Side Diff: webrtc/sdk/objc/Framework/UnitTests/RTCIntervalRangeTests.mm

Issue 2976953002: iOS - Add iceRegatherIntervalRange. (Closed)
Patch Set: Created 3 years, 5 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/sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2017 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 #import <Foundation/Foundation.h>
12
13 #include "webrtc/rtc_base/gunit.h"
14
15 #import "RTCIntervalRange+Private.h"
16 #import "WebRTC/RTCIntervalRange.h"
17
18 @interface RTCIntervalRangeTest : NSObject
19 - (void)testConversionToNativeConfiguration;
20 - (void)testNativeConversionToConfiguration;
21 @end
22
23 @implementation RTCIntervalRangeTest
24
25 - (void)testConversionToNativeConfiguration {
26 NSInteger min = 0;
27 NSInteger max = 100;
28 RTCIntervalRange *range = [[RTCIntervalRange alloc] initWithMin:min max:max];
29 EXPECT_EQ(min, range.min);
30 EXPECT_EQ(max, range.max);
31 std::unique_ptr<rtc::IntervalRange> nativeRange = range.nativeIntervalRange;
32 EXPECT_EQ(min, nativeRange->min());
33 EXPECT_EQ(max, nativeRange->max());
34 }
35
36 - (void)testNativeConversionToConfiguration {
37 NSInteger min = 0;
38 NSInteger max = 100;
39 rtc::IntervalRange nativeRange((int)min, (int)max);
40 RTCIntervalRange *range =
41 [[RTCIntervalRange alloc] initWithNativeIntervalRange:nativeRange];
42 EXPECT_EQ(min, range.min);
43 EXPECT_EQ(max, range.max);
44 }
45
46 @end
47
48 TEST(RTCIntervalRangeTest, NativeConfigurationConversionTest) {
49 @autoreleasepool {
50 RTCIntervalRangeTest *test = [[RTCIntervalRangeTest alloc] init];
51 [test testConversionToNativeConfiguration];
52 [test testNativeConversionToConfiguration];
53 }
54 }
OLDNEW
« no previous file with comments | « webrtc/sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698