diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2010-01-23 12:41:02 +0100 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2010-01-29 17:43:38 +0100 |
commit | ac3d53f83f83c95d35ed25c58fd55c7aeb834c62 (patch) | |
tree | 253e57883af480219b88675bfa1879818af5d80f /lib/stdlib/test/calendar_SUITE.erl | |
parent | b8b3a8c7d7d01cc4126dc4961c4f5de6afc1b066 (diff) | |
download | erlang-ac3d53f83f83c95d35ed25c58fd55c7aeb834c62.tar.gz |
stdlib tests: modernize guard tests
Don't change any guard tests in the id_transform_SUITE
module, because it intentionally use the old guard tests
to test that id_transform can handle them.
Diffstat (limited to 'lib/stdlib/test/calendar_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/calendar_SUITE.erl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/stdlib/test/calendar_SUITE.erl b/lib/stdlib/test/calendar_SUITE.erl index ea81bb99a9..dc167940e7 100644 --- a/lib/stdlib/test/calendar_SUITE.erl +++ b/lib/stdlib/test/calendar_SUITE.erl @@ -48,7 +48,7 @@ gregorian_days(doc) -> "At the same time valid_date is tested."; gregorian_days(suite) -> []; -gregorian_days(Config) when list(Config) -> +gregorian_days(Config) when is_list(Config) -> ?line Days = calendar:date_to_gregorian_days({?START_YEAR, 1, 1}), ?line MaxDays = calendar:date_to_gregorian_days({?END_YEAR, 1, 1}), ?line check_gregorian_days(Days, MaxDays). @@ -60,7 +60,7 @@ gregorian_seconds(doc) -> "every 2 days + 1 second."; gregorian_seconds(suite) -> []; -gregorian_seconds(Config) when list(Config) -> +gregorian_seconds(Config) when is_list(Config) -> ?line Secs = calendar:datetime_to_gregorian_seconds({{?START_YEAR, 1, 1}, {0, 0, 0}}), ?line MaxSecs = calendar:datetime_to_gregorian_seconds({{?END_YEAR, 1, 1}, @@ -72,7 +72,7 @@ day_of_the_week(doc) -> "year ?START_YEAR up to ?END_YEAR."; day_of_the_week(suite) -> []; -day_of_the_week(Config) when list(Config) -> +day_of_the_week(Config) when is_list(Config) -> ?line Days = calendar:date_to_gregorian_days({?START_YEAR, 1, 1}), ?line MaxDays = calendar:date_to_gregorian_days({?END_YEAR, 1, 1}), ?line DayNumber = calendar:day_of_the_week({?START_YEAR, 1, 1}), @@ -82,7 +82,7 @@ day_of_the_week_calibrate(doc) -> "Tests that day_of_the_week for 1997-11-11 is Tuesday (2)"; day_of_the_week_calibrate(suite) -> []; -day_of_the_week_calibrate(Config) when list(Config) -> +day_of_the_week_calibrate(Config) when is_list(Config) -> ?line 2 = calendar:day_of_the_week({1997, 11, 11}). leap_years(doc) -> @@ -90,7 +90,7 @@ leap_years(doc) -> "year ?START_YEAR up to ?END_YEAR."; leap_years(suite) -> []; -leap_years(Config) when list(Config) -> +leap_years(Config) when is_list(Config) -> ?line check_leap_years(?START_YEAR, ?END_YEAR). last_day_of_the_month(doc) -> @@ -98,14 +98,14 @@ last_day_of_the_month(doc) -> "year ?START_YEAR up to ?END_YEAR."; last_day_of_the_month(suite) -> []; -last_day_of_the_month(Config) when list(Config) -> +last_day_of_the_month(Config) when is_list(Config) -> ?line check_last_day_of_the_month({?START_YEAR, 1}, {?END_YEAR, 1}). local_time_to_universal_time_dst(doc) -> "Tests local_time_to_universal_time_dst for MET"; local_time_to_universal_time_dst(suite) -> []; -local_time_to_universal_time_dst(Config) when list(Config) -> +local_time_to_universal_time_dst(Config) when is_list(Config) -> case os:type() of {unix,_} -> case os:cmd("date '+%Z'") of @@ -117,7 +117,7 @@ local_time_to_universal_time_dst(Config) when list(Config) -> _ -> local_time_to_universal_time_dst_x(Config) end. -local_time_to_universal_time_dst_x(Config) when list(Config) -> +local_time_to_universal_time_dst_x(Config) when is_list(Config) -> %% Assumes MET (UTC+1 / UTC+2(dst) ?line LtW = {{2003,01,15},{14,00,00}}, % Winter ?line UtW = {{2003,01,15},{13,00,00}}, % |