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
17 ORIGIN: <td class='column-entry-green'>
19 ORIGIN: <td class='column-entry-green'>
21 ORIGIN: <td class='column-entry-red'>
23 ORIGIN: <td class='column-entry-red'>
25 ORIGIN: <td class='column-entry-gray'>
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
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'>
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
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'>