diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-08-22 20:28:52 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-08-22 20:28:52 -0700 |
| commit | a2972868cfc52fb0863ff49ac6d34690f7628ac9 (patch) | |
| tree | ff00e486293ba5e468b9a29be81cf8d69c710cc9 | |
| parent | 0e69cec02fe26114bc1abf1c5470c0053d0ceaa4 (diff) | |
add unittest template
| -rw-r--r-- | tests/tests.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs new file mode 100644 index 0000000..58d409e --- /dev/null +++ b/tests/tests.rs @@ -0,0 +1,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"); + } +} + |
