OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 minFps:0.0 | 90 minFps:0.0 |
91 maxFps:60.0]; | 91 maxFps:60.0]; |
92 return instance; | 92 return instance; |
93 } | 93 } |
94 | 94 |
95 - (void)dealloc { | 95 - (void)dealloc { |
96 if (_format != nil) { | 96 if (_format != nil) { |
97 CFRelease(_format); | 97 CFRelease(_format); |
98 _format = nil; | 98 _format = nil; |
99 } | 99 } |
100 [super dealloc]; | |
101 } | 100 } |
102 | 101 |
103 // Redefinition of AVCaptureDevice methods we want to mock. | 102 // Redefinition of AVCaptureDevice methods we want to mock. |
104 - (CMVideoFormatDescriptionRef)formatDescription { | 103 - (CMVideoFormatDescriptionRef)formatDescription { |
105 return self.format; | 104 return self.format; |
106 } | 105 } |
107 | 106 |
108 - (NSArray *)videoSupportedFrameRateRanges { | 107 - (NSArray *)videoSupportedFrameRateRanges { |
109 return @[ self.rangeMock ]; | 108 return @[ self.rangeMock ]; |
110 } | 109 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 //https://github.com/erikdoe/ocmock/issues/241 | 237 //https://github.com/erikdoe/ocmock/issues/241 |
239 @try { | 238 @try { |
240 [mockDevice verify]; | 239 [mockDevice verify]; |
241 } @catch (NSException* exception) { | 240 } @catch (NSException* exception) { |
242 if ([exception.reason isEqual:testException.reason]) { | 241 if ([exception.reason isEqual:testException.reason]) { |
243 // Nothing dangerous here | 242 // Nothing dangerous here |
244 EXPECT_TRUE([exception.reason isEqualToString:exception.reason]); | 243 EXPECT_TRUE([exception.reason isEqualToString:exception.reason]); |
245 } | 244 } |
246 } | 245 } |
247 } | 246 } |
OLD | NEW |