Skip to content

Commit

Permalink
flambda-backend: Run float64 layout tests only under flambda2
Browse files Browse the repository at this point in the history
  • Loading branch information
mshinwell committed Nov 2, 2023
1 parent 108a7b7 commit 048ad61
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
7 changes: 6 additions & 1 deletion testsuite/tests/typing-layouts-float64/alloc.ml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
(* TEST
* flambda2
flags = "-extension layouts_beta"
* native
** native
*)

(* mshinwell: This test is now only run with flambda2, as the corresponding
ocamltest predicate is reliable for testing whether this is an
flambda-backend build. *)

(* A test comparing allocations with unboxed floats to allocations with boxed
floats. *)

Expand Down
13 changes: 9 additions & 4 deletions testsuite/tests/typing-layouts-float64/c_api.ml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
(* TEST
* flambda2
modules = "stubs.c"
reference = "${test_source_directory}/c_api.reference"
* native
** native
flags = "-extension layouts_alpha"
* bytecode
** bytecode
flags = "-extension layouts_alpha"
* native
** native
flags = "-extension layouts_beta"
* bytecode
** bytecode
flags = "-extension layouts_beta"
*)

(* mshinwell: This test is now only run with flambda2, as the corresponding
ocamltest predicate is reliable for testing whether this is an
flambda-backend build. *)

(* This file tests using external C functions with float#. *)

external to_float : float# -> (float[@local_opt]) = "%box_float"
Expand Down
19 changes: 12 additions & 7 deletions testsuite/tests/typing-layouts-float64/unboxed_floats.ml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
(* TEST
reference = "${test_source_directory}/unboxed_floats.reference"
* native
* flambda2
** native
flags = "-extension layouts_alpha"
* bytecode
** bytecode
flags = "-extension layouts_alpha"
* native
** native
flags = "-extension layouts_beta"
* bytecode
** bytecode
flags = "-extension layouts_beta"
* setup-ocamlc.byte-build-env
** setup-ocamlc.byte-build-env
ocamlc_byte_exit_status = "2"
flags = "-extension layouts"
** ocamlc.byte
*** ocamlc.byte
compiler_reference = "${test_source_directory}/unboxed_floats_disabled.compilers.reference"
*** check-ocamlc.byte-output
**** check-ocamlc.byte-output
*)

(* mshinwell: This test is now only run with flambda2, as the corresponding
ocamltest predicate is reliable for testing whether this is an
flambda-backend build. *)

(* This file contains various tests for float#. It's not an expect test to make
sure it gets tested for native code. *)

Expand Down

0 comments on commit 048ad61

Please sign in to comment.