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/Feature/InAndOutOfBounds.c | |
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/Feature/InAndOutOfBounds.c')
-rw-r--r-- | test/Feature/InAndOutOfBounds.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/Feature/InAndOutOfBounds.c b/test/Feature/InAndOutOfBounds.c index 6eb8784a..9b913609 100644 --- a/test/Feature/InAndOutOfBounds.c +++ b/test/Feature/InAndOutOfBounds.c @@ -8,15 +8,15 @@ unsigned klee_urange(unsigned start, unsigned end) { unsigned x; klee_make_symbolic(&x, sizeof x, "x"); - if (x-start>=end-start) klee_silent_exit(0); + if (x - start >= end - start) + klee_silent_exit(0); return x; } int main() { int *x = malloc(sizeof(int)); - // FIXME: Use newer FileCheck syntax to support relative line numbers - // CHECK: InAndOutOfBounds.c:19: memory error: out of bound pointer - x[klee_urange(0,2)] = 1; + // CHECK: InAndOutOfBounds.c:[[@LINE+1]]: memory error: out of bound pointer + x[klee_urange(0, 2)] = 1; free(x); return 0; } |