diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-03 23:21:19 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-03 23:21:19 +0100 |
commit | 565ae3b76791ba707a5a18be50be336533ef0857 (patch) | |
tree | 2c727e98c4780e6400594f176483fdbd7b6ccb63 /tests | |
parent | 26bed8aa85fc2f98e38552a82929e1deb5b29d8a (diff) | |
parent | 8d7d1b0bb29c5603ffd02d1c82247c59d6b90917 (diff) |
Merge pull request #67694 from aaronfranke/its-time
Remove duplicate Month and Weekday enums
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/test_time.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/core/test_time.h b/tests/core/test_time.h index 177512c832..ae3d624fe8 100644 --- a/tests/core/test_time.h +++ b/tests/core/test_time.h @@ -91,7 +91,7 @@ TEST_CASE("[Time] Datetime dictionary conversion methods") { datetime[YEAR_KEY] = 2014; datetime[MONTH_KEY] = 2; datetime[DAY_KEY] = 9; - datetime[WEEKDAY_KEY] = Time::Weekday::WEEKDAY_SUNDAY; + datetime[WEEKDAY_KEY] = Weekday::WEEKDAY_SUNDAY; datetime[HOUR_KEY] = 22; datetime[MINUTE_KEY] = 10; datetime[SECOND_KEY] = 30; @@ -100,7 +100,7 @@ TEST_CASE("[Time] Datetime dictionary conversion methods") { date_only[YEAR_KEY] = 2014; date_only[MONTH_KEY] = 2; date_only[DAY_KEY] = 9; - date_only[WEEKDAY_KEY] = Time::Weekday::WEEKDAY_SUNDAY; + date_only[WEEKDAY_KEY] = Weekday::WEEKDAY_SUNDAY; Dictionary time_only; time_only[HOUR_KEY] = 22; @@ -115,8 +115,8 @@ TEST_CASE("[Time] Datetime dictionary conversion methods") { CHECK_MESSAGE(time->get_date_dict_from_unix_time(1391904000).hash() == date_only.hash(), "Time get_date_dict_from_unix_time: The date timestamp for GODOT IS OPEN SOURCE is converted to a dictionary as expected."); CHECK_MESSAGE(time->get_time_dict_from_unix_time(79830).hash() == time_only.hash(), "Time get_time_dict_from_unix_time: The time timestamp for GODOT IS OPEN SOURCE is converted to a dictionary as expected."); - CHECK_MESSAGE((Time::Weekday)(int)time->get_datetime_dict_from_unix_time(0)[WEEKDAY_KEY] == Time::Weekday::WEEKDAY_THURSDAY, "Time get_datetime_dict_from_unix_time: The weekday for the Unix epoch is a Thursday as expected."); - CHECK_MESSAGE((Time::Weekday)(int)time->get_datetime_dict_from_unix_time(1391983830)[WEEKDAY_KEY] == Time::Weekday::WEEKDAY_SUNDAY, "Time get_datetime_dict_from_unix_time: The weekday for GODOT IS OPEN SOURCE is a Sunday as expected."); + CHECK_MESSAGE((Weekday)(int)time->get_datetime_dict_from_unix_time(0)[WEEKDAY_KEY] == Weekday::WEEKDAY_THURSDAY, "Time get_datetime_dict_from_unix_time: The weekday for the Unix epoch is a Thursday as expected."); + CHECK_MESSAGE((Weekday)(int)time->get_datetime_dict_from_unix_time(1391983830)[WEEKDAY_KEY] == Weekday::WEEKDAY_SUNDAY, "Time get_datetime_dict_from_unix_time: The weekday for GODOT IS OPEN SOURCE is a Sunday as expected."); CHECK_MESSAGE(time->get_datetime_dict_from_datetime_string("2014-02-09T22:10:30").hash() == datetime.hash(), "Time get_datetime_dict_from_string: The dictionary from string for GODOT IS OPEN SOURCE works as expected."); CHECK_MESSAGE(!time->get_datetime_dict_from_datetime_string("2014-02-09T22:10:30", false).has(WEEKDAY_KEY), "Time get_datetime_dict_from_string: The dictionary from string for GODOT IS OPEN SOURCE without weekday doesn't contain the weekday key as expected."); |