diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2018-09-05 09:55:48 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-09-06 13:29:31 +0100 |
commit | cdce3e8385927bf2cf2a21902d6563ecea37262c (patch) | |
tree | 3b3daf8731b30acddb7783a28e8eb97637dae291 /test/CXX | |
parent | d2285e097656936c866ae6518e0a496cf4499517 (diff) | |
download | klee-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/CXX')
-rw-r--r-- | test/CXX/StaticConstructor.cpp | 2 | ||||
-rw-r--r-- | test/CXX/StaticDestructor.cpp | 11 |
2 files changed, 6 insertions, 7 deletions
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 <cassert> @@ -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; } |