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]; |
100 } | 101 } |
101 | 102 |
102 // Redefinition of AVCaptureDevice methods we want to mock. | 103 // Redefinition of AVCaptureDevice methods we want to mock. |
103 - (CMVideoFormatDescriptionRef)formatDescription { | 104 - (CMVideoFormatDescriptionRef)formatDescription { |
104 return self.format; | 105 return self.format; |
105 } | 106 } |
106 | 107 |
107 - (NSArray *)videoSupportedFrameRateRanges { | 108 - (NSArray *)videoSupportedFrameRateRanges { |
108 return @[ self.rangeMock ]; | 109 return @[ self.rangeMock ]; |
109 } | 110 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 //https://github.com/erikdoe/ocmock/issues/241 | 238 //https://github.com/erikdoe/ocmock/issues/241 |
238 @try { | 239 @try { |
239 [mockDevice verify]; | 240 [mockDevice verify]; |
240 } @catch (NSException* exception) { | 241 } @catch (NSException* exception) { |
241 if ([exception.reason isEqual:testException.reason]) { | 242 if ([exception.reason isEqual:testException.reason]) { |
242 // Nothing dangerous here | 243 // Nothing dangerous here |
243 EXPECT_TRUE([exception.reason isEqualToString:exception.reason]); | 244 EXPECT_TRUE([exception.reason isEqualToString:exception.reason]); |
244 } | 245 } |
245 } | 246 } |
246 } | 247 } |
OLD | NEW |