Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in BaseDimensions.ToString() #1431

Merged

Conversation

ygorshkov
Copy link
Contributor

Current implementation of AppendDimensionString ignores value -1.
This PR fixes the bug.

@ygorshkov ygorshkov force-pushed the bugfix/base-dimensions/to-string branch from 048a7ad to 80f40cc Compare October 23, 2024 16:05
@@ -695,7 +695,13 @@ public void CheckBaseDimensionMultiplicationWithForceEqualsMassTimesAcceleration
[Fact]
public void CheckToStringUsingMolarEntropy()
{
Assert.Equal("[Length]^2[Mass][Time]^-2[Temperature][Amount]", MolarEntropy.BaseDimensions.ToString());
Assert.Equal("[Length]^2[Mass][Time]^-2[Temperature]^-1[Amount]^-1", MolarEntropy.BaseDimensions.ToString());
Copy link
Contributor Author

@ygorshkov ygorshkov Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@angularsen angularsen merged commit b57ac63 into angularsen:master Oct 23, 2024
1 check passed
@ygorshkov ygorshkov deleted the bugfix/base-dimensions/to-string branch October 23, 2024 17:29
@angularsen
Copy link
Owner

Thanks! Nuget should be out shortly.

Release UnitsNet/5.61.0 · angularsen/UnitsNet

lipchev pushed a commit to lipchev/UnitsNet that referenced this pull request Dec 11, 2024
Current implementation of `AppendDimensionString` ignores value `-1`.
This PR fixes the bug.

---------

Co-authored-by: ygorshkov <yury.gorshkov@wartsila.com>
@angularsen angularsen added this to the v6 milestone Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants