summaryrefslogtreecommitdiff
path: root/test/Bindings/Ocaml
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2008-02-02 01:07:50 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2008-02-02 01:07:50 +0000
commite62a8a353c3b21b551c00b9025800d3352e5349e (patch)
treea37067a905622f829f744199fd5a0f2ba8cdb41e /test/Bindings/Ocaml
parentb8033e821d9ccad10ba8770c4561600a3e9ce6cc (diff)
downloadllvm-e62a8a353c3b21b551c00b9025800d3352e5349e.tar.gz
llvm-e62a8a353c3b21b551c00b9025800d3352e5349e.tar.bz2
llvm-e62a8a353c3b21b551c00b9025800d3352e5349e.tar.xz
Fixing a bug creating floating point constants of type other
than double through the C bindings. Thanks to Tomas Lindquist Olsen for reporting it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bindings/Ocaml')
-rw-r--r--test/Bindings/Ocaml/vmcore.ml16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/Bindings/Ocaml/vmcore.ml b/test/Bindings/Ocaml/vmcore.ml
index 457e7664ef..cfa22d503e 100644
--- a/test/Bindings/Ocaml/vmcore.ml
+++ b/test/Bindings/Ocaml/vmcore.ml
@@ -211,12 +211,18 @@ let test_constants () =
ignore (define_global "Const05" c m);
insist ((array_type i8_type 9) = type_of c);
- (* RUN: grep {Const06.*3.1459} < %t.ll
+ (* RUN: grep {ConstSingle.*2.75} < %t.ll
+ * RUN: grep {ConstDouble.*3.1459} < %t.ll
*)
- group "real";
- let c = const_float double_type 3.1459 in
- ignore (define_global "Const06" c m);
- insist (double_type = type_of c);
+ begin group "real";
+ let cs = const_float float_type 2.75 in
+ ignore (define_global "ConstSingle" cs m);
+ insist (float_type = type_of cs);
+
+ let cd = const_float double_type 3.1459 in
+ ignore (define_global "ConstDouble" cd m);
+ insist (double_type = type_of cd)
+ end;
let one = const_int i16_type 1 in
let two = const_int i16_type 2 in