about summary refs log tree commit diff homepage
path: root/test/Feature/SourceMapping.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/SourceMapping.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/SourceMapping.c')
-rw-r--r--test/Feature/SourceMapping.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/test/Feature/SourceMapping.c b/test/Feature/SourceMapping.c
index 9835d701..bc13652d 100644
--- a/test/Feature/SourceMapping.c
+++ b/test/Feature/SourceMapping.c
@@ -19,37 +19,25 @@
 
 // CHECK-NEXT: {{[1-9][0-9]*}} {{[1-9][0-9]*}}
 
-
-// Ensure we have the right line number (and check called function markers).
-// CHECK: fn=f1
-// CHECK: cfn=f0
-// CHECK-NEXT: calls=1 {{[1-9][0-9]*}}
-// CHECK-NEXT: {{[1-9][0-9]*}} 48 {{.*}}
-
-// This check just brackets the checks above, to make sure they fall in the
-// appropriate region of the run.istats file.
-//
-// CHECK: fn=main
-
-
-
-
-
-
-
-// KEEP THIS AS LINE 40
-
 int f0(int a, int b) {
   return a + b;
 }
 
 int f1(int a, int b) {
-  // f0 is called on line 48
+  // Ensure we have the right line number (and check called function markers).
+  // CHECK: fn=f1
+  // CHECK: cfn=f0
+  // CHECK-NEXT: calls=1 {{[1-9][0-9]*}}
+  // CHECK-NEXT: {{[1-9][0-9]*}} [[@LINE+1]] {{.*}}
   return f0(a, b);
 }
 
+// This check just brackets the checks above, to make sure they fall in the
+// appropriate region of the run.istats file.
+//
+// CHECK: fn=main
 int main() {
   int x = f1(1, 2);
-  
+
   return x;
 }