blob: 58d409e4c7509e597ce270dc345d4e2cc87b7a66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
extern crate ffxiv_chronowatcher;
use ffxiv_chronowatcher::eorzean_time::{convert_to_eorzean_date, EorzeanDate};
mod time_tests {
use super::*;
#[test]
fn test_convert_to_eorzean_date() {
let unix_timestamp = 1661114514;
let eorzean_date = convert_to_eorzean_date(unix_timestamp);
assert_eq!(eorzean_date.years, 1);
assert_eq!(eorzean_date.suns, 12);
assert_eq!(eorzean_date.bells, 12);
assert_eq!(eorzean_date.minutes, 4);
assert_eq!(eorzean_date.guardian, "Halone");
assert_eq!(eorzean_date.phase, "Waxing Gibbous");
assert_eq!(eorzean_date.moon, "First Astral Moon");
}
}
|