Skip to content

Conversation

pzarfos
Copy link

@pzarfos pzarfos commented Dec 23, 2022

hello @Andy0570 ,

I added a unit test function for your applyGradient PR - SwifterSwift#1039

It 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 use Color? Just Color did not compile for me. I had to use UIColor. I wasn't sure if you had an extension that implemented Color or if your code compiles as-is.
https://github.com/SwifterSwift/SwifterSwift/pull/1039/files#diff-55da4bac07fa471f5c1a645fb21e6981a2730c1e9ac2936bb09c90daa60e3a15R497

Checklist

  • I checked the Contributing Guidelines before creating this request.
  • New extensions are written in Swift 5.0.
  • New extensions support iOS 10.0+ / tvOS 9.0+ / macOS 10.10+ / watchOS 2.0+, or use @available if not.
  • I have added tests for new extensions, and they passed.
  • All extensions have a clear comments explaining their functionality, all parameters and return type in English.
  • All extensions are declared as public.
  • I have added a changelog entry describing my changes.

@Andy0570 Andy0570 merged commit c824866 into Andy0570:master Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants