about summary refs log tree commit diff homepage
path: root/test/Feature
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-05 05:37:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-05 05:37:59 +0000
commit1d168e4a14349eca7125ea508f8f219fad66508a (patch)
tree48dc5716400ed1fa91cbdd784059f461cd41dbcf /test/Feature
parentfa809d8e8fa496ecae313cd76f267d59963b6517 (diff)
downloadklee-1d168e4a14349eca7125ea508f8f219fad66508a.tar.gz
Add test case.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature')
-rw-r--r--test/Feature/Float.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Feature/Float.c b/test/Feature/Float.c
new file mode 100644
index 00000000..a1f54fd8
--- /dev/null
+++ b/test/Feature/Float.c
@@ -0,0 +1,22 @@
+// RUN: %llvmgcc -g -c %s -o %t.bc
+// RUN: %klee %t.bc > %t.log
+// RUN: grep "3.30* -1.10* 2.420*" %t.log
+
+#include <stdio.h>
+
+float fadd(float a, float b) {
+  return a + b;
+}
+
+float fsub(float a, float b) {
+  return a - b;
+}
+
+float fmul(float a, float b) {
+  return a * b;
+}
+
+int main() {
+  printf("%f %f %f\n", fadd(1.1, 2.2), fsub(1.1, 2.2), fmul(1.1, 2.2));
+  return 0;
+}