26 lines
705 B
Rust
26 lines
705 B
Rust
use libstardit::libstardit::unix_to_stardit;
|
|
|
|
#[test]
|
|
fn test_unix_to_stardit_year() {
|
|
assert_eq!(12022, unix_to_stardit(1672574399.9999).year);
|
|
assert_eq!(12023, unix_to_stardit(1672574400.0000).year);
|
|
}
|
|
|
|
#[test]
|
|
fn test_unix_to_stardit_weekade() {
|
|
assert_eq!(36, unix_to_stardit(1672574399.9999).weekade);
|
|
assert_eq!(0, unix_to_stardit(1672574400.0000).weekade);
|
|
}
|
|
|
|
#[test]
|
|
fn test_unix_to_stardit_day() {
|
|
assert_eq!(365, unix_to_stardit(1672574399.9999).day);
|
|
assert_eq!(1, unix_to_stardit(1672574400.0000).day);
|
|
}
|
|
|
|
#[test]
|
|
fn test_unix_to_stardit_day_name() {
|
|
assert_eq!("quintidi", unix_to_stardit(1672574399.9999).day_name);
|
|
assert_eq!("unidi", unix_to_stardit(1672574400.0000).day_name);
|
|
}
|