From 0ba95edbad26fe70c8132f0731778d94f9609874 Mon Sep 17 00:00:00 2001 From: Frank Busse Date: Thu, 6 Jan 2022 18:00:30 +0000 Subject: tests: add Feature/KleeStatsNoBr.c --- test/Feature/KleeStatsNoBr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/Feature/KleeStatsNoBr.c 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 -- cgit 1.4.1