Conversation
- Add 6 new unit tests covering previously-untested API surface:
- ProvidedMeasureBuilder: One, Product, Inverse, Ratio, Square, SI unknown unit
- ProvidedStaticParameter: Name, ParameterType, Position, RawDefaultValue, Attributes
- TypeProviderForNamespaces: AddNamespace, Namespaces, Invalidate
- ProvidedField: SetFieldAttributes
- Add Coverage FAKE target to build.fsx using coverlet.collector
(already in paket.dependencies); run with:
dotnet fake run build.fsx -t Coverage
- Overall line coverage: 72.2% (up from ~72.1%); branch coverage: 56.8%
Closes #424
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/repo-assist fix the build errors and get this green |
…ield test Line 676 had an errant Assert.Equal referencing 'containersType' which was accidentally copy-pasted from another test scope and doesn't exist in this context. Remove it to fix the FS0039 build error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
🤖 This is an automated response from Repo Assist. Fixed the build error! The failure was caused by a stray Fix: removed that one errant assertion line. The test itself is correct and complete without it. Build now succeeds with 0 warnings, 0 errors.
|
🤖 This is an automated PR from Repo Assist.
Closes #424
What's changed
New tests (6)
Added targeted unit tests in
tests/BasicErasedProvisionTests.fsfor previously-untested API surface:test ProvidedMeasureBuilder One Product Inverse Ratio SquareProvidedMeasureBuilder.One,.Product,.Inverse,.Ratio,.Squaretest ProvidedMeasureBuilder SI unknown unitProvidedMeasureBuilder.SIwith an unrecognised unit name (returnsnull)test ProvidedStaticParameter propertiesProvidedStaticParameter.Name,.ParameterType,.Position,.RawDefaultValue,.Attributes— for both optional and non-optional paramstest TypeProviderForNamespaces AddNamespace and NamespacesTypeProviderForNamespaces.AddNamespaceand.Namespacespropertytest TypeProviderForNamespaces InvalidateTypeProviderForNamespaces.Invalidate()fires theITypeProvider.Invalidateeventtest ProvidedField SetFieldAttributesProvidedField.SetFieldAttributesmutates the field attributes correctlyNew
CoverageFAKE target inbuild.fsxUses
coverlet.collector(already inpaket.dependencies) to collect coverage and write a Cobertura XML report:Coverage
Coverage was already above the 60% target. The new tests increase it incrementally and add explicit documentation of the API surface via executable tests. The
Coveragetarget makes it easy to re-measure going forward.