forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored tests to expose private interface in separate test header.
Refactored the existing unit tests to expose private interfaces in a separate test header instead of an inline interface. This was first introduced in the google_sign_in plugin (flutter#4157) and after that also applied in the camera plugin (flutter#4426) and the webview_flutter plugin (flutter#4480).
- Loading branch information
1 parent
f7138f7
commit 441dea1
Showing
8 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin_Test.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// This header is available in the Test module. Import via "@import image_picker.Test;" | ||
|
||
#import <image_picker/FLTImagePickerPlugin.h> | ||
|
||
/// Methods exposed for unit testing. | ||
@interface FLTImagePickerPlugin () | ||
|
||
@property(copy, nonatomic) FlutterResult result; | ||
- (void)handleSavedPathList:(NSArray *)pathList; | ||
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker; | ||
|
||
@end |
10 changes: 10 additions & 0 deletions
10
packages/image_picker/image_picker/ios/Classes/ImagePickerPlugin.modulemap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
framework module image_picker { | ||
umbrella header "image_picker-umbrella.h" | ||
|
||
export * | ||
module * { export * } | ||
|
||
explicit module Test { | ||
header "FLTImagePickerPlugin_Test.h" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/image_picker/image_picker/ios/Classes/image_picker-umbrella.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <image_picker/FLTImagePickerImageUtil.h> | ||
#import <image_picker/FLTImagePickerMetaDataUtil.h> | ||
#import <image_picker/FLTImagePickerPhotoAssetUtil.h> | ||
#import <image_picker/FLTImagePickerPlugin.h> | ||
#import <image_picker/FLTPHPickerSaveImageToPathOperation.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters