Skip to content

Commit

Permalink
Add ImperialQuart to Volume (#1254)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eternali authored Jun 2, 2023
1 parent 7a7c811 commit 3bd016a
Show file tree
Hide file tree
Showing 11 changed files with 180 additions and 81 deletions.
14 changes: 13 additions & 1 deletion Common/UnitDefinitions/Volume.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
}
]
},
{
{
"SingularName": "CubicDecimeter",
"PluralName": "CubicDecimeters",
"FromUnitToBaseFunc": "{x} / 1e3",
Expand Down Expand Up @@ -461,6 +461,18 @@
}
]
},
{
"SingularName": "ImperialQuart",
"PluralName": "ImperialQuarts",
"FromUnitToBaseFunc": "{x} * 1.1365225e-3",
"FromBaseToUnitFunc": "{x} / 1.1365225e-3",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "qt (imp.)" ]
}
]
},
{
"SingularName": "UsPint",
"PluralName": "UsPints",
Expand Down
3 changes: 2 additions & 1 deletion Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,8 @@
"UsQuart": 50,
"UsTablespoon": 51,
"UsTeaspoon": 52,
"Nanoliter": 53
"Nanoliter": 53,
"ImperialQuart": 57
},
"VolumeConcentration": {
"CentilitersPerLiter": 1,
Expand Down
13 changes: 13 additions & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Units/VolumeUnit.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions UnitsNet.Tests/CustomCode/VolumeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ public class VolumeTests : VolumeTestsBase

protected override double DecalitersInOneCubicMeter => 1e2;

/// <summary>
/// https://www.legislation.gov.uk/uksi/1995/1804/made
/// </summary>
protected override double ImperialQuartsInOneCubicMeter => 879.876993196;

[Fact]
public void VolumeDividedByAreaEqualsLength()
{
Expand Down
Loading

0 comments on commit 3bd016a

Please sign in to comment.