summaryrefslogtreecommitdiff
path: root/test/profile/instrprof-gcov-switch.test
diff options
context:
space:
mode:
authorMarco Castelluccio <mcastelluccio@mozilla.com>2018-07-31 23:26:50 +0000
committerMarco Castelluccio <mcastelluccio@mozilla.com>2018-07-31 23:26:50 +0000
commit0865368b78480540349ee883fc2bc7f420c4d0ac (patch)
tree92bd9fced25580828979f8aa3770132fd3033934 /test/profile/instrprof-gcov-switch.test
parentf40bc2a4cbad7eef1be27d18369a072d7ec1cdc1 (diff)
[gcov] Add tests using switch, one with break clauses and one with fallthrough
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@338453 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/profile/instrprof-gcov-switch.test')
-rw-r--r--test/profile/instrprof-gcov-switch.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/profile/instrprof-gcov-switch.test b/test/profile/instrprof-gcov-switch.test
new file mode 100644
index 000000000..9c43a93dc
--- /dev/null
+++ b/test/profile/instrprof-gcov-switch.test
@@ -0,0 +1,16 @@
+RUN: mkdir -p %t.d
+RUN: cd %t.d
+
+RUN: %clang --coverage -o %t %S/Inputs/instrprof-gcov-switch1.c
+RUN: test -f instrprof-gcov-switch1.gcno
+RUN: rm -f instrprof-gcov-switch1.gcda
+RUN: %run %t
+RUN: llvm-cov gcov instrprof-gcov-switch1.gcda
+RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-switch1.c.gcov %S/Inputs/instrprof-gcov-switch1.c.gcov
+
+RUN: %clang --coverage -o %t %S/Inputs/instrprof-gcov-switch2.c
+RUN: test -f instrprof-gcov-switch2.gcno
+RUN: rm -f instrprof-gcov-switch2.gcda
+RUN: %run %t
+RUN: llvm-cov gcov instrprof-gcov-switch2.gcda
+RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-switch2.c.gcov %S/Inputs/instrprof-gcov-switch2.c.gcov