From cdce3e8385927bf2cf2a21902d6563ecea37262c Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Wed, 5 Sep 2018 09:55:48 +0100 Subject: 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. --- test/CXX/StaticConstructor.cpp | 2 +- test/CXX/StaticDestructor.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'test/CXX') diff --git a/test/CXX/StaticConstructor.cpp b/test/CXX/StaticConstructor.cpp index 56fcb97b..c184526e 100644 --- a/test/CXX/StaticConstructor.cpp +++ b/test/CXX/StaticConstructor.cpp @@ -20,7 +20,7 @@ public: Test t; int main() { - assert(t.getX()==22); + assert(t.getX() == 22); return 0; } diff --git a/test/CXX/StaticDestructor.cpp b/test/CXX/StaticDestructor.cpp index adc449a5..2cf01e3b 100644 --- a/test/CXX/StaticDestructor.cpp +++ b/test/CXX/StaticDestructor.cpp @@ -3,7 +3,7 @@ // RUN: %llvmgxx %s -emit-llvm -g -O0 -c -o %t1.bc // RUN: rm -rf %t.klee-out // RUN: %klee --output-dir=%t.klee-out --optimize=false --libc=klee --no-output %t1.bc 2> %t1.log -// RUN: grep ":17: memory error" %t1.log +// RUN: FileCheck --input-file %t1.log %s #include @@ -12,14 +12,13 @@ class Test { public: Test() : p(0) {} - ~Test() { - assert(!p); + ~Test() { + assert(!p); + // CHECK: :[[@LINE+1]]: memory error assert(*p == 10); // crash here } }; Test t; -int main(int argc, char** argv) { - return 0; -} +int main(int argc, char **argv) { return 0; } -- cgit 1.4.1