Coverage Report

Created: 2019-07-03 22:50

/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_EQ(CCV_CLI_INFO, ccv_cli_get_output_levels(), "set output levels should be exactly the get cli output levels");
9
1
  ccv_cli_set_output_levels(ccv_cli_output_level_and_above(CCV_CLI_INFO));
10
1
  REQUIRE(CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_INFO), "cli output levels set to CCV_CLI_INFO should contains CCV_CLI_INFO");
11
1
  REQUIRE(CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_ERROR), "cli output levels set to CCV_CLI_INFO should contains CCV_CLI_ERROR");
12
1
  REQUIRE(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_VERBOSE), "cli output levels set to CCV_CLI_INFO shouldn't contains CCV_CLI_VERBOSE");
13
1
  REQUIRE(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_NONE), "cli output levels set to CCV_CLI_INFO shouldn't contains CCV_CLI_NONE");
14
1
  ccv_cli_set_output_levels(ccv_cli_output_level_and_above(CCV_CLI_NONE));
15
1
  REQUIRE(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_INFO), "cli output levels set to CCV_CLI_NONE shouldn't contains CCV_CLI_INFO");
16
1
  REQUIRE(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_ERROR), "cli output levels set to CCV_CLI_NONE shouldn't contains CCV_CLI_ERROR");
17
1
  REQUIRE(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_VERBOSE), "cli output levels set to CCV_CLI_NONE shouldn't contains CCV_CLI_VERBOSE");
18
1
  REQUIRE(!CCV_CLI_OUTPUT_LEVEL_IS(CCV_CLI_NONE), "cli output levels set to CCV_CLI_NONE shouldn't contains CCV_CLI_NONE");
19
1
}
20
21
#include "case_main.h"