test: cover BibleVersion lookup fallbacks#196
Open
davidfedor wants to merge 1 commit into
Open
Conversation
Contributor
✅ Commit Lint: passedAll commit messages in this PR conform to Conventional Commits. 📦 Release preview:
|
Contributor
Code Coverage ReportCoverage after merging codex/calculate-code-coverage-for-youversionplatformcore into main will be
Coverage Report
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
davidfedor
marked this pull request as ready for review
July 13, 2026 21:02
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.
Motivation
BibleVersioncontains SDK-facing lookup and fallback logic (book-code fallback, reference parsing, RTL detection, equality/hash) that was under-tested and important for correct behavior when metadata is missing or partial.Description
Tests/YouVersionPlatformCoreTests/BibleVersionTests.swiftto cover book-code fallback, missing metadata lookup failures, short USFM rejection, unknown chapter labels, text-direction RTL detection, and ID-based equality/hash semantics.versionWithBookCodes,versionWithoutBookMetadata,versionWithTextDirection,versionWithId, andbook(...)) to build minimalBibleVersion/BibleBookinputs without relying only on the large fixture.BibleVersionlookup logic.Testing
swift test --enable-code-coverage --filter YouVersionPlatformCoreTestsand merged profiles withllvm-profdata/llvm-cov; overallYouVersionPlatformCorecoverage reported at ~80.44% andBibleVersionregion coverage increased to 96.88% (line coverage forBibleVersionreported ~75.61%).swift testand the focused tests passed (test run completed successfully).swiftlint --strict(via the Linux binary) and found0lint violations.Codex Task
Greptile Summary
This PR adds focused tests for
BibleVersionfallback and lookup behavior.BibleVersionandBibleBookfixtures.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
BibleVersiontests and private fixture helpers with no concrete issues found.Reviews (1): Last reviewed commit: "test: cover BibleVersion lookup fallback..." | Re-trigger Greptile