diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-02-23 22:12:02 -0600 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-02-23 22:12:02 -0600 |
commit | 55aabb8b0607174668fcf63c2cee2edf4a1f8527 (patch) | |
tree | c0645943b785847ab8d46f5f6fc6b05bae54bdd3 /tests | |
parent | cfc7c78732198a7ebc43b92ed24e7025fdf4bc11 (diff) |
Add offset string from minutes conversion method to Time singleton
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/test_time.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/core/test_time.h b/tests/core/test_time.h index 903ca9c001..bc341c73bd 100644 --- a/tests/core/test_time.h +++ b/tests/core/test_time.h @@ -79,6 +79,9 @@ TEST_CASE("[Time] Unix time conversion to/from datetime string") { CHECK_MESSAGE(time->get_date_string_from_unix_time(1391904000) == "2014-02-09", "Time get_date_string_from_unix_time: The date for GODOT IS OPEN SOURCE without time is as expected."); CHECK_MESSAGE(time->get_time_string_from_unix_time(79830) == "22:10:30", "Time get_time_string_from_unix_time: The time for GODOT IS OPEN SOURCE without date is as expected."); CHECK_MESSAGE(time->get_datetime_string_from_unix_time(31494784780800) == "1000000-01-01T00:00:00", "Time get_datetime_string_from_unix_time: The timestamp for the year a million is as expected."); + CHECK_MESSAGE(time->get_offset_string_from_offset_minutes(0) == "+00:00", "Time get_offset_string_from_offset_minutes: The offset string is as expected."); + CHECK_MESSAGE(time->get_offset_string_from_offset_minutes(-600) == "-10:00", "Time get_offset_string_from_offset_minutes: The offset string is as expected."); + CHECK_MESSAGE(time->get_offset_string_from_offset_minutes(345) == "+05:45", "Time get_offset_string_from_offset_minutes: The offset string is as expected."); } TEST_CASE("[Time] Datetime dictionary conversion methods") { |