about summary refs log tree commit diff homepage
path: root/test/Feature/KleeStatsNoBr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Feature/KleeStatsNoBr.c')
-rw-r--r--test/Feature/KleeStatsNoBr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Feature/KleeStatsNoBr.c b/test/Feature/KleeStatsNoBr.c
new file mode 100644
index 00000000..45d48b74
--- /dev/null
+++ b/test/Feature/KleeStatsNoBr.c
@@ -0,0 +1,15 @@
+// RUN: %clang %s -emit-llvm -g %O0opt -c -o %t.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out %t.bc 2> %t.log
+// RUN: %klee-stats --print-columns 'BCov(%),Branches,FullBranches,PartialBranches' --table-format=csv %t.klee-out > %t.stats
+// RUN: FileCheck -check-prefix=CHECK-STATS -input-file=%t.stats %s
+
+int main(){
+  int a = 42;
+  a -= 42;
+  return a;
+}
+
+// Check that there are no branches in stats but 100% coverage
+// CHECK-STATS: BCov(%),Branches,FullBranches,PartialBranches
+// CHECK-STATS: 100.00,0,0,0