Skip to content

Remove explicit string conversion operators in favor of .As<T>()#1

Merged
matt-edmondson merged 3 commits into
mainfrom
remove-explicit-string-conversion-operators
Jun 18, 2025
Merged

Remove explicit string conversion operators in favor of .As<T>()#1
matt-edmondson merged 3 commits into
mainfrom
remove-explicit-string-conversion-operators

Conversation

@matt-edmondson
Copy link
Copy Markdown
Contributor

Enhanced the SemanticString class by removing explicit conversion operators in favor of a more discoverable extension method pattern.

This commit includes the following changes:
- Downgraded the version of `BenchmarkDotNet` from 0.15.1 to 0.14.0 in `Directory.Packages.props`.
- Added new package versions for `ktsu.Extensions` (1.5.6) and `ktsu.SemanticString` (1.4.0).
- Updated `.gitattributes` and `.gitignore` files to ensure proper handling of backup files and temporary items.
- Removed unnecessary entries from `.mailmap` for cleaner metadata management.
- Enhanced the `SemanticString` class by removing explicit conversion operators in favor of a more discoverable extension method pattern.
@matt-edmondson matt-edmondson changed the title Update package versions and refine project metadata Remove explicit string conversion operators in favor of .As<T>() Jun 18, 2025
This commit updates the performance regression tests by adjusting the target performance thresholds to be more CI-friendly. The following changes were made:
- Updated the target for quantity creation from > 2.8M to > 1M ops/sec.
- Adjusted the unit conversions target from > 9M to > 3M ops/sec.
- Changed the arithmetic operations target from > 2.5M to > 1M ops/sec.
- Revised the physics relationship calculations target from > 2.2M to > 800K ops/sec.
- Modified the constant access target from > 50M to > 15M ops/sec.
- Updated the cross-domain calculations target from > 1M to > 500K ops/sec.

These changes aim to ensure that the performance tests remain relevant and achievable in a continuous integration environment.
This commit updates several unit tests to use `Assert.ThrowsExactly<TException>()` instead of `Assert.ThrowsException<TException>()` for more precise exception type checking. The changes were made in the following test methods:
- `AdvancedErrorScenarioTests`
- `SemanticStringAdditionalTests`

These modifications enhance the reliability of the tests by ensuring that the exact exception type is asserted, improving overall test accuracy.
@sonarqubecloud
Copy link
Copy Markdown

@matt-edmondson matt-edmondson merged commit 73e4162 into main Jun 18, 2025
5 checks passed
@github-project-automation github-project-automation Bot moved this to Done in ktsu.dev Jun 18, 2025
@matt-edmondson matt-edmondson deleted the remove-explicit-string-conversion-operators branch June 18, 2025 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant