Skip to content

Commit

Permalink
Add rack units (U)
Browse files Browse the repository at this point in the history
  • Loading branch information
printfn committed Mar 15, 2024
1 parent a477deb commit 91a73d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/units/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ const IMPERIAL_UNITS: &[UnitTuple] = &[
("ramsdens_chain", "", "l@5 rope", ""),
("roman_mile", "roman_miles", "l@50 ramsdens_chain", ""),
("gunters_chain", "gunters_chains", "l@4 rod", ""),
("rack_unit", "rack_units", "[email protected] inches", ""),
("U", "", "rack_unit", ""),
];

const LIQUID_UNITS: &[UnitTuple] = &[
Expand Down
5 changes: 5 additions & 0 deletions core/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5940,3 +5940,8 @@ fn test_roman() {
Some("100001 must lie in the interval [1, 100000]"),
);
}

#[test]
fn rack_unit() {
test_eval("4U to cm", "17.78 cm");
}

0 comments on commit 91a73d8

Please sign in to comment.