about summary refs log tree commit diff homepage
path: root/test/Feature/GetValue.c
blob: d2b046f4fd34ab148bbed406ecd759ff6445aad2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: %clang -emit-llvm -c -o %t1.bc %s
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out --exit-on-error %t1.bc

#include <stdio.h>
#include <assert.h>

int main() {
  int x = klee_int("x");
  klee_assume(x > 10);
  klee_assume(x < 20);

  assert(!klee_is_symbolic(klee_get_value_i32(x)));
  assert(klee_get_value_i32(x) > 10);
  assert(klee_get_value_i32(x) < 20);

  return 0;
}