Split format::test::units to per-unit tests
This commit is contained in:
parent
ebff87c733
commit
d6441454fc
|
@ -154,7 +154,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn units() {
|
||||
fn metres() {
|
||||
assert_eq!(PrefixedUnit(0.001, "mm"), prefixed_unit(MetricQuantity {
|
||||
amount: 0.0001,
|
||||
unit: Metric::Metre,
|
||||
|
@ -208,7 +208,10 @@ mod test {
|
|||
amount: -1000.0,
|
||||
unit: Metric::Metre,
|
||||
}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn grams() {
|
||||
assert_eq!(PrefixedUnit(1.0, "g"), prefixed_unit(MetricQuantity {
|
||||
amount: 0.1,
|
||||
unit: Metric::Gram,
|
||||
|
@ -242,7 +245,10 @@ mod test {
|
|||
amount: -1000.0,
|
||||
unit: Metric::Gram,
|
||||
}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn celcius() {
|
||||
assert_eq!(PrefixedUnit(1.0, "°C"), prefixed_unit(MetricQuantity {
|
||||
amount: 0.0001,
|
||||
unit: Metric::Celcius,
|
||||
|
|
Loading…
Reference in New Issue