diff options
author | Björn Gustavsson <[email protected]> | 2010-01-24 09:28:05 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-01-29 17:43:38 +0100 |
commit | fc1ddbbc8c979bf0dc67ec9bfcb95ac0e18e6161 (patch) | |
tree | cbc7c80a0613c00d9b94af0e6e9e128827d6d6b8 /lib/kernel/test/error_logger_SUITE.erl | |
parent | 0cd162311b1ae680fda3374d507a63ffa0605fa9 (diff) | |
download | otp-fc1ddbbc8c979bf0dc67ec9bfcb95ac0e18e6161.tar.gz otp-fc1ddbbc8c979bf0dc67ec9bfcb95ac0e18e6161.tar.bz2 otp-fc1ddbbc8c979bf0dc67ec9bfcb95ac0e18e6161.zip |
kernel tests: modernize guard tests
Diffstat (limited to 'lib/kernel/test/error_logger_SUITE.erl')
-rw-r--r-- | lib/kernel/test/error_logger_SUITE.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/kernel/test/error_logger_SUITE.erl b/lib/kernel/test/error_logger_SUITE.erl index a737949bbb..38940bbe31 100644 --- a/lib/kernel/test/error_logger_SUITE.erl +++ b/lib/kernel/test/error_logger_SUITE.erl @@ -45,7 +45,7 @@ all(suite) -> error_report(suite) -> []; error_report(doc) -> []; -error_report(Config) when list(Config) -> +error_report(Config) when is_list(Config) -> ?line error_logger:add_report_handler(?MODULE, self()), Rep1 = [{tag1,"data1"},{tag2,data2},{tag3,3}], Rep2 = [testing,"testing",{tag1,"tag1"}], @@ -85,7 +85,7 @@ error_report(Config) when list(Config) -> info_report(suite) -> []; info_report(doc) -> []; -info_report(Config) when list(Config) -> +info_report(Config) when is_list(Config) -> ?line error_logger:add_report_handler(?MODULE, self()), Rep1 = [{tag1,"data1"},{tag2,data2},{tag3,3}], Rep2 = [testing,"testing",{tag1,"tag1"}], @@ -125,7 +125,7 @@ info_report(Config) when list(Config) -> error(suite) -> []; error(doc) -> []; -error(Config) when list(Config) -> +error(Config) when is_list(Config) -> ?line error_logger:add_report_handler(?MODULE, self()), Msg1 = "This is a plain text string~n", Msg2 = "This is a text with arguments ~p~n", @@ -160,7 +160,7 @@ error(Config) when list(Config) -> info(suite) -> []; info(doc) -> []; -info(Config) when list(Config) -> +info(Config) when is_list(Config) -> ?line error_logger:add_report_handler(?MODULE, self()), Msg1 = "This is a plain text string~n", Msg2 = "This is a text with arguments ~p~n", @@ -188,7 +188,7 @@ info(Config) when list(Config) -> emulator(suite) -> []; emulator(doc) -> []; -emulator(Config) when list(Config) -> +emulator(Config) when is_list(Config) -> ?line error_logger:add_report_handler(?MODULE, self()), spawn(?MODULE, generate_error, []), reported(emulator), @@ -215,7 +215,7 @@ tty(Config) when is_list(Config) -> logfile(suite) -> []; logfile(doc) -> []; -logfile(Config) when list(Config) -> +logfile(Config) when is_list(Config) -> ?line case error_logger:logfile(filename) of {error, no_log_file} -> % Ok, we continues. do_logfile(); @@ -236,7 +236,7 @@ do_logfile() -> add(suite) -> []; add(doc) -> []; -add(Config) when list(Config) -> +add(Config) when is_list(Config) -> ?line {'EXIT',_} = (catch error_logger:add_report_handler("dummy")), ?line {'EXIT',_} = error_logger:add_report_handler(non_existing), ?line my_error = error_logger:add_report_handler(?MODULE, [error]), @@ -246,7 +246,7 @@ add(Config) when list(Config) -> delete(suite) -> []; delete(doc) -> []; -delete(Config) when list(Config) -> +delete(Config) when is_list(Config) -> ?line {'EXIT',_} = (catch error_logger:delete_report_handler("dummy")), ?line {error,_} = error_logger:delete_report_handler(non_existing), ok. @@ -265,7 +265,7 @@ reported(Tag, Type, Report) -> reported(emulator) -> receive - {error, "~s~n", String} when list(String) -> + {error, "~s~n", String} when is_list(String) -> test_server:messages_get(), ok after 1000 -> @@ -277,9 +277,9 @@ reported(emulator) -> %% Sends a notification to the Tester process about the events %% generated by the Tester process. %%----------------------------------------------------------------- -init(Tester) when pid(Tester) -> +init(Tester) when is_pid(Tester) -> {ok, Tester}; -init(Config) when list(Config) -> +init(Config) when is_list(Config) -> my_error. handle_event({Tag, _GL, {_EPid, Type, Report}}, Tester) -> |