Repository navigation
test: edge cases for MetricsParse (meminfo, loadavg, package names) - #22
Merged
Merged
Conversation
Adds tests for parseMeminfoKb with a missing MemAvailable line, a zero MemTotal, and extra whitespace, plus parseLoadavg with fewer than three fields, non-numeric fields, and blank input. Adds the small pure isValidPackageName check the issue describes (it did not exist yet) with tests for the accept and reject cases. Closes wized2#17
|
@nextammy is attempting to deploy a commit to the wized1's projects Team on Vercel. A member of the Team first needs to authorize it. |
wized2
approved these changes
Nov 14, 2026
wized2
left a comment
Owner
There was a problem hiding this comment.
Thanks @nextammy, this is a clean first PR. The tests are clear and cover every case in the issue, CI is green, and adding the small isValidPackageName helper was the right call since it did not exist yet. Edge cases beyond the list (1com.example, com..example) are a nice touch. Approved.
3 tasks
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.
Summary
Adds edge case tests for MetricsParse from #17, plus the small pure isValidPackageName check the issue describes, which did not exist yet. No other production code changed.
Closes #17
How tested
The full SystemMetricsParseTest class was compiled with kotlinc 2.0.21 and run under JUnit 4.13.2: 22 tests pass, 0 fail (14 existing + 8 new). Note: ./gradlew testStableDebugUnitTest could not run in this sandbox because the Gradle daemon socket fails there, so the Gradle run itself was not done. CI should run it.
Target branch
Type
Checklist