added tests for UIView applyGradient() #1
Merged
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.
hello @Andy0570 ,
I added a unit test function for your
applyGradient
PR - SwifterSwift#1039It tests the results of applyGradient() in all 4 directions.
You should be able to merge it into your code. If not you can just copy the function.
Also, in the
applyGradient
function, did you intend to useColor
? JustColor
did not compile for me. I had to useUIColor
. I wasn't sure if you had an extension that implementedColor
or if your code compiles as-is.https://github.com/SwifterSwift/SwifterSwift/pull/1039/files#diff-55da4bac07fa471f5c1a645fb21e6981a2730c1e9ac2936bb09c90daa60e3a15R497
Checklist
@available
if not.