Fix day-of-year, compass point, async context and display defects; add tests - #38
Open
Gabriel-Dalton wants to merge 2 commits into
Open
Fix day-of-year, compass point, async context and display defects; add tests#38Gabriel-Dalton wants to merge 2 commits into
Gabriel-Dalton wants to merge 2 commits into
Conversation
…on button tooltip
… pin loaded settings, add tests
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A few real defects found while reading through the app, plus tests covering them.
Logic
getDayOfYearreturned 0 for January 1st and could shift by a day across a DST boundary because it subtracted localDateTimes. Day-of-year feeds foliar moisture content, so this changed predictions.degreesToCompassPointwas off by half a sector. 20 degrees reported "N" instead of "NNE". It could also throw on values outside 0-360 instead of wrapping.Crash risks
BuildContextuses acrossawaitgaps (the disclaimer dialog and the delayed scroll) with nomountedcheck._getPositionreturns null on error, but the caller dereferenced the result.Display
pubspec.yaml.Verification
flutter analyzereports no errors (remaining items are the pre-existing CFFDRS naming lints).flutter testpasses 25/25, including 10 new tests intest/fire_test.dartcovering day-of-year, compass points, intensity classes and range pinning.Copy and grammar fixes are kept in a separate PR.