Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Add tests for ext package #11334

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Add tests for ext package #11334

merged 1 commit into from
Jun 10, 2020

Conversation

NotWoods
Copy link
Contributor

@NotWoods NotWoods commented Jun 8, 2020

Add in tests for the View extensions, NavController extensions, Log methods

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not

@NotWoods NotWoods added the eng:tech-debt Engineering debt. Missing unit tests, etc. label Jun 8, 2020
@codecov-commenter
Copy link

Codecov Report

Merging #11334 into master will increase coverage by 0.05%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #11334      +/-   ##
============================================
+ Coverage     20.57%   20.63%   +0.05%     
  Complexity      659      659              
============================================
  Files           368      368              
  Lines         15037    15020      -17     
  Branches       2018     2018              
============================================
+ Hits           3094     3099       +5     
+ Misses        11652    11629      -23     
- Partials        291      292       +1     
Impacted Files Coverage Δ Complexity Δ
...ain/java/org/mozilla/fenix/components/Analytics.kt 20.75% <0.00%> (ø) 1.00 <0.00> (ø)
app/src/main/java/org/mozilla/fenix/ext/Context.kt 39.13% <ø> (+14.80%) 0.00 <0.00> (ø)
app/src/main/java/org/mozilla/fenix/ext/Log.kt 0.00% <ø> (ø) 0.00 <0.00> (ø)
...c/main/java/org/mozilla/fenix/ext/NavController.kt 44.44% <100.00%> (+16.66%) 0.00 <0.00> (ø)
app/src/main/java/org/mozilla/fenix/ext/View.kt 100.00% <100.00%> (+23.07%) 0.00 <0.00> (ø)
...src/main/java/org/mozilla/fenix/ext/ImageButton.kt 100.00% <0.00%> (+33.33%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04a436d...6534b07. Read the comment docs.

touchRect.left -= dips
touchRect.right += dips
touchRect.bottom += dips
touchRect.inset(-dips, -dips)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like some of them are adding? am i misunderstanding what the inset fun is doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inset function adds for top/left, subtracts for right/bottom:

    public void inset(int dx, int dy) {
        left += dx;
        top += dy;
        right -= dx;
        bottom -= dy;
    }

@NotWoods NotWoods merged commit 4b064af into mozilla-mobile:master Jun 10, 2020
@NotWoods NotWoods deleted the test-ext branch June 10, 2020 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
eng:tech-debt Engineering debt. Missing unit tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants