Skip to content

Commit 616ed52

Browse files
Add derived constants validation tests for PhysicalConstants
This update introduces comprehensive tests in PhysicalConstantsTests.cs to validate derived constants against calculated values. The tests cover area conversions, time relationships, and temperature conversions, ensuring accuracy and consistency across various derived unit relationships. This enhancement improves the robustness of the physical constants validation in the Semantics library, aligning with the recent refactor to centralize unit conversions in PhysicalConstants.
1 parent da59459 commit 616ed52

4 files changed

Lines changed: 760 additions & 3 deletions

File tree

.cursor/rules/derived-cursor-rules.mdc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,5 @@ When adding XML documentation comments:
220220
* Metric prefixes (handled by `MetricMagnitudes` class): `0.001`, `1000.0`, etc.
221221
* Mathematical constants (like `Math.PI`): Already using C# standard library
222222
* Derived unit relationships (like time conversions): `60.0` (seconds per minute), `3600.0` (seconds per hour)
223-
* Imperial unit conversions not in PhysicalConstants: Many specific imperial conversions that aren't fundamental physical constants
223+
* Imperial unit conversions not in PhysicalConstants: Many specific imperial conversions that aren't fundamental physical constants
224+
* **Testing Derived Constants:** Add additional tests for physical constants to validate stored values against calculated values from fundamental constants.

0 commit comments

Comments
 (0)