xref: /third_party/rust/crates/rustix/tests/path/dec_int.rs (revision b8a62b91)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/rustix/tests/path/
1use rustix::path::DecInt;
2
3#[test]
4fn test_dec_int() {
5    assert_eq!(DecInt::new(0).as_ref().to_str().unwrap(), "0");
6    assert_eq!(DecInt::new(-1).as_ref().to_str().unwrap(), "-1");
7    assert_eq!(DecInt::new(789).as_ref().to_str().unwrap(), "789");
8    assert_eq!(
9        DecInt::new(i64::MIN).as_ref().to_str().unwrap(),
10        i64::MIN.to_string()
11    );
12    assert_eq!(
13        DecInt::new(i64::MAX).as_ref().to_str().unwrap(),
14        i64::MAX.to_string()
15    );
16    assert_eq!(
17        DecInt::new(u64::MAX).as_ref().to_str().unwrap(),
18        u64::MAX.to_string()
19    );
20}
21

Indexes created Thu Nov 07 10:32:03 CST 2024