[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / tools / llvm-cov / coverage_watermark.test
blob5c48b4f0fb4bf4ddd56799d8b3ac6db93b85bff1
1 RUN: not llvm-cov show --instr-profile=/dev/null -coverage-watermark=foo /dev/null 2>&1 | FileCheck --check-prefix=INVALID-ARG %s
2 INVALID-ARG: error: -coverage-watermark: invalid argument 'foo', must be in format 'high,low'
4 RUN: not llvm-cov show --instr-profile=/dev/null -coverage-watermark=a,2 /dev/null 2>&1 | FileCheck --check-prefix=INVALID-HIGH %s
5 INVALID-HIGH: error: -coverage-watermark: invalid number 'a', invalid value for 'high'
7 RUN: not llvm-cov show --instr-profile=/dev/null -coverage-watermark=10,b /dev/null 2>&1 | FileCheck --check-prefix=INVALID-LOW %s
8 INVALID-LOW: error: -coverage-watermark: invalid number 'b', invalid value for 'low'
10 RUN: not llvm-cov show --instr-profile=/dev/null -coverage-watermark=10,20 /dev/null 2>&1 | FileCheck --check-prefix=INVALID-ARRANGE %s
11 INVALID-ARRANGE: error: -coverage-watermark: invalid number range '10,20', must be both high and low should be between 0-100, and high > low
13 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -format html -show-region-summary -show-instantiation-summary -o %t.html.dir -path-equivalence=/tmp,%S %S/showTemplateInstantiations.cpp
14 RUN: FileCheck -check-prefix=ORIGIN %s -input-file %t.html.dir/index.html
16 ORIGIN: Totals
17 ORIGIN: <td class='column-entry-green'>
18 ORIGIN: 100.00% (2/2)
19 ORIGIN: <td class='column-entry-green'>
20 ORIGIN: 100.00% (3/3)
21 ORIGIN: <td class='column-entry-red'>
22 ORIGIN: 75.00% (9/12)
23 ORIGIN: <td class='column-entry-red'>
24 ORIGIN: 66.67% (4/6)
25 ORIGIN: <td class='column-entry-gray'>
26 ORIGIN: - (0/0)
27 ORIGIN: </tr>
29 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -format html -show-region-summary -show-instantiation-summary -o %t.html.dir -path-equivalence=/tmp,%S -coverage-watermark 80,70 %S/showTemplateInstantiations.cpp
30 RUN: FileCheck -check-prefix=DOWNGRADE1 %s -input-file %t.html.dir/index.html
32 DOWNGRADE:1 Totals
33 DOWNGRADE1: <td class='column-entry-green'>
34 DOWNGRADE1: 100.00% (2/2)
35 DOWNGRADE1: <td class='column-entry-green'>
36 DOWNGRADE1: 100.00% (3/3)
37 DOWNGRADE1: <td class='column-entry-yellow'>
38 DOWNGRADE1: 75.00% (9/12)
39 DOWNGRADE1: <td class='column-entry-red'>
40 DOWNGRADE1: 66.67% (4/6)
41 DOWNGRADE1: <td class='column-entry-gray'>
42 DOWNGRADE1: - (0/0)
43 DOWNGRADE1: </tr>
45 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -format html -show-region-summary -show-instantiation-summary -o %t.html.dir -path-equivalence=/tmp,%S -coverage-watermark 70,50 %S/showTemplateInstantiations.cpp
46 RUN: FileCheck -check-prefix=DOWNGRADE2 %s -input-file %t.html.dir/index.html
48 DOWNGRADE:1 Totals
49 DOWNGRADE2: <td class='column-entry-green'>
50 DOWNGRADE2: 100.00% (2/2)
51 DOWNGRADE2: <td class='column-entry-green'>
52 DOWNGRADE2: 100.00% (3/3)
53 DOWNGRADE2: <td class='column-entry-green'>
54 DOWNGRADE2: 75.00% (9/12)
55 DOWNGRADE2: <td class='column-entry-yellow'>
56 DOWNGRADE2: 66.67% (4/6)
57 DOWNGRADE1: <td class='column-entry-gray'>
58 DOWNGRADE1: - (0/0)
59 DOWNGRADE1: </tr>