about summary refs log tree commit diff homepage
path: root/test/Feature/KleeReportError.c
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2018-09-05 09:55:48 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-09-06 13:29:31 +0100
commitcdce3e8385927bf2cf2a21902d6563ecea37262c (patch)
tree3b3daf8731b30acddb7783a28e8eb97637dae291 /test/Feature/KleeReportError.c
parentd2285e097656936c866ae6518e0a496cf4499517 (diff)
downloadklee-cdce3e8385927bf2cf2a21902d6563ecea37262c.tar.gz
Use FileCheck and LINE instead of grep if possible
As we do not support LLVM 2.9 anymore, we can use FileCheck LINE instead of hard coding line numbers.
Diffstat (limited to 'test/Feature/KleeReportError.c')
-rw-r--r--test/Feature/KleeReportError.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/Feature/KleeReportError.c b/test/Feature/KleeReportError.c
index 4e21df18..96879a55 100644
--- a/test/Feature/KleeReportError.c
+++ b/test/Feature/KleeReportError.c
@@ -2,24 +2,24 @@
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --emit-all-errors %t2.bc 2>&1 | FileCheck %s
 // RUN: ls %t.klee-out/ | grep .my.err | wc -l | grep 2
-#include <stdio.h>
 #include <assert.h>
+#include <stdio.h>
 
-int main(int argc, char** argv) {
+int main(int argc, char **argv) {
   int x, y, *p = 0;
-  
+
   klee_make_symbolic(&x, sizeof x, "x");
   klee_make_symbolic(&y, sizeof y, "y");
 
   if (x)
     fprintf(stderr, "x\n");
-  else fprintf(stderr, "!x\n");
+  else
+    fprintf(stderr, "!x\n");
 
   if (y) {
     fprintf(stderr, "My error\n");
-    // CHECK: KleeReportError.c:23: My error
-    // CHECK: KleeReportError.c:23: My error
-    // FIXME: Use FileCheck's relative line number syntax
+    // CHECK: KleeReportError.c:[[@LINE+2]]: My error
+    // CHECK: KleeReportError.c:[[@LINE+1]]: My error
     klee_report_error(__FILE__, __LINE__, "My error", "my.err");
   }