Skip to content

Inline expect tests fail when in a subdir #248

Description

@katrinafyi

Inline expect tests fail when in a subdir

commit 84a4c0bdd7536a833b2408df84e9afbcb16279fa (HEAD -> main)
Author: agle <a.michael1@uq.edu.au>
Date:   Fri Aug 14 10:38:47 2026 +1000

    test fail

diff --git a/lib/transforms/aslp/aslp.ml b/lib/transforms/aslp/aslp.ml
index 62389c9b..655d9276 100644
--- a/lib/transforms/aslp/aslp.ml
+++ b/lib/transforms/aslp/aslp.ml
@@ -212,3 +212,14 @@ let apply_stmt_addresses_from_block (block : _ Block.t) =
 
 (** TODO look into annotating attributes onto "landmark" points like memory
     access. *)
+
+
+
+let%expect_test "lift empty" =
+  let module I = (val Bincaml_ibi.from_generator (Aslp_state.empty_aslp_ids ()))
+  in
+  let x =
+    lift_code_block (module I) ~address:(Bitvec.of_int ~size:64 0x2000) []
+  in
+  List.iter (print_endline % Aslp_state.show_aslp_diamond) x;
+  [%expect {| |}]
alicia@gs429-9098 ~/D/p/bincaml7 (main)> dune runtest lib
File "lib/transforms/dune", line 21, characters 1-15:
21 |  (inline_tests)
      ^^^^^^^^^^^^^^
Fatal error: exception Sys_error("/home/alicia/Documents/programming/bincaml7/_build/.sandbox/56fbc1ea392b5b453c96ff43f75a0ac4/default/lib/transforms/aslp.ml: No such file or directory")
Raised by primitive operation at Stdlib.open_in_gen in file "stdlib.ml", line 405, characters 28-54
Called from Stdlib.open_in_bin in file "stdlib.ml" (inlined), line 413, characters 2-47
Called from Ppx_expect_runtime__Write_corrected_file.f in file "runtime/write_corrected_file.ml", line 35, characters 21-48
Called from Base__List.map in file "src/list.ml", line 433, characters 15-18
Called from Ppx_expect_runtime.(fun) in file "runtime/ppx_expect_runtime.ml", lines 90-99, characters 4-18
Called from Stdlib__List.map in file "list.ml", line 87, characters 15-19
Called from Ppx_inline_test_lib.exit in file "runtime-lib/ppx_inline_test_lib.ml", line 841, characters 2-49
Called from Dune__exe__Main in file "lib/transforms/.transforms.inline-tests/main.ml-gen", line 1, characters 9-36

related https://www.github.com/janestreet/ppx_expect/issues/65

❎ wontfix (put the test in /test/)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions