diff options
author | Siri Hansen <[email protected]> | 2012-11-27 16:19:17 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2012-12-04 11:35:51 +0100 |
commit | a71ec754bb995f72f0c7fa244ceb21383d717cfc (patch) | |
tree | 446a5d77612c8fbf1fcc9ceecb67a4ff2f39c543 /lib/test_server/test/test_server_SUITE_data/test_server_cover_SUITE.erl | |
parent | bd67967b55a172b46c29a503439feb1e7c58ab06 (diff) | |
download | otp-a71ec754bb995f72f0c7fa244ceb21383d717cfc.tar.gz otp-a71ec754bb995f72f0c7fa244ceb21383d717cfc.tar.bz2 otp-a71ec754bb995f72f0c7fa244ceb21383d717cfc.zip |
[test_server] Add test of code cover mechanism
Diffstat (limited to 'lib/test_server/test/test_server_SUITE_data/test_server_cover_SUITE.erl')
-rw-r--r-- | lib/test_server/test/test_server_SUITE_data/test_server_cover_SUITE.erl | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/lib/test_server/test/test_server_SUITE_data/test_server_cover_SUITE.erl b/lib/test_server/test/test_server_SUITE_data/test_server_cover_SUITE.erl new file mode 100644 index 0000000000..b1ae70a302 --- /dev/null +++ b/lib/test_server/test/test_server_SUITE_data/test_server_cover_SUITE.erl @@ -0,0 +1,58 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2012. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +-module(test_server_cover_SUITE). + +-export([all/1, init_per_suite/1, end_per_suite/1]). +-export([init_per_testcase/2, end_per_testcase/2]). +-export([tc1/1, tc2/1]). + +-include_lib("test_server/include/test_server.hrl"). + +all(suite) -> + [tc1,tc2]. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_testcase(_Case,Config) -> + Dog = ?t:timetrap({minutes,10}), + [{watchdog, Dog}|Config]. + +end_per_testcase(_Case,Config) -> + Dog=?config(watchdog, Config), + ?t:timetrap_cancel(Dog), + ok. + + +%%%----------------------------------------------------------------- +%%% Test cases +tc1(Config) when is_list(Config) -> + cover_helper:foo(), + ok. + +tc2(Config) when is_list(Config) -> + cover_helper:bar(), + ok. + +%%%----------------------------------------------------------------- +%%% Internal functions + |