From ac3d53f83f83c95d35ed25c58fd55c7aeb834c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sat, 23 Jan 2010 12:41:02 +0100 Subject: 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. --- lib/stdlib/test/calendar_SUITE.erl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/stdlib/test/calendar_SUITE.erl') 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}}, % -- cgit v1.2.1