about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2012-09-11 16:45:32 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2012-09-11 16:45:32 +0000
commit1bc0219daa4f3a99f3b193dafe88a048f3e4a225 (patch)
tree845591226ca1c34620a5df7d5effbe1cca045323 /test
parent9c70b1c26a2f7eb9f88d6d5230f3a8e9bfbc8f51 (diff)
downloadklee-1bc0219daa4f3a99f3b193dafe88a048f3e4a225.tar.gz
Fixed test case to be independent of compiler optimizations and search heuristics.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@163631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Feature/WriteCov.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/Feature/WriteCov.c b/test/Feature/WriteCov.c
index defc7e59..bb2d64e8 100644
--- a/test/Feature/WriteCov.c
+++ b/test/Feature/WriteCov.c
@@ -1,15 +1,20 @@
 // RUN: %llvmgcc %s -emit-llvm -g -c -o %t2.bc
 // RUN: %klee --exit-on-error --write-cov %t2.bc
-// RUN: grep WriteCov.c:10 klee-last/test000002.cov
-// RUN: grep WriteCov.c:12 klee-last/test000001.cov
+// RUN: grep -c WriteCov.c:15  klee-last/test000001.cov klee-last/test000002.cov  >%t3.txt
+// RUN: grep -c WriteCov.c:17  klee-last/test000001.cov klee-last/test000002.cov >>%t3.txt
+// RUN: grep klee-last/test000001.cov:0 %t3.txt
+// RUN: grep klee-last/test000001.cov:1 %t3.txt
+// RUN: grep klee-last/test000002.cov:0 %t3.txt
+// RUN: grep klee-last/test000002.cov:1 %t3.txt
 
 #include <assert.h>
+#include <stdio.h>
 
 int main() {
   if (klee_range(0,2, "range")) {
-    assert(__LINE__ == 10); printf("__LINE__ = %d\n", __LINE__);
+    assert(__LINE__ == 15); printf("__LINE__ = %d\n", __LINE__);
   } else {
-    assert(__LINE__ == 12); printf("__LINE__ = %d\n", __LINE__);
+    assert(__LINE__ == 17); printf("__LINE__ = %d\n", __LINE__);
   }
   return 0;
 }