Coverage Report

Created: 2017-11-12 13:27

/home/liu/buildslave/linux-x64-runtests/build/test/unit/output.tests.c
Line
Count
Source
1
#include "ccv.h"
2
#include "case.h"
3
#include "ccv_case.h"
4
5
TEST_CASE("set and get cli output levels")
6
1
{
7
1
  ccv_cli_set_output_levels(CCV_CLI_INFO);
8
1
  
REQUIRE_EQ1
(CCV_CLI_INFO, ccv_cli_get_output_levels(), "set output levels should be exactly the get cli output levels")
;1
9
1
  ccv_cli_set_output_levels(ccv_cli_output_level_and_above(CCV_CLI_INFO));
10
1
  
REQUIRE1
(CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_INFO), "cli output levels set to CCV_CLI_INFO should contains CCV_CLI_INFO")
;1
11
1
  
REQUIRE1
(CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_ERROR), "cli output levels set to CCV_CLI_INFO should contains CCV_CLI_ERROR")
;1
12
1
  
REQUIRE1
(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_VERBOSE), "cli output levels set to CCV_CLI_INFO shouldn't contains CCV_CLI_VERBOSE")
;1
13
1
  
REQUIRE1
(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_NONE), "cli output levels set to CCV_CLI_INFO shouldn't contains CCV_CLI_NONE")
;1
14
1
  ccv_cli_set_output_levels(ccv_cli_output_level_and_above(CCV_CLI_NONE));
15
1
  
REQUIRE1
(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_INFO), "cli output levels set to CCV_CLI_NONE shouldn't contains CCV_CLI_INFO")
;1
16
1
  
REQUIRE1
(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_ERROR), "cli output levels set to CCV_CLI_NONE shouldn't contains CCV_CLI_ERROR")
;1
17
1
  
REQUIRE1
(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_VERBOSE), "cli output levels set to CCV_CLI_NONE shouldn't contains CCV_CLI_VERBOSE")
;1
18
1
  
REQUIRE1
(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_NONE), "cli output levels set to CCV_CLI_NONE shouldn't contains CCV_CLI_NONE")
;1
19
1
}
20
21
#include "case_main.h"