17 lines
401 B
Rust
17 lines
401 B
Rust
#![allow(clippy::unwrap_used)]
|
|
|
|
use crate::number_format::format_number;
|
|
|
|
#[test]
|
|
fn test_simple_format() {
|
|
let formatted = format_number(2.3, "General", "en");
|
|
assert_eq!(formatted.text, "2.3".to_string());
|
|
}
|
|
|
|
#[test]
|
|
#[ignore = "not yet implemented"]
|
|
fn test_wrong_locale() {
|
|
let formatted = format_number(2.3, "General", "ens");
|
|
assert_eq!(formatted.text, "#ERROR!".to_string());
|
|
}
|