This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[image_picker] Refactored tests to expose private interface in separate test header. #4722
Merged
fluttergithubbot
merged 5 commits into
flutter:main
from
Baseflow:image_picker_test_header
Feb 8, 2022
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
441dea1
Refactored tests to expose private interface in separate test header.
mvanbeusekom 6fc92d6
Adds declaration comments.
mvanbeusekom 3a6d1b5
Fix spelling error in changelog
mvanbeusekom 69a41d8
Fix formatting
mvanbeusekom 31442f3
Remove private headers from umbrella
mvanbeusekom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
43 changes: 43 additions & 0 deletions
43
packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin_Test.h
This file contains hidden or 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,43 @@ | ||
// 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 () | ||
|
||
/** The Flutter result callback use to report results back to Flutter App. */ | ||
@property(copy, nonatomic) FlutterResult result; | ||
|
||
/** | ||
* Applies NSMutableArray on the FLutterResult. | ||
* | ||
* NSString must be returned by FlutterResult if the single image | ||
* mode is active. It is checked by maxImagesAllowed and | ||
* returns the first object of the pathlist. | ||
* | ||
* NSMutableArray must be returned by FlutterResult if the multi-image | ||
* mode is active. After the pathlist count is checked then it returns | ||
* the pathlist. | ||
* | ||
* @param pathList that should be applied to FlutterResult. | ||
*/ | ||
- (void)handleSavedPathList:(NSArray *)pathList; | ||
|
||
/** | ||
* Tells the delegate that the user cancelled the pick operation. | ||
* | ||
* Your delegate’s implementation of this method should dismiss the picker view | ||
* by calling the dismissModalViewControllerAnimated: method of the parent | ||
* view controller. | ||
* | ||
* Implementation of this method is optional, but expected. | ||
* | ||
* @param picker The controller object managing the image picker interface. | ||
*/ | ||
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker; | ||
|
||
@end |
14 changes: 14 additions & 0 deletions
14
packages/image_picker/image_picker/ios/Classes/ImagePickerPlugin.modulemap
This file contains hidden or 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,14 @@ | ||
framework module image_picker { | ||
umbrella header "image_picker-umbrella.h" | ||
|
||
export * | ||
module * { export * } | ||
|
||
explicit module Test { | ||
header "FLTImagePickerPlugin_Test.h" | ||
header "FLTImagePickerImageUtil.h" | ||
header "FLTImagePickerMetaDataUtil.h" | ||
header "FLTImagePickerPhotoAssetUtil.h" | ||
header "FLTPHPickerSaveImageToPathOperation.h" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/image_picker/image_picker/ios/Classes/image_picker-umbrella.h
This file contains hidden or 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,6 @@ | ||
// 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/FLTImagePickerPlugin.h> |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.