aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/tests.rs20
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");
+ }
+}
+
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage