From bd9e109ed6ba02e9d29cf211e31a4c67634aefa8 Mon Sep 17 00:00:00 2001 From: Lukasz Stafiniak Date: Mon, 26 Aug 2024 19:49:08 +0200 Subject: [PATCH] Restore `%log_entry` and always check runtime log level for `%log_block` --- CHANGELOG.md | 3 +- README.md | 23 +- index.mld | 24 +- ppx_minidebug.ml | 65 +- test/test_expect_test.ml | 424 +- test_expect_test.pp.ml | 16656 ------------------------------------- 6 files changed, 280 insertions(+), 16915 deletions(-) delete mode 100644 test_expect_test.pp.ml diff --git a/CHANGELOG.md b/CHANGELOG.md index 475d352..252a482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Compile-time explicit log levels `%debug1_sexp`, `%debug2_sexp`, `%log1`, `%log2`, `%log2_result`, `%log2_entry` etc. that participate in compile-time log level filtering. - Runtime log levels `%at_log_level`, `%logN`, `%logN_result`, `%logN_printbox` that take the level at which to log as argument. Note: not supported for extension entry points `%debug_sexp` etc. -- New unregistered extension point `%log_block` (replacing `%log_entry`) that assumes its body is logging code only, and does both compile-time and runtime pruning of the body according to the log level. +- New unregistered extension point `%log_block` (similar to `%log_entry`) that assumes its body is logging code only, and does both compile-time and runtime pruning of the body according to the log level. Limited to unit-type bodies. ### Changed @@ -13,7 +13,6 @@ - Removed `_this_` infix and make all extension points behave as `_this_` (not extend to bodies of toplevel bindings). - Removed `_rtb_` and `_lb_` -- all debugging should use the generic interface as it now offers all the functionality except configuration. - Removed a heuristic to not print extra debug information at log level 1 -- replaced by checking for `%diagn`. -- Removed the extension point `%log_entry` which did not assume the body is logging only -- replaced by `%log_block`. ## [1.6.1] -- 2024-08-21 diff --git a/README.md b/README.md index 7ccf2f3..48831c7 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ - [Breaking infinite recursion with max_nesting_depth and looping with max_num_children; Flushing-based traces](#breaking-infinite-recursion-with-max_nesting_depth-and-looping-with-max_num_children-flushing-based-traces) - [Tracking: control flow branches, anonymous and insufficiently annotated functions](#tracking-control-flow-branches-anonymous-and-insufficiently-annotated-functions) - [Using as a logging framework](#using-as-a-logging-framework) + - [Specifying the level to log at via a runtime expression](#specifying-the-level-to-log-at-via-a-runtime-expression) - [Lexical scopes vs. dynamic scopes](#lexical-scopes-vs-dynamic-scopes) - [Reducing the size of generated logs](#reducing-the-size-of-generated-logs) - [Navigating large logs](#navigating-large-logs) @@ -198,7 +199,7 @@ The entry extension points vary along three axes: - `%debug_` vs. `%track_` vs. `%diagn_` - The prefix `%debug_` means logging fewer things: only let-bound values and functions are logged, and functions only when either: directly in a `%debug_`-annotated let binding, or their return type is annotated. - `%track_` also logs: which `if`, `match`, `function` branch is taken, `for` and `while` loops, and all functions, including anonymous ones. - - The prefix `%diagn_` means only generating logs for explicitly logged values, i.e. introduced by `[%log_block]`, `[%log ...]`, `[%log_result ...]` and `[%log_printbox ...]` statements. + - The prefix `%diagn_` means only generating logs for explicitly logged values, i.e. introduced by `[%log ...]`, `[%log_result ...]`, `[%log_printbox ...]` statements. - Optional infixes `_rt_` and `_l_`: - `_rt_` adds a first-class module argument to a function, and unpacks it as `module Debug_runtime` for the scope of the function. - `_l_` calls `_get_local_debug_runtime`, and unpacks it for the scope of the function: `let module Debug_runtime = (val _get_local_debug_runtime ()) in ...`. @@ -208,13 +209,13 @@ The entry extension points vary along three axes: - `_show` converts values to strings via the `%show` extension provided by `deriving.show`: e.g. `[%show: int list]`. - `_sexp` converts values to sexp expressions first using `%sexp_of`, e.g. `[%sexp_of: int list]`. The runtime can decide how to print the sexp expressions. The `PrintBox` backend allows to convert the sexps to box structures first, with the `boxify_sexp_from_size` setting. This means large values can be unfolded gradually for inspection. -Plus, there are non-entry extension points `%log`, `%log_printbox` and `%log_result` for logging values. They are not registered, which as a side effect should somewhat mitigate conflicts with other ppx extensions for logging. There's also an un-registered extension point `%log_block` for opening a log subtree, whose body is for logging purposes only. +Plus, there are non-entry extension points `%log`, `%log_printbox` and `%log_result` for logging values. They are not registered, which as a side effect should somewhat mitigate conflicts with other ppx extensions for logging. There's also an un-registered extension points `%log_entry` and `%log_block` for opening a log subtree; `%log_entry` is for arbitrary computations whereas `%log_block`'s body is for logging purposes only. See examples in [the test directory](test/), and especially [the inline tests](test/test_expect_test.ml). -Only type-annotated let-bindings, function arguments, function results can be implicitly logged. However, the bindings and function arguments can be nested patterns with only parts of them type-annotated! The explicit loggers `%log` and `%log_result` take a value and reconstruct its type from partial type annotations (deconstructing the expression), sometimes assuming unknown types are strings. The `%log_printbox` logger takes a `PrintBox.t` value. The `%log_block` logger takes a string value for the header of the log subtree. +Only type-annotated let-bindings, function arguments, function results can be implicitly logged. However, the bindings and function arguments can be nested patterns with only parts of them type-annotated! The explicit loggers `%log` and `%log_result` take a value and reconstruct its type from partial type annotations (deconstructing the expression), sometimes assuming unknown types are strings. The `%log_printbox` logger takes a `PrintBox.t` value. The `%log_entry` and `%log_block` loggers takes a string value for the header of the log subtree. -To properly trace in concurrent settings, ensure that different threads use different log channels. For example, you can bind `Debug_runtime` locally: `let module Debug_runtime = Minidebug_runtime.debug_file thread_name in ...` +To properly trace in concurrent settings, ensure that different threads use different log channels. For example, you can bind `Debug_runtime` locally: `let module Debug_runtime = Minidebug_runtime.debug_file thread_name in ...` Extension points with the `_l_` or `_rt_` infixes are a great help for that, e.g. `%debug_l_sexp`; see: [Dealing with concurrent execution](#dealing-with-concurrent-execution). `ppx_minidebug` can be installed using `opam`. `ppx_minidebug.runtime` depends on `printbox`, `ptime`, `mtime`, `sexplib0`. @@ -650,12 +651,10 @@ The extension point `%log_printbox` lets you embed a `PrintBox.t` in the logs di └───┴───┴───┴───┴───┘ |} ``` -The extension point `%log_block` lets you shape arbitrary log tree structures. It needs special care if its body is not of type `unit`, as it will filter out its content based on log levels. Example from the test suite: +The extension point `%log_entry` lets you shape arbitrary log tree structures. The similar extension point `%log_block` ensures that its body doesn't get executed (resp. generated) when the current runtime (resp. compile-time) log level is inadequate. Example: ```ocaml let module Debug_runtime = (val Minidebug_runtime.debug ()) in - (* Because %log_block filters out its body based on log levels, it's crucial to always - encapsulate it when the body is not of type unit. *) let%diagn_show _logging_logic : unit = let logify _logs = [%log_block @@ -664,7 +663,7 @@ The extension point `%log_block` lets you shape arbitrary log tree structures. I match logs with | "start" :: header :: tl -> let more = - [%log_block + [%log_entry header; loop tl] in @@ -713,22 +712,20 @@ The extension point `%log_block` lets you shape arbitrary log tree structures. I |}] ``` -`%log_result`, `%log_printbox`, `%log_block` also allow log-level specifications (e.g. `%log2_block`). +`%log_result`, `%log_printbox`, `%log_entry`, `%log_block` also allow log-level specifications (e.g. `%log2_block`). #### Specifying the level to log at via a runtime expression The unregistered extension point `[%at_log_level for_log_level; ]` sets the default log level for logging expressions within `` to `for_log_level`, which can be any expression with integer type. -To express the runtime-known levels to log at more concisely, we have extension points `%logN`, `%logN_result`, `%logN_printbox`, `%logN_block`, by analogy to compile time levels where instead of the letter `N` there is a digit 1-9. With the letter `N`, the extension expressions take an extra argument that is the level to log at. For example, `[%logN for_log_level; "message"]` will log `"message"` when at runtime, `for_log_level`'s value is at or below the current log level. +To express the runtime-known levels to log at more concisely, we have extension points `%logN`, `%logN_result`, `%logN_printbox`, `%logN_block` (but not other extension points), by analogy to compile time levels where instead of the letter `N` there is a digit 1-9. With the letter `N`, the extension expressions take an extra argument that is the level to log at. For example, `[%logN for_log_level; "message"]` will log `"message"` when at runtime, `for_log_level`'s value is at or below the current log level. -In particular, `[%logN_block for_log_level "header"; ]` is equivalent to: +In particular, `[%logN_block for_log_level "header"; ]` is roughly equivalent to: ```ocaml if !Debug_runtime.log_level >= for_log_level then [%at_log_level for_log_level; [%log_entry "header"; ]] ``` -where `%log_entry` is hypothetical extension point that would simply introduce a logging subtree. `%log_block` replaced `%log_entry` in ppx_minidebug 2.0. - ### Lexical scopes vs. dynamic scopes We track lexical scoping: every log has access to the `entry_id` number of the lexical scope it is in. diff --git a/index.mld b/index.mld index 085a7cc..3465cd8 100644 --- a/index.mld +++ b/index.mld @@ -12,6 +12,8 @@ {ul {- {{: #breaking-infinite-recursion-with-max_nesting_depth-and-looping-with-max_num_children-flushing-based-traces} Breaking infinite recursion with max_nesting_depth and looping with max_num_children; Flushing-based traces} }{- {{: #tracking-control-flow-branches-anonymous-and-insufficiently-annotated-functions} Tracking: control flow branches, anonymous and insufficiently annotated functions} }{- {{: #using-as-a-logging-framework} Using as a logging framework} +{ul {- {{: #specifying-the-level-to-log-at-via-a-runtime-expression} Specifying the level to log at via a runtime expression} +}} }{- {{: #lexical-scopes-vs-dynamic-scopes} Lexical scopes vs. dynamic scopes} }{- {{: #reducing-the-size-of-generated-logs} Reducing the size of generated logs} }{- {{: #navigating-large-logs} Navigating large logs} @@ -199,7 +201,7 @@ The entry extension points vary along three axes: {ul {- [%debug_] vs. [%track_] vs. [%diagn_] {ul {- The prefix [%debug_] means logging fewer things: only let-bound values and functions are logged, and functions only when either: directly in a [%debug_]-annotated let binding, or their return type is annotated. }{- [%track_] also logs: which [if], [match], [function] branch is taken, [for] and [while] loops, and all functions, including anonymous ones. -}{- The prefix [%diagn_] means only generating logs for explicitly logged values, i.e. introduced by [[%log_block]], [[%log ...]], [[%log_result ...]] and [[%log_printbox ...]] statements. +}{- The prefix [%diagn_] means only generating logs for explicitly logged values, i.e. introduced by [[%log ...]], [[%log_result ...]], [[%log_printbox ...]] statements. }} }{- Optional infixes [_rt_] and [_l_]: {ul {- [_rt_] adds a first-class module argument to a function, and unpacks it as [module Debug_runtime] for the scope of the function. @@ -213,13 +215,13 @@ The entry extension points vary along three axes: }} }} -Plus, there are non-entry extension points [%log], [%log_printbox] and [%log_result] for logging values. They are not registered, which as a side effect should somewhat mitigate conflicts with other ppx extensions for logging. There's also an un-registered extension point [%log_block] for opening a log subtree, whose body is for logging purposes only. +Plus, there are non-entry extension points [%log], [%log_printbox] and [%log_result] for logging values. They are not registered, which as a side effect should somewhat mitigate conflicts with other ppx extensions for logging. There's also an un-registered extension points [%log_entry] and [%log_block] for opening a log subtree; [%log_entry] is for arbitrary computations whereas [%log_block]'s body is for logging purposes only. See examples in {{: test/} the test directory}, and especially {{: test/test_expect_test.ml} the inline tests}. -Only type-annotated let-bindings, function arguments, function results can be implicitly logged. However, the bindings and function arguments can be nested patterns with only parts of them type-annotated! The explicit loggers [%log] and [%log_result] take a value and reconstruct its type from partial type annotations (deconstructing the expression), sometimes assuming unknown types are strings. The [%log_printbox] logger takes a [PrintBox.t] value. The [%log_block] logger takes a string value for the header of the log subtree. +Only type-annotated let-bindings, function arguments, function results can be implicitly logged. However, the bindings and function arguments can be nested patterns with only parts of them type-annotated! The explicit loggers [%log] and [%log_result] take a value and reconstruct its type from partial type annotations (deconstructing the expression), sometimes assuming unknown types are strings. The [%log_printbox] logger takes a [PrintBox.t] value. The [%log_entry] and [%log_block] loggers takes a string value for the header of the log subtree. -To properly trace in concurrent settings, ensure that different threads use different log channels. For example, you can bind [Debug_runtime] locally: [let module Debug_runtime = Minidebug_runtime.debug_file thread_name in ...] +To properly trace in concurrent settings, ensure that different threads use different log channels. For example, you can bind [Debug_runtime] locally: [let module Debug_runtime = Minidebug_runtime.debug_file thread_name in ...] Extension points with the [_l_] or [_rt_] infixes are a great help for that, e.g. [%debug_l_sexp]; see: {{: #dealing-with-concurrent-execution} Dealing with concurrent execution}. [ppx_minidebug] can be installed using [opam]. [ppx_minidebug.runtime] depends on [printbox], [ptime], [mtime], [sexplib0]. @@ -655,12 +657,10 @@ The extension point [%log_printbox] lets you embed a [PrintBox.t] in the logs di └───┴───┴───┴───┴───┘ |} ]} -The extension point [%log_block] lets you shape arbitrary log tree structures. It needs special care if its body is not of type [unit], as it will filter out its content based on log levels. Example from the test suite: +The extension point [%log_entry] lets you shape arbitrary log tree structures. The similar extension point [%log_block] ensures that its body doesn't get executed (resp. generated) when the current runtime (resp. compile-time) log level is inadequate. Example: {@ocaml[ let module Debug_runtime = (val Minidebug_runtime.debug ()) in - (* Because %log_block filters out its body based on log levels, it's crucial to always - encapsulate it when the body is not of type unit. *) let%diagn_show _logging_logic : unit = let logify _logs = [%log_block @@ -669,7 +669,7 @@ The extension point [%log_block] lets you shape arbitrary log tree structures. I match logs with | "start" :: header :: tl -> let more = - [%log_block + [%log_entry header; loop tl] in @@ -718,22 +718,20 @@ The extension point [%log_block] lets you shape arbitrary log tree structures. I |}] ]} -[%log_result], [%log_printbox], [%log_block] also allow log-level specifications (e.g. [%log2_block]). +[%log_result], [%log_printbox], [%log_entry], [%log_block] also allow log-level specifications (e.g. [%log2_block]). {3 Specifying the level to log at via a runtime expression} The unregistered extension point [[%at_log_level for_log_level; ]] sets the default log level for logging expressions within [] to [for_log_level], which can be any expression with integer type. -To express the runtime-known levels to log at more concisely, we have extension points [%logN], [%logN_result], [%logN_printbox], [%logN_block], by analogy to compile time levels where instead of the letter [N] there is a digit 1-9. With the letter [N], the extension expressions take an extra argument that is the level to log at. For example, [[%logN for_log_level; "message"]] will log ["message"] when at runtime, [for_log_level]'s value is at or below the current log level. +To express the runtime-known levels to log at more concisely, we have extension points [%logN], [%logN_result], [%logN_printbox], [%logN_block] (but not other extension points), by analogy to compile time levels where instead of the letter [N] there is a digit 1-9. With the letter [N], the extension expressions take an extra argument that is the level to log at. For example, [[%logN for_log_level; "message"]] will log ["message"] when at runtime, [for_log_level]'s value is at or below the current log level. -In particular, [[%logN_block for_log_level "header"; ]] is equivalent to: +In particular, [[%logN_block for_log_level "header"; ]] is roughly equivalent to: {@ocaml[ if !Debug_runtime.log_level >= for_log_level then [%at_log_level for_log_level; [%log_entry "header"; ]] ]} -where [%log_entry] is hypothetical extension point that would simply introduce a logging subtree. [%log_block] replaced [%log_entry] in ppx_minidebug 2.0. - {2 Lexical scopes vs. dynamic scopes} We track lexical scoping: every log has access to the [entry_id] number of the lexical scope it is in. diff --git a/ppx_minidebug.ml b/ppx_minidebug.ml index 4b727db..6e6efac 100644 --- a/ppx_minidebug.ml +++ b/ppx_minidebug.ml @@ -124,7 +124,9 @@ let lift_track_or_explicit ~loc = function | `Debug -> [%expr `Debug] | `Track -> [%expr `Track] -let ll_to_expr ~loc = function Comptime ll -> A.eint ~loc ll | Runtime e -> e +let ll_to_expr ~digit_loc = function + | Comptime ll -> A.eint ~loc:digit_loc ll + | Runtime e -> e let open_log ?(message = "") ~loc ~log_level track_or_explicit = if String.contains message '\n' then @@ -141,13 +143,13 @@ let open_log ?(message = "") ~loc ~log_level track_or_explicit = ~end_lnum:[%e A.eint ~loc loc.loc_end.pos_lnum] ~end_colnum:[%e A.eint ~loc (loc.loc_end.pos_cnum - loc.loc_end.pos_bol)] ~message:[%e A.estring ~loc message] ~entry_id:__entry_id - ~log_level:[%e ll_to_expr ~loc log_level] + ~log_level:[%e ll_to_expr ~digit_loc:loc log_level] [%e lift_track_or_explicit ~loc track_or_explicit]] let open_log_no_source ~message ~loc ~log_level track_or_explicit = [%expr Debug_runtime.open_log_no_source ~message:[%e message] ~entry_id:__entry_id - ~log_level:[%e ll_to_expr ~loc log_level] + ~log_level:[%e ll_to_expr ~digit_loc:loc log_level] [%e lift_track_or_explicit ~loc track_or_explicit]] let close_log ~loc = @@ -198,7 +200,8 @@ let log_value_sexp context ~loc ~typ ?descr_loc ~is_explicit ~is_result ~log_lev [%expr Debug_runtime.log_value_sexp ?descr:[%e to_descr context ~loc ~descr_loc typ] - ~entry_id:__entry_id ~log_level:[%e ll_to_expr ~loc log_level] + ~entry_id:__entry_id + ~log_level:[%e ll_to_expr ~digit_loc:loc log_level] ~is_result:[%e A.ebool ~loc is_result] ([%sexp_of: [%t typ]] [%e exp])] @@ -229,7 +232,8 @@ let log_value_pp context ~loc ~typ ?descr_loc ~is_explicit ~is_result ~log_level [%expr Debug_runtime.log_value_pp ?descr:[%e to_descr context ~loc ~descr_loc typ] - ~entry_id:__entry_id ~log_level:[%e ll_to_expr ~loc log_level] + ~entry_id:__entry_id + ~log_level:[%e ll_to_expr ~digit_loc:loc log_level] ~pp:[%e converter] ~is_result:[%e A.ebool ~loc is_result] [%e exp]] | _ -> A.pexp_extension ~loc @@ -255,7 +259,8 @@ let log_value_show context ~loc ~typ ?descr_loc ~is_explicit ~is_result ~log_lev [%expr Debug_runtime.log_value_show ?descr:[%e to_descr context ~loc ~descr_loc typ] - ~entry_id:__entry_id ~log_level:[%e ll_to_expr ~loc log_level] + ~entry_id:__entry_id + ~log_level:[%e ll_to_expr ~digit_loc:loc log_level] ~is_result:[%e A.ebool ~loc is_result] ([%show: [%t typ]] [%e exp])] @@ -272,7 +277,8 @@ let log_value_printbox context ~loc ~log_level exp = incr global_log_count; [%expr Debug_runtime.log_value_printbox ~entry_id:__entry_id - ~log_level:[%e ll_to_expr ~loc log_level] [%e exp]] + ~log_level:[%e ll_to_expr ~digit_loc:loc log_level] + [%e exp]] let log_string ~loc ~descr_loc ~log_level s = if String.contains descr_loc.txt '\n' then @@ -283,13 +289,15 @@ let log_string ~loc ~descr_loc ~log_level s = [%expr Debug_runtime.log_value_show ~descr:[%e A.estring ~loc:descr_loc.loc descr_loc.txt] - ~entry_id:__entry_id ~log_level:[%e ll_to_expr ~loc log_level] ~is_result:false - [%e A.estring ~loc s]] + ~entry_id:__entry_id + ~log_level:[%e ll_to_expr ~digit_loc:loc log_level] + ~is_result:false [%e A.estring ~loc s]] let log_string_with_descr ~loc ~message ~log_level s = [%expr Debug_runtime.log_value_show ~descr:[%e message] ~entry_id:__entry_id - ~log_level:[%e ll_to_expr ~loc log_level] ~is_result:false [%e A.estring ~loc s]] + ~log_level:[%e ll_to_expr ~digit_loc:loc log_level] + ~is_result:false [%e A.estring ~loc s]] type fun_arg = | Pexp_fun_arg of @@ -1070,10 +1078,9 @@ let traverse_expression = [%e close_log ~loc]; raise e] in - match entry_log_level with - | Comptime _ -> result - | Runtime rt_ll -> - [%expr if !Debug_runtime.log_level >= [%e rt_ll] then [%e result]] + [%expr + if !Debug_runtime.log_level >= [%e ll_to_expr ~digit_loc:loc entry_log_level] + then [%e result]] in let exp = match exp.pexp_desc with @@ -1222,6 +1229,36 @@ let traverse_expression = @@ Location.error_extensionf ~loc "ppx_minidebug: bad syntax, expacted [%%log_block
; \ ]" + | Pexp_extension + ( { loc = _; txt }, + PStr + [%str + [%e? message]; + [%e? entry]] ) + when with_opt_digit ~prefix:"log" ~suffix:"_entry" txt -> + if is_comptime_nothing context then + callback { context with toplevel_opt_arg = Nested } entry + else + let entry_log_level = + Option.value ~default:context.entry_log_level + @@ get_opt_digit ~prefix:"log" ~suffix:"_entry" txt + in + let log_count_before = !global_log_count in + let preamble = + open_log_no_source ~message ~loc ~log_level:context.entry_log_level + context.track_or_explicit + in + let result = A.ppat_var ~loc { loc; txt = "__res" } in + let context = { context with entry_log_level } in + let entry = callback { context with toplevel_opt_arg = Nested } entry in + let log_result = [%expr ()] in + entry_with_interrupts context ~loc ~message ~log_count_before ~preamble + ~entry ~result ~log_result () + | Pexp_extension ({ loc = _; txt = "log_entry" }, PStr [%str [%e? _entry]]) -> + A.pexp_extension ~loc + @@ Location.error_extensionf ~loc + "ppx_minidebug: bad syntax, expacted [%%log_entry
; \ + ]" | (Pexp_newtype _ | Pexp_fun _) when context.toplevel_opt_arg <> Nested || not (context.track_or_explicit = `Diagn) -> diff --git a/test/test_expect_test.ml b/test/test_expect_test.ml index d620ca2..61122f4 100644 --- a/test/test_expect_test.ml +++ b/test/test_expect_test.ml @@ -3598,55 +3598,48 @@ let%expect_test "%log_printbox flushing" = foo end |}] -let%expect_test "%log_block" = +let%expect_test "%log_entry" = let module Debug_runtime = (val Minidebug_runtime.debug ()) in - (* Because %log_block filters out its body based on log levels, it's crucial to always - encapsulate it when the body is not of type unit. *) let%diagn_show _logging_logic : unit = - let logify _logs = - [%log_block - "logs"; - let rec loop logs = - match logs with - | "start" :: header :: tl -> - let more = - [%log_block - header; - loop tl] - in - loop more - | "end" :: tl -> tl - | msg :: tl -> - [%log msg]; - loop tl - | [] -> [] - in - ignore (loop _logs)] + let rec loop logs = + match logs with + | "start" :: header :: tl -> + let more = + [%log_entry + header; + loop tl] + in + loop more + | "end" :: tl -> tl + | msg :: tl -> + [%log msg]; + loop tl + | [] -> [] in - logify - [ - "preamble"; - "start"; - "header 1"; - "log 1"; - "start"; - "nested header"; - "log 2"; - "end"; - "log 3"; - "end"; - "start"; - "header 2"; - "log 4"; - "end"; - "postscript"; - ] + ignore + @@ loop + [ + "preamble"; + "start"; + "header 1"; + "log 1"; + "start"; + "nested header"; + "log 2"; + "end"; + "log 3"; + "end"; + "start"; + "header 2"; + "log 4"; + "end"; + "postscript"; + ] in [%expect {| - BEGIN DEBUG SESSION - "test/test_expect_test.ml":3605:17: _logging_logic - └─logs + BEGIN DEBUG SESSION + "test/test_expect_test.ml":3603:17: _logging_logic ├─"preamble" ├─header 1 │ ├─"log 1" @@ -3656,7 +3649,7 @@ let%expect_test "%log_block" = ├─header 2 │ └─"log 4" └─"postscript" - |}] + |}] let%expect_test "flame graph" = let module Debug_runtime = @@ -3686,36 +3679,36 @@ let%expect_test "flame graph" = print_endline output; [%expect {| -
+
-
+
-
+
-
+
-
+
-
-
+
-
+
-
-
+
-
+
-
+
-
+
-
-
+
-
+
-
+
- @@ -3790,31 +3783,31 @@ let%expect_test "flame graph reduced ToC" = print_endline output; [%expect {| -
+
-
+
-
+
-
+
-
+
-
+
-
-
+
-
+
-
+
-
+
-
+
-
+
- @@ -3872,10 +3865,10 @@ let%expect_test "%debug_show skip module bindings" = {| BEGIN DEBUG SESSION bar = 15 - ├─"test/test_expect_test.ml":3860:21 + ├─"test/test_expect_test.ml":3853:21 ├─x = 7 └─y = 8 - └─"test/test_expect_test.ml":3862:8 + └─"test/test_expect_test.ml":3855:8 15 |}] @@ -3901,52 +3894,52 @@ let%expect_test "%track_l_show procedure runtime passing" = [%expect {| BEGIN DEBUG SESSION foo-1 - foo-1 foo begin "test/test_expect_test.ml":3887:23: + foo-1 foo begin "test/test_expect_test.ml":3880:23: "inside foo" foo-1 foo end BEGIN DEBUG SESSION foo-1 - foo-1 () begin "test/test_expect_test.ml":3893:8: + foo-1 () begin "test/test_expect_test.ml":3886:8: "inside bar" foo-1 () end BEGIN DEBUG SESSION foo-2 - foo-2 foo begin "test/test_expect_test.ml":3887:23: + foo-2 foo begin "test/test_expect_test.ml":3880:23: "inside foo" foo-2 foo end BEGIN DEBUG SESSION foo-2 - foo-2 () begin "test/test_expect_test.ml":3893:8: + foo-2 () begin "test/test_expect_test.ml":3886:8: "inside bar" foo-2 () end BEGIN DEBUG SESSION foo-3 - foo-3 foo begin "test/test_expect_test.ml":3887:23: + foo-3 foo begin "test/test_expect_test.ml":3880:23: "inside foo" foo-3 foo end BEGIN DEBUG SESSION foo-3 - foo-3 () begin "test/test_expect_test.ml":3893:8: + foo-3 () begin "test/test_expect_test.ml":3886:8: "inside bar" foo-3 () end BEGIN DEBUG SESSION foo-4 - foo-4 foo begin "test/test_expect_test.ml":3887:23: + foo-4 foo begin "test/test_expect_test.ml":3880:23: "inside foo" foo-4 foo end BEGIN DEBUG SESSION foo-4 - foo-4 () begin "test/test_expect_test.ml":3893:8: + foo-4 () begin "test/test_expect_test.ml":3886:8: "inside bar" foo-4 () end BEGIN DEBUG SESSION foo-5 - foo-5 foo begin "test/test_expect_test.ml":3887:23: + foo-5 foo begin "test/test_expect_test.ml":3880:23: "inside foo" foo-5 foo end BEGIN DEBUG SESSION foo-5 - foo-5 () begin "test/test_expect_test.ml":3893:8: + foo-5 () begin "test/test_expect_test.ml":3886:8: "inside bar" foo-5 () end |}] @@ -4006,18 +3999,18 @@ let%expect_test "%debug_show tuples values_first_mode highlighted" = ┌─────────┐ │bar = 336│ ├─────────┘ - ├─"test/test_expect_test.ml":3990:21 + ├─"test/test_expect_test.ml":3983:21 ├─first = 7 ├─second = 42 └─┬─────┐ │y = 8│ ├─────┘ - └─"test/test_expect_test.ml":3991:8 + └─"test/test_expect_test.ml":3984:8 336 ┌────────┐ │(r1, r2)│ ├────────┘ - ├─"test/test_expect_test.ml":4000:17 + ├─"test/test_expect_test.ml":3993:17 ├─┬─────────┐ │ ││ │ ├─────────┘ @@ -4028,13 +4021,13 @@ let%expect_test "%debug_show tuples values_first_mode highlighted" = └─┬────────────────┐ │baz = (339, 109)│ ├────────────────┘ - ├─"test/test_expect_test.ml":3995:21 + ├─"test/test_expect_test.ml":3988:21 ├─first = 7 ├─second = 42 ├─┬──────┐ │ │(y, z)│ │ ├──────┘ - │ ├─"test/test_expect_test.ml":3996:8 + │ ├─"test/test_expect_test.ml":3989:8 │ └─┬────────┐ │ ││ │ ├────────┘ @@ -4045,7 +4038,7 @@ let%expect_test "%debug_show tuples values_first_mode highlighted" = └─┬──────┐ │(a, b)│ ├──────┘ - ├─"test/test_expect_test.ml":3997:8 + ├─"test/test_expect_test.ml":3990:8 └─┬────────┐ ││ ├────────┘ @@ -4118,45 +4111,45 @@ let%expect_test "%logN_block runtime log levels" = [%expect {| BEGIN DEBUG SESSION for=2,with=default - "test/test_expect_test.ml":4061:27: for=2,with=default result - ├─"test/test_expect_test.ml":4064:4: for=2,with=default while:test_expect_test:4064 - │ ├─"test/test_expect_test.ml":4065:6: for=2,with=default + "test/test_expect_test.ml":4054:27: for=2,with=default result + ├─"test/test_expect_test.ml":4057:4: for=2,with=default while:test_expect_test:4057 + │ ├─"test/test_expect_test.ml":4058:6: for=2,with=default │ │ └─for=2,with=default i=1 - │ │ ├─"test/test_expect_test.ml":4068:23: for=2,with=default then:test_expect_test:4068 + │ │ ├─"test/test_expect_test.ml":4061:23: for=2,with=default then:test_expect_test:4061 │ │ │ └─(ERROR: 1 i= 1) │ │ ├─(WARNING: 2 i= 1) - │ │ ├─"test/test_expect_test.ml":4070:13: for=2,with=default fun:test_expect_test:4070 + │ │ ├─"test/test_expect_test.ml":4063:13: for=2,with=default fun:test_expect_test:4063 │ │ └─(INFO: 3 j= 1) - │ ├─"test/test_expect_test.ml":4065:6: for=2,with=default + │ ├─"test/test_expect_test.ml":4058:6: for=2,with=default │ │ └─for=2,with=default i=2 - │ │ ├─"test/test_expect_test.ml":4068:23: for=2,with=default then:test_expect_test:4068 + │ │ ├─"test/test_expect_test.ml":4061:23: for=2,with=default then:test_expect_test:4061 │ │ │ └─(ERROR: 1 i= 2) │ │ ├─(WARNING: 2 i= 2) - │ │ ├─"test/test_expect_test.ml":4070:13: for=2,with=default fun:test_expect_test:4070 + │ │ ├─"test/test_expect_test.ml":4063:13: for=2,with=default fun:test_expect_test:4063 │ │ └─(INFO: 3 j= 3) - │ ├─"test/test_expect_test.ml":4065:6: for=2,with=default + │ ├─"test/test_expect_test.ml":4058:6: for=2,with=default │ │ └─for=2,with=default i=3 - │ │ ├─"test/test_expect_test.ml":4068:65: for=2,with=default else:test_expect_test:4068 + │ │ ├─"test/test_expect_test.ml":4061:65: for=2,with=default else:test_expect_test:4061 │ │ ├─(WARNING: 2 i= 3) - │ │ ├─"test/test_expect_test.ml":4070:13: for=2,with=default fun:test_expect_test:4070 + │ │ ├─"test/test_expect_test.ml":4063:13: for=2,with=default fun:test_expect_test:4063 │ │ └─(INFO: 3 j= 6) - │ ├─"test/test_expect_test.ml":4065:6: for=2,with=default + │ ├─"test/test_expect_test.ml":4058:6: for=2,with=default │ │ └─for=2,with=default i=4 - │ │ ├─"test/test_expect_test.ml":4068:65: for=2,with=default else:test_expect_test:4068 + │ │ ├─"test/test_expect_test.ml":4061:65: for=2,with=default else:test_expect_test:4061 │ │ ├─(WARNING: 2 i= 4) - │ │ ├─"test/test_expect_test.ml":4070:13: for=2,with=default fun:test_expect_test:4070 + │ │ ├─"test/test_expect_test.ml":4063:13: for=2,with=default fun:test_expect_test:4063 │ │ └─(INFO: 3 j= 10) - │ ├─"test/test_expect_test.ml":4065:6: for=2,with=default + │ ├─"test/test_expect_test.ml":4058:6: for=2,with=default │ │ └─for=2,with=default i=5 - │ │ ├─"test/test_expect_test.ml":4068:65: for=2,with=default else:test_expect_test:4068 + │ │ ├─"test/test_expect_test.ml":4061:65: for=2,with=default else:test_expect_test:4061 │ │ ├─(WARNING: 2 i= 5) - │ │ ├─"test/test_expect_test.ml":4070:13: for=2,with=default fun:test_expect_test:4070 + │ │ ├─"test/test_expect_test.ml":4063:13: for=2,with=default fun:test_expect_test:4063 │ │ └─(INFO: 3 j= 15) - │ └─"test/test_expect_test.ml":4065:6: for=2,with=default + │ └─"test/test_expect_test.ml":4058:6: for=2,with=default │ └─for=2,with=default i=6 - │ ├─"test/test_expect_test.ml":4068:65: for=2,with=default else:test_expect_test:4068 + │ ├─"test/test_expect_test.ml":4061:65: for=2,with=default else:test_expect_test:4061 │ ├─(WARNING: 2 i= 6) - │ ├─"test/test_expect_test.ml":4070:13: for=2,with=default fun:test_expect_test:4070 + │ ├─"test/test_expect_test.ml":4063:13: for=2,with=default fun:test_expect_test:4063 │ └─(INFO: 3 j= 21) └─result = 21 21 @@ -4166,171 +4159,169 @@ let%expect_test "%logN_block runtime log levels" = BEGIN DEBUG SESSION for=2,with=1 result = 0 - ├─"test/test_expect_test.ml":4061:27 + ├─"test/test_expect_test.ml":4054:27 ├─for=2,with=1 result - └─for=2,with=1 while:test_expect_test:4064 - ├─"test/test_expect_test.ml":4064:4 + └─for=2,with=1 while:test_expect_test:4057 + ├─"test/test_expect_test.ml":4057:4 ├─for=2,with=1 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 ├─for=2,with=1 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 ├─for=2,with=1 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 ├─for=2,with=1 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 ├─for=2,with=1 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 └─for=2,with=1 - └─"test/test_expect_test.ml":4065:6 + └─"test/test_expect_test.ml":4058:6 0 BEGIN DEBUG SESSION for=1,with=2 result = 21 - ├─"test/test_expect_test.ml":4061:27 + ├─"test/test_expect_test.ml":4054:27 ├─for=1,with=2 result - └─for=1,with=2 while:test_expect_test:4064 - ├─"test/test_expect_test.ml":4064:4 + └─for=1,with=2 while:test_expect_test:4057 + ├─"test/test_expect_test.ml":4057:4 ├─for=1,with=2 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=1,with=2 i=1 - │ ├─for=1,with=2 then:test_expect_test:4068 - │ │ ├─"test/test_expect_test.ml":4068:23 + │ ├─for=1,with=2 then:test_expect_test:4061 + │ │ ├─"test/test_expect_test.ml":4061:23 │ │ └─(ERROR: 1 i= 1) │ ├─(WARNING: 2 i= 1) - │ └─for=1,with=2 fun:test_expect_test:4070 - │ └─"test/test_expect_test.ml":4070:13 + │ └─for=1,with=2 fun:test_expect_test:4063 + │ └─"test/test_expect_test.ml":4063:13 ├─for=1,with=2 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=1,with=2 i=2 - │ ├─for=1,with=2 then:test_expect_test:4068 - │ │ ├─"test/test_expect_test.ml":4068:23 + │ ├─for=1,with=2 then:test_expect_test:4061 + │ │ ├─"test/test_expect_test.ml":4061:23 │ │ └─(ERROR: 1 i= 2) │ ├─(WARNING: 2 i= 2) - │ └─for=1,with=2 fun:test_expect_test:4070 - │ └─"test/test_expect_test.ml":4070:13 + │ └─for=1,with=2 fun:test_expect_test:4063 + │ └─"test/test_expect_test.ml":4063:13 ├─for=1,with=2 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=1,with=2 i=3 - │ ├─for=1,with=2 else:test_expect_test:4068 - │ │ └─"test/test_expect_test.ml":4068:65 + │ ├─for=1,with=2 else:test_expect_test:4061 + │ │ └─"test/test_expect_test.ml":4061:65 │ ├─(WARNING: 2 i= 3) - │ └─for=1,with=2 fun:test_expect_test:4070 - │ └─"test/test_expect_test.ml":4070:13 + │ └─for=1,with=2 fun:test_expect_test:4063 + │ └─"test/test_expect_test.ml":4063:13 ├─for=1,with=2 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=1,with=2 i=4 - │ ├─for=1,with=2 else:test_expect_test:4068 - │ │ └─"test/test_expect_test.ml":4068:65 + │ ├─for=1,with=2 else:test_expect_test:4061 + │ │ └─"test/test_expect_test.ml":4061:65 │ ├─(WARNING: 2 i= 4) - │ └─for=1,with=2 fun:test_expect_test:4070 - │ └─"test/test_expect_test.ml":4070:13 + │ └─for=1,with=2 fun:test_expect_test:4063 + │ └─"test/test_expect_test.ml":4063:13 ├─for=1,with=2 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=1,with=2 i=5 - │ ├─for=1,with=2 else:test_expect_test:4068 - │ │ └─"test/test_expect_test.ml":4068:65 + │ ├─for=1,with=2 else:test_expect_test:4061 + │ │ └─"test/test_expect_test.ml":4061:65 │ ├─(WARNING: 2 i= 5) - │ └─for=1,with=2 fun:test_expect_test:4070 - │ └─"test/test_expect_test.ml":4070:13 + │ └─for=1,with=2 fun:test_expect_test:4063 + │ └─"test/test_expect_test.ml":4063:13 └─for=1,with=2 - ├─"test/test_expect_test.ml":4065:6 + ├─"test/test_expect_test.ml":4058:6 └─for=1,with=2 i=6 - ├─for=1,with=2 else:test_expect_test:4068 - │ └─"test/test_expect_test.ml":4068:65 + ├─for=1,with=2 else:test_expect_test:4061 + │ └─"test/test_expect_test.ml":4061:65 ├─(WARNING: 2 i= 6) - └─for=1,with=2 fun:test_expect_test:4070 - └─"test/test_expect_test.ml":4070:13 + └─for=1,with=2 fun:test_expect_test:4063 + └─"test/test_expect_test.ml":4063:13 21 BEGIN DEBUG SESSION for=3,with=3 result = 21 - ├─"test/test_expect_test.ml":4061:27 + ├─"test/test_expect_test.ml":4054:27 ├─for=3,with=3 result - └─for=3,with=3 while:test_expect_test:4064 - ├─"test/test_expect_test.ml":4064:4 + └─for=3,with=3 while:test_expect_test:4057 + ├─"test/test_expect_test.ml":4057:4 ├─for=3,with=3 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=3,with=3 i=1 - │ ├─for=3,with=3 then:test_expect_test:4068 - │ │ ├─"test/test_expect_test.ml":4068:23 + │ ├─for=3,with=3 then:test_expect_test:4061 + │ │ ├─"test/test_expect_test.ml":4061:23 │ │ └─(ERROR: 1 i= 1) │ ├─(WARNING: 2 i= 1) - │ ├─for=3,with=3 fun:test_expect_test:4070 - │ │ └─"test/test_expect_test.ml":4070:13 + │ ├─for=3,with=3 fun:test_expect_test:4063 + │ │ └─"test/test_expect_test.ml":4063:13 │ └─(INFO: 3 j= 1) ├─for=3,with=3 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=3,with=3 i=2 - │ ├─for=3,with=3 then:test_expect_test:4068 - │ │ ├─"test/test_expect_test.ml":4068:23 + │ ├─for=3,with=3 then:test_expect_test:4061 + │ │ ├─"test/test_expect_test.ml":4061:23 │ │ └─(ERROR: 1 i= 2) │ ├─(WARNING: 2 i= 2) - │ ├─for=3,with=3 fun:test_expect_test:4070 - │ │ └─"test/test_expect_test.ml":4070:13 + │ ├─for=3,with=3 fun:test_expect_test:4063 + │ │ └─"test/test_expect_test.ml":4063:13 │ └─(INFO: 3 j= 3) ├─for=3,with=3 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=3,with=3 i=3 - │ ├─for=3,with=3 else:test_expect_test:4068 - │ │ └─"test/test_expect_test.ml":4068:65 + │ ├─for=3,with=3 else:test_expect_test:4061 + │ │ └─"test/test_expect_test.ml":4061:65 │ ├─(WARNING: 2 i= 3) - │ ├─for=3,with=3 fun:test_expect_test:4070 - │ │ └─"test/test_expect_test.ml":4070:13 + │ ├─for=3,with=3 fun:test_expect_test:4063 + │ │ └─"test/test_expect_test.ml":4063:13 │ └─(INFO: 3 j= 6) ├─for=3,with=3 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=3,with=3 i=4 - │ ├─for=3,with=3 else:test_expect_test:4068 - │ │ └─"test/test_expect_test.ml":4068:65 + │ ├─for=3,with=3 else:test_expect_test:4061 + │ │ └─"test/test_expect_test.ml":4061:65 │ ├─(WARNING: 2 i= 4) - │ ├─for=3,with=3 fun:test_expect_test:4070 - │ │ └─"test/test_expect_test.ml":4070:13 + │ ├─for=3,with=3 fun:test_expect_test:4063 + │ │ └─"test/test_expect_test.ml":4063:13 │ └─(INFO: 3 j= 10) ├─for=3,with=3 - │ ├─"test/test_expect_test.ml":4065:6 + │ ├─"test/test_expect_test.ml":4058:6 │ └─for=3,with=3 i=5 - │ ├─for=3,with=3 else:test_expect_test:4068 - │ │ └─"test/test_expect_test.ml":4068:65 + │ ├─for=3,with=3 else:test_expect_test:4061 + │ │ └─"test/test_expect_test.ml":4061:65 │ ├─(WARNING: 2 i= 5) - │ ├─for=3,with=3 fun:test_expect_test:4070 - │ │ └─"test/test_expect_test.ml":4070:13 + │ ├─for=3,with=3 fun:test_expect_test:4063 + │ │ └─"test/test_expect_test.ml":4063:13 │ └─(INFO: 3 j= 15) └─for=3,with=3 - ├─"test/test_expect_test.ml":4065:6 + ├─"test/test_expect_test.ml":4058:6 └─for=3,with=3 i=6 - ├─for=3,with=3 else:test_expect_test:4068 - │ └─"test/test_expect_test.ml":4068:65 + ├─for=3,with=3 else:test_expect_test:4061 + │ └─"test/test_expect_test.ml":4061:65 ├─(WARNING: 2 i= 6) - ├─for=3,with=3 fun:test_expect_test:4070 - │ └─"test/test_expect_test.ml":4070:13 + ├─for=3,with=3 fun:test_expect_test:4063 + │ └─"test/test_expect_test.ml":4063:13 └─(INFO: 3 j= 21) 21 BEGIN DEBUG SESSION for=4,with=3 result = 0 - ├─"test/test_expect_test.ml":4061:27 + ├─"test/test_expect_test.ml":4054:27 ├─for=4,with=3 result - └─for=4,with=3 while:test_expect_test:4064 - ├─"test/test_expect_test.ml":4064:4 + └─for=4,with=3 while:test_expect_test:4057 + ├─"test/test_expect_test.ml":4057:4 ├─for=4,with=3 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 ├─for=4,with=3 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 ├─for=4,with=3 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 ├─for=4,with=3 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 ├─for=4,with=3 - │ └─"test/test_expect_test.ml":4065:6 + │ └─"test/test_expect_test.ml":4058:6 └─for=4,with=3 - └─"test/test_expect_test.ml":4065:6 + └─"test/test_expect_test.ml":4058:6 0 |}] let%expect_test "%log_block compile-time nothing" = let module Debug_runtime = (val Minidebug_runtime.debug ()) in - (* Because %log_block filters out its body based on log levels, it's crucial to always - encapsulate it when the body is not of type unit. *) let%diagn_show _logging_logic : unit = [%log_level 0; @@ -4341,7 +4332,7 @@ let%expect_test "%log_block compile-time nothing" = match logs with | "start" :: header :: tl -> let more = - [%log_block + [%log_entry header; loop tl] in @@ -4373,5 +4364,4 @@ let%expect_test "%log_block compile-time nothing" = "postscript"; ]] in - [%expect - {| BEGIN DEBUG SESSION |}] + [%expect {| BEGIN DEBUG SESSION |}] diff --git a/test_expect_test.pp.ml b/test_expect_test.pp.ml deleted file mode 100644 index 47d2da2..0000000 --- a/test_expect_test.pp.ml +++ /dev/null @@ -1,16656 +0,0 @@ -[@@@ocaml.ppx.context - { - tool_name = "ppx_driver"; - include_dirs = []; - hidden_include_dirs = []; - load_path = ([], []); - open_modules = []; - for_package = None; - debug = false; - use_threads = false; - use_vmthreads = false; - recursive_types = false; - principal = false; - transparent_modules = false; - unboxed_types = false; - unsafe_string = false; - cookies = [("library-name", "test_inline_tests")] - }] -let () = - Ppx_expect_runtime.Current_file.set - ~filename_rel_to_project_root:"test/test_expect_test.ml" -let () = - Ppx_inline_test_lib.set_lib_and_partition "test_inline_tests" - "test_expect_test.ml" -type t = { - first: int ; - second: int }[@@deriving show] -include - struct - let _ = fun (_ : t) -> () - let rec pp : - Ppx_deriving_runtime.Format.formatter -> t -> Ppx_deriving_runtime.unit - = - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun fmt x -> - Ppx_deriving_runtime.Format.fprintf fmt "@[<2>{ "; - ((Ppx_deriving_runtime.Format.fprintf fmt "@[%s =@ " - "Test_expect_test.first"; - (Ppx_deriving_runtime.Format.fprintf fmt "%d") x.first; - Ppx_deriving_runtime.Format.fprintf fmt "@]"); - Ppx_deriving_runtime.Format.fprintf fmt ";@ "; - Ppx_deriving_runtime.Format.fprintf fmt "@[%s =@ " "second"; - (Ppx_deriving_runtime.Format.fprintf fmt "%d") x.second; - Ppx_deriving_runtime.Format.fprintf fmt "@]"); - Ppx_deriving_runtime.Format.fprintf fmt "@ }@]") - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - and show : t -> Ppx_deriving_runtime.string = - fun x -> Ppx_deriving_runtime.Format.asprintf "%a" pp x[@@ocaml.warning - "-32"] - let _ = pp - and _ = show - end[@@ocaml.doc "@inline"][@@merlin.hide ] -let sexp_of_string s = Sexplib0.Sexp.Atom s -let sexp_of_list f l = Sexplib0.Sexp.List (List.map f l) -let sexp_of_unit () = Sexplib0.Sexp.List [] -let sexp_of_int i = Sexplib0.Sexp.Atom (string_of_int i) -let sexp_of_float n = Sexplib0.Sexp.Atom (string_of_float n) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:9 - ~location:{ start_bol = 322; start_pos = 322; end_pos = 984 } - ~trailing_loc:{ start_bol = 964; start_pos = 984; end_pos = 984 } - ~body_loc:{ start_bol = 322; start_pos = 322; end_pos = 984 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 1) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 2) - ~description:(Some "%debug_show flushing to a file") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 0), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = " 56 "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 964; - start_pos = 975; - end_pos = 983 - })) - ~node_loc:{ - start_bol = 964; - start_pos = 966; - end_pos = 984 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug_flushing - ~filename:"../../../debugger_expect_show_flushing" ()) in - let rec loop (depth : int) (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:14 ~start_colnum:26 ~end_lnum:20 - ~end_colnum:11 ~message:"loop" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "depth") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - depth)); - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match if depth > 6 - then x.first + x.second - else - if depth > 3 - then - loop (depth + 1) - { - first = (x.second + 1); - second = (x.first / 2) - } - else - (let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:18 ~start_colnum:10 ~end_lnum:18 - ~end_colnum:11 ~message:"y" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match loop (depth + 1) - { - first = (x.second - 1); - second = (x.first + 2) - } - with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:18 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:18 ~entry_id:__entry_id; - raise e)) in - let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:19 ~start_colnum:10 ~end_lnum:19 - ~end_colnum:11 ~message:"z" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match loop (depth + 1) - { first = (x.second + 1); second = y - } - with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:19 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:19 ~entry_id:__entry_id; - raise e)) in - z + 7) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "loop") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:14 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:14 - ~entry_id:__entry_id; - raise e)) in - print_endline @@ - (Int.to_string @@ (loop 0 { first = 7; second = 42 })); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 0)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:25 - ~location:{ start_bol = 986; start_pos = 986; end_pos = 2482 } - ~trailing_loc:{ start_bol = 2475; start_pos = 2482; end_pos = 2482 - } - ~body_loc:{ start_bol = 986; start_pos = 986; end_pos = 2482 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 4) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 5) - ~description:(Some "%debug_show flushing to stdout") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 3), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION at time YYYY-MM-DD HH:MM:SS.NNNNNN\n bar begin \"test/test_expect_test.ml\":28:21: YYYY-MM-DD HH:MM:SS.NNNNNN\n x = { Test_expect_test.first = 7; second = 42 }\n y begin \"test/test_expect_test.ml\":29:8: YYYY-MM-DD HH:MM:SS.NNNNNN\n y = 8\n YYYY-MM-DD HH:MM:SS.NNNNNN - y end\n bar = 336\n YYYY-MM-DD HH:MM:SS.NNNNNN - bar end\n 336\n baz begin \"test/test_expect_test.ml\":33:21: YYYY-MM-DD HH:MM:SS.NNNNNN\n x = { Test_expect_test.first = 7; second = 42 }\n _yz begin \"test/test_expect_test.ml\":34:19: YYYY-MM-DD HH:MM:SS.NNNNNN\n _yz = (8, 3)\n YYYY-MM-DD HH:MM:SS.NNNNNN - _yz end\n baz = 339\n YYYY-MM-DD HH:MM:SS.NNNNNN - baz end\n 339\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 1763; - start_pos = 1767; - end_pos = 2481 - })) - ~node_loc:{ - start_bol = 1752; - start_pos = 1754; - end_pos = 2482 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug_flushing ~time_tagged:Clock ()) in - let bar (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:28 ~start_colnum:21 ~end_lnum:30 - ~end_colnum:16 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:29 - ~start_colnum:8 ~end_lnum:29 ~end_colnum:9 - ~message:"y" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match x.first + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:29 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:29 ~entry_id:__entry_id; - raise e)) in - x.second * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:28 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:28 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })) in - let baz (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:33 ~start_colnum:21 ~end_lnum:35 - ~end_colnum:22 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match let ((y, z) as _yz) : (int * int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:34 - ~start_colnum:19 ~end_lnum:34 ~end_colnum:22 - ~message:"_yz" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match ((x.first + 1), 3) with - | _yz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_yz") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%d") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) _yz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:34 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:34 ~entry_id:__entry_id; - raise e)) in - (x.second * y) + z - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:33 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:33 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) in - let output = - ((Ppx_expect_test_block.read_test_output_no_backtrace_check - ()) - [@merlin.hide ]) in - let output = - Str.global_replace - (Str.regexp - {|[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+\.[0-9]+\( \+[0-9]+:[0-9]+\)?|}) - "YYYY-MM-DD HH:MM:SS.NNNNNN" output in - print_endline output; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 3)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:67 - ~location:{ start_bol = 2484; start_pos = 2484; end_pos = 4121 } - ~trailing_loc:{ start_bol = 4114; start_pos = 4121; end_pos = 4121 - } - ~body_loc:{ start_bol = 2484; start_pos = 2484; end_pos = 4121 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 7) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 8) - ~description:(Some "%debug_show flushing to stdout") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 6), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION at elapsed NNN.NNxs / NNNNNNNns, corresponding to time YYYY-MM-DD HH:MM:SS.NNNNNN\n bar begin \"test/test_expect_test.ml\":71:21: NNN.NNxs / NNNNNNNns\n x = { Test_expect_test.first = 7; second = 42 }\n y begin \"test/test_expect_test.ml\":72:8: NNN.NNxs / NNNNNNNns\n y = 8\n NNN.NNxs / NNNNNNNns - y end\n bar = 336\n NNN.NNxs / NNNNNNNns - bar end\n 336\n baz begin \"test/test_expect_test.ml\":76:21: NNN.NNxs / NNNNNNNns\n x = { Test_expect_test.first = 7; second = 42 }\n _yz begin \"test/test_expect_test.ml\":77:19: NNN.NNxs / NNNNNNNns\n _yz = (8, 3)\n NNN.NNxs / NNNNNNNns - _yz end\n baz = 339\n NNN.NNxs / NNNNNNNns - baz end\n 339\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 3403; - start_pos = 3407; - end_pos = 4120 - })) - ~node_loc:{ - start_bol = 3392; - start_pos = 3394; - end_pos = 4121 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug_flushing ~time_tagged:Elapsed ()) in - let bar (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:71 ~start_colnum:21 ~end_lnum:73 - ~end_colnum:16 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:72 - ~start_colnum:8 ~end_lnum:72 ~end_colnum:9 - ~message:"y" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match x.first + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:72 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:72 ~entry_id:__entry_id; - raise e)) in - x.second * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:71 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:71 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })) in - let baz (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:76 ~start_colnum:21 ~end_lnum:78 - ~end_colnum:22 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match let ((y, z) as _yz) : (int * int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:77 - ~start_colnum:19 ~end_lnum:77 ~end_colnum:22 - ~message:"_yz" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match ((x.first + 1), 3) with - | _yz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_yz") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%d") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) _yz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:77 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:77 ~entry_id:__entry_id; - raise e)) in - (x.second * y) + z - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:76 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:76 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) in - let output = - ((Ppx_expect_test_block.read_test_output_no_backtrace_check - ()) - [@merlin.hide ]) in - let output = - Str.global_replace - (Str.regexp - {|[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+\.[0-9]+\( \+[0-9]+:[0-9]+\)?|}) - "YYYY-MM-DD HH:MM:SS.NNNNNN" output in - let output = - Str.global_replace - (Str.regexp {|[0-9]+\(\.[0-9]+\)?.?s / [0-9]+ns|}) - "NNN.NNxs / NNNNNNNns" output in - print_endline output; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 6)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:115 - ~location:{ start_bol = 4123; start_pos = 4123; end_pos = 5348 } - ~trailing_loc:{ start_bol = 5341; start_pos = 5348; end_pos = 5348 - } - ~body_loc:{ start_bol = 4123; start_pos = 4123; end_pos = 5348 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 10) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 11) - ~description:(Some "%debug_show flushing to stdout, time spans") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 9), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n bar begin \"test/test_expect_test.ml\":119:21:\n x = { Test_expect_test.first = 7; second = 42 }\n y begin \"test/test_expect_test.ml\":120:8:\n y = 8\n y end\n bar = 336\n bar end\n 336\n baz begin \"test/test_expect_test.ml\":124:21:\n x = { Test_expect_test.first = 7; second = 42 }\n _yz begin \"test/test_expect_test.ml\":125:19:\n _yz = (8, 3)\n _yz end\n baz = 339\n baz end\n 339\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 4844; - start_pos = 4848; - end_pos = 5347 - })) - ~node_loc:{ - start_bol = 4833; - start_pos = 4835; - end_pos = 5348 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug_flushing ~elapsed_times:Microseconds - ()) in - let bar (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:119 ~start_colnum:21 ~end_lnum:121 - ~end_colnum:16 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:120 - ~start_colnum:8 ~end_lnum:120 ~end_colnum:9 - ~message:"y" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match x.first + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:120 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:120 ~entry_id:__entry_id; - raise e)) in - x.second * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:119 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:119 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })) in - let baz (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:124 ~start_colnum:21 ~end_lnum:126 - ~end_colnum:22 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match let ((y, z) as _yz) : (int * int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:125 - ~start_colnum:19 ~end_lnum:125 ~end_colnum:22 - ~message:"_yz" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match ((x.first + 1), 3) with - | _yz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_yz") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%d") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) _yz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:125 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:125 ~entry_id:__entry_id; - raise e)) in - (x.second * y) + z - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:124 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:124 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) in - let output = - ((Ppx_expect_test_block.read_test_output_no_backtrace_check - ()) - [@merlin.hide ]) in - let output = - Str.global_replace - (Str.regexp {|[0-9]+?[0-9]+.[0-9]+[0-9]+μs|}) - "N.NN\206\188s" output in - print_endline output; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 9)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:155 - ~location:{ start_bol = 5350; start_pos = 5350; end_pos = 6529 } - ~trailing_loc:{ start_bol = 6522; start_pos = 6529; end_pos = 6529 - } - ~body_loc:{ start_bol = 5350; start_pos = 5350; end_pos = 6529 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 13) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 14) - ~description:(Some "%debug_show flushing with global prefix") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 12), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION test-51\n test-51 bar begin \"test/test_expect_test.ml\":160:21:\n x = { Test_expect_test.first = 7; second = 42 }\n test-51 y begin \"test/test_expect_test.ml\":161:8:\n y = 8\n test-51 y end\n bar = 336\n test-51 bar end\n 336\n test-51 baz begin \"test/test_expect_test.ml\":165:21:\n x = { Test_expect_test.first = 7; second = 42 }\n test-51 _yz begin \"test/test_expect_test.ml\":166:19:\n _yz = (8, 3)\n test-51 _yz end\n baz = 339\n test-51 baz end\n 339\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 5993; - start_pos = 5997; - end_pos = 6528 - })) - ~node_loc:{ - start_bol = 5982; - start_pos = 5984; - end_pos = 6529 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug_flushing ~time_tagged:Not_tagged - ~global_prefix:"test-51" ()) in - let bar (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:160 ~start_colnum:21 ~end_lnum:162 - ~end_colnum:16 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:161 - ~start_colnum:8 ~end_lnum:161 ~end_colnum:9 - ~message:"y" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match x.first + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:161 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:161 ~entry_id:__entry_id; - raise e)) in - x.second * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:160 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:160 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })) in - let baz (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:165 ~start_colnum:21 ~end_lnum:167 - ~end_colnum:22 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match let ((y, z) as _yz) : (int * int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:166 - ~start_colnum:19 ~end_lnum:166 ~end_colnum:22 - ~message:"_yz" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match ((x.first + 1), 3) with - | _yz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_yz") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%d") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) _yz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:166 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:166 ~entry_id:__entry_id; - raise e)) in - (x.second * y) + z - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:165 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:165 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) in - let output = - ((Ppx_expect_test_block.read_test_output_no_backtrace_check - ()) - [@merlin.hide ]) in - print_endline output; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 12)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:193 - ~location:{ start_bol = 6531; start_pos = 6531; end_pos = 9756 } - ~trailing_loc:{ start_bol = 9749; start_pos = 9756; end_pos = 9756 - } - ~body_loc:{ start_bol = 6531; start_pos = 6531; end_pos = 9756 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 17) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 18) - ~description:(Some "%debug_show disabled subtree") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 16), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n \"test/test_expect_test.ml\":245:34: loop_changes\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128\"test/test_expect_test.ml\":246:8: z\n \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":245:34: loop_changes\n \226\148\130 \226\148\156\226\148\128x = 6\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":246:8: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":245:34: loop_changes\n \226\148\130 \226\148\130 \226\148\156\226\148\128x = 5\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":246:8: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_changes = 4\n \226\148\130 \226\148\148\226\148\128loop_changes = 6\n \226\148\148\226\148\128loop_changes = 9\n 9\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 9189; - start_pos = 9193; - end_pos = 9755 - })) - ~node_loc:{ - start_bol = 9178; - start_pos = 9180; - end_pos = 9756 - })); - ((Ppx_expect_runtime.Expectation_id.of_int_exn 15), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":195:35: loop_complete\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128\"test/test_expect_test.ml\":196:8: z\n \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":195:35: loop_complete\n \226\148\130 \226\148\156\226\148\128x = 6\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":196:8: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":195:35: loop_complete\n \226\148\130 \226\148\130 \226\148\156\226\148\128x = 5\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":196:8: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":195:35: loop_complete\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 4\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":196:8: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":195:35: loop_complete\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 3\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":196:8: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":195:35: loop_complete\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 2\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":196:8: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":195:35: loop_complete\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 1\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":196:8: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":195:35: loop_complete\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":196:8: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_complete = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_complete = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_complete = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_complete = 1\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_complete = 2\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_complete = 4\n \226\148\130 \226\148\148\226\148\128loop_complete = 6\n \226\148\148\226\148\128loop_complete = 9\n 9\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 6869; - start_pos = 6873; - end_pos = 8790 - })) - ~node_loc:{ - start_bol = 6858; - start_pos = 6860; - end_pos = 8791 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let rec loop_complete (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:195 ~start_colnum:35 ~end_lnum:197 - ~end_colnum:57 ~message:"loop_complete" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:196 - ~start_colnum:8 ~end_lnum:196 ~end_colnum:9 - ~message:"z" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match (x - 1) / 2 with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:196 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:196 ~entry_id:__entry_id; - raise e)) in - if x <= 0 - then 0 - else z + (loop_complete (z + (x / 2))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_complete") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:195 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:195 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (loop_complete 7)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 15)) - [@merlin.hide ]); - (let rec loop_changes (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:245 ~start_colnum:34 ~end_lnum:250 - ~end_colnum:56 ~message:"loop_changes" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - x)); - (match let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:246 ~start_colnum:8 ~end_lnum:246 - ~end_colnum:9 ~message:"z" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match (x - 1) / 2 with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:246 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:246 ~entry_id:__entry_id; - raise e)) in - Debug_runtime.no_debug_if - ((x <> 6) && ((x <> 2) && (((z + 1) * 2) = x))); - if x <= 0 - then 0 - else z + (loop_changes (z + (x / 2))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_changes") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:245 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:245 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (loop_changes 7)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 16)) - [@merlin.hide ]))) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:273 - ~location:{ start_bol = 9758; start_pos = 9758; end_pos = 11617 } - ~trailing_loc:{ - start_bol = 11610; - start_pos = 11617; - end_pos = 11617 - } - ~body_loc:{ start_bol = 9758; start_pos = 9758; end_pos = 11617 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 20) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 21) - ~description:(Some "%debug_show with exception") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 19), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":275:36: loop_truncated\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128\"test/test_expect_test.ml\":276:8: z\n \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\148\226\148\128\"test/test_expect_test.ml\":275:36: loop_truncated\n \226\148\156\226\148\128x = 6\n \226\148\156\226\148\128\"test/test_expect_test.ml\":276:8: z\n \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\148\226\148\128\"test/test_expect_test.ml\":275:36: loop_truncated\n \226\148\156\226\148\128x = 5\n \226\148\156\226\148\128\"test/test_expect_test.ml\":276:8: z\n \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\148\226\148\128\"test/test_expect_test.ml\":275:36: loop_truncated\n \226\148\156\226\148\128x = 4\n \226\148\156\226\148\128\"test/test_expect_test.ml\":276:8: z\n \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\148\226\148\128\"test/test_expect_test.ml\":275:36: loop_truncated\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":276:8: z\n \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\148\226\148\128\"test/test_expect_test.ml\":275:36: loop_truncated\n \226\148\156\226\148\128x = 2\n \226\148\156\226\148\128\"test/test_expect_test.ml\":276:8: z\n \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":275:36: loop_truncated\n \226\148\156\226\148\128x = 1\n \226\148\156\226\148\128\"test/test_expect_test.ml\":276:8: z\n \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":275:36: loop_truncated\n \226\148\156\226\148\128x = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":276:8: z\n \226\148\148\226\148\128z = 0\n Raised exception.\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 10219; - start_pos = 10223; - end_pos = 11616 - })) - ~node_loc:{ - start_bol = 10208; - start_pos = 10210; - end_pos = 11617 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let rec loop_truncated (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:275 ~start_colnum:36 ~end_lnum:278 - ~end_colnum:36 ~message:"loop_truncated" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:276 - ~start_colnum:8 ~end_lnum:276 ~end_colnum:9 - ~message:"z" ~entry_id:__entry_id ~log_level:1 - `Debug; - (match (x - 1) / 2 with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:276 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:276 ~entry_id:__entry_id; - raise e)) in - if x <= 0 - then - failwith - "the log as for loop_complete but without return values"; - z + (loop_truncated (z + (x / 2))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_truncated") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:275 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:275 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_truncated 7)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 19)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:322 - ~location:{ start_bol = 11619; start_pos = 11619; end_pos = 12960 } - ~trailing_loc:{ - start_bol = 12953; - start_pos = 12960; - end_pos = 12960 - } - ~body_loc:{ start_bol = 11619; start_pos = 11619; end_pos = 12960 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 23) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 24) - ~description:(Some "%debug_show depth exceeded") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 22), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":324:35: loop_exceeded\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128\"test/test_expect_test.ml\":327:10: z\n \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\148\226\148\128\"test/test_expect_test.ml\":324:35: loop_exceeded\n \226\148\156\226\148\128x = 6\n \226\148\156\226\148\128\"test/test_expect_test.ml\":327:10: z\n \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\148\226\148\128\"test/test_expect_test.ml\":324:35: loop_exceeded\n \226\148\156\226\148\128x = 5\n \226\148\156\226\148\128\"test/test_expect_test.ml\":327:10: z\n \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\148\226\148\128\"test/test_expect_test.ml\":324:35: loop_exceeded\n \226\148\156\226\148\128x = 4\n \226\148\156\226\148\128\"test/test_expect_test.ml\":327:10: z\n \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\148\226\148\128\"test/test_expect_test.ml\":324:35: loop_exceeded\n \226\148\156\226\148\128x = 3\n \226\148\148\226\148\128\"test/test_expect_test.ml\":327:10: z\n \226\148\148\226\148\128z = \n Raised exception.\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 12099; - start_pos = 12103; - end_pos = 12959 - })) - ~node_loc:{ - start_bol = 12088; - start_pos = 12090; - end_pos = 12960 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let rec loop_exceeded (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:324 ~start_colnum:35 ~end_lnum:328 - ~end_colnum:60 ~message:"loop_exceeded" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match Debug_runtime.max_nesting_depth := (Some 5); - Debug_runtime.max_num_children := (Some 1000); - (let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - if Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show ~descr:"z" - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:327 ~start_colnum:10 - ~end_lnum:327 ~end_colnum:11 ~message:"z" - ~entry_id:__entry_id ~log_level:1 `Debug; - if Debug_runtime.exceeds_max_nesting () - then - (Debug_runtime.log_value_show ~descr:"z" - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:327 ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match (x - 1) / 2 with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:327 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:327 ~entry_id:__entry_id; - raise e))) in - if x <= 0 - then 0 - else z + (loop_exceeded (z + (x / 2)))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_exceeded") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:324 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:324 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_exceeded 7)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 22)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:360 - ~location:{ start_bol = 12962; start_pos = 12962; end_pos = 14428 } - ~trailing_loc:{ - start_bol = 14421; - start_pos = 14428; - end_pos = 14428 - } - ~body_loc:{ start_bol = 12962; start_pos = 12962; end_pos = 14428 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 26) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 27) - ~description:(Some "%debug_show num children exceeded linear") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 25), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":364:21: _bar\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 2\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 4\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 6\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 8\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 10\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 12\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 14\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 16\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 18\n \226\148\156\226\148\128\"test/test_expect_test.ml\":368:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 20\n \226\148\148\226\148\128_baz = \n Raised exception: ppx_minidebug: max_num_children exceeded\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 13429; - start_pos = 13433; - end_pos = 14427 - })) - ~node_loc:{ - start_bol = 13418; - start_pos = 13420; - end_pos = 14428 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:364 ~start_colnum:21 ~end_lnum:364 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 10); - for i = 0 to 100 do - (let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - if Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show - ~descr:"_baz" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:368 ~start_colnum:16 - ~end_lnum:368 ~end_colnum:20 - ~message:"_baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - if Debug_runtime.exceeds_max_nesting () - then - (Debug_runtime.log_value_show - ~descr:"_baz" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:368 ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_baz") - ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:368 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:368 - ~entry_id:__entry_id; - raise e))) in - ()) - done - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:364 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:364 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 25)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:405 - ~location:{ start_bol = 14430; start_pos = 14430; end_pos = 15622 } - ~trailing_loc:{ - start_bol = 15615; - start_pos = 15622; - end_pos = 15622 - } - ~body_loc:{ start_bol = 14430; start_pos = 14430; end_pos = 15622 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 29) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 30) - ~description:(Some "%debug_show truncated children linear") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 28), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":409:21: _bar\n \226\148\156\226\148\128\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 44\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 46\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 48\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 50\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 52\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 54\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 56\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 58\n \226\148\156\226\148\128\"test/test_expect_test.ml\":411:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 60\n \226\148\148\226\148\128_bar = ()\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 14816; - start_pos = 14820; - end_pos = 15621 - })) - ~node_loc:{ - start_bol = 14805; - start_pos = 14807; - end_pos = 15622 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~truncate_children:10 ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:409 ~start_colnum:21 ~end_lnum:409 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match for i = 0 to 30 do - let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:411 ~start_colnum:14 - ~end_lnum:411 ~end_colnum:18 - ~message:"_baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match i * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:411 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:411 ~entry_id:__entry_id; - raise e)) in - () - done - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:409 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:409 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 28)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:444 - ~location:{ start_bol = 15624; start_pos = 15624; end_pos = 17156 } - ~trailing_loc:{ - start_bol = 17149; - start_pos = 17156; - end_pos = 17156 - } - ~body_loc:{ start_bol = 15624; start_pos = 15624; end_pos = 17156 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 32) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 33) - ~description:(Some - "%track_show track for-loop num children exceeded") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 31), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":448:21: _bar\n \226\148\148\226\148\128\"test/test_expect_test.ml\":451:10: for:test_expect_test:451\n \226\148\156\226\148\128i = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":451:14: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":452:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 0\n \226\148\156\226\148\128i = 1\n \226\148\156\226\148\128\"test/test_expect_test.ml\":451:14: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":452:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 2\n \226\148\156\226\148\128i = 2\n \226\148\156\226\148\128\"test/test_expect_test.ml\":451:14: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":452:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 4\n \226\148\156\226\148\128i = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":451:14: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":452:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 6\n \226\148\156\226\148\128i = 4\n \226\148\156\226\148\128\"test/test_expect_test.ml\":451:14: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":452:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 8\n \226\148\156\226\148\128i = 5\n \226\148\148\226\148\128i = \n Raised exception: ppx_minidebug: max_num_children exceeded\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 16099; - start_pos = 16103; - end_pos = 17155 - })) - ~node_loc:{ - start_bol = 16088; - start_pos = 16090; - end_pos = 17156 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:448 ~start_colnum:21 ~end_lnum:448 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Track; - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 10); - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:451 ~start_colnum:10 ~end_lnum:454 - ~end_colnum:14 - ~message:"for:test_expect_test:451" - ~entry_id:__entry_id ~log_level:1 `Track; - (match for i = 0 to 100 do - let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.log_value_show - ?descr:(Some "i") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i); - if - Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show - ~descr:"i" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:451 ~start_colnum:14 - ~end_lnum:451 ~end_colnum:15 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"i" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:452 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id - () in - (); - if - Debug_runtime.exceeds_max_children - () - then - (Debug_runtime.log_value_show - ~descr:"_baz" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:452 - ~start_colnum:16 - ~end_lnum:452 - ~end_colnum:20 - ~message:"_baz" - ~entry_id:__entry_id - ~log_level:1 `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"_baz" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:452 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:( - Some "_baz") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt - -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") - x) - [@ocaml.warning - "-39"] - [@ocaml.warning - "-A"]) - _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:452 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:452 - ~entry_id:__entry_id; - raise e))) in - () - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:452 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:452 - ~entry_id:__entry_id; - raise e))) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:451 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:451 ~entry_id:__entry_id; - raise e))) - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:448 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:448 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 31)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:489 - ~location:{ start_bol = 17158; start_pos = 17158; end_pos = 18591 } - ~trailing_loc:{ - start_bol = 18584; - start_pos = 18591; - end_pos = 18591 - } - ~body_loc:{ start_bol = 17158; start_pos = 17158; end_pos = 18591 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 35) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 36) - ~description:(Some "%track_show track for-loop truncated children") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 34), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":493:21: _bar\n \226\148\156\226\148\128\"test/test_expect_test.ml\":494:8: for:test_expect_test:494\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128i = 26\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":494:12: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":495:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 52\n \226\148\130 \226\148\156\226\148\128i = 27\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":494:12: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":495:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 54\n \226\148\130 \226\148\156\226\148\128i = 28\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":494:12: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":495:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 56\n \226\148\130 \226\148\156\226\148\128i = 29\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":494:12: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":495:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 58\n \226\148\130 \226\148\156\226\148\128i = 30\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":494:12: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":495:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 60\n \226\148\148\226\148\128_bar = ()\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 17552; - start_pos = 17556; - end_pos = 18590 - })) - ~node_loc:{ - start_bol = 17541; - start_pos = 17543; - end_pos = 18591 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~truncate_children:10 ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:493 ~start_colnum:21 ~end_lnum:493 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:494 ~start_colnum:8 ~end_lnum:497 - ~end_colnum:12 - ~message:"for:test_expect_test:494" - ~entry_id:__entry_id ~log_level:1 `Track; - (match for i = 0 to 30 do - let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.log_value_show - ?descr:(Some "i") ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:494 ~start_colnum:12 - ~end_lnum:494 ~end_colnum:13 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:495 - ~start_colnum:14 - ~end_lnum:495 ~end_colnum:18 - ~message:"_baz" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match i * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_baz") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") - x) - [@ocaml.warning - "-39"][@ocaml.warning - "-A"]) - _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:495 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:495 - ~entry_id:__entry_id; - raise e)) in - () - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:495 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:495 - ~entry_id:__entry_id; - raise e)) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:494 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:494 ~entry_id:__entry_id; - raise e)) - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:493 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:493 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 34)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:531 - ~location:{ start_bol = 18593; start_pos = 18593; end_pos = 20364 } - ~trailing_loc:{ - start_bol = 20357; - start_pos = 20364; - end_pos = 20364 - } - ~body_loc:{ start_bol = 18593; start_pos = 18593; end_pos = 20364 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 38) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 39) - ~description:(Some "%track_show track for-loop") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 37), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":535:21: _bar\n \226\148\156\226\148\128\"test/test_expect_test.ml\":538:10: for:test_expect_test:538\n \226\148\130 \226\148\156\226\148\128i = 0\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":538:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":539:16: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 0\n \226\148\130 \226\148\156\226\148\128i = 1\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":538:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":539:16: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 2\n \226\148\130 \226\148\156\226\148\128i = 2\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":538:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":539:16: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 4\n \226\148\130 \226\148\156\226\148\128i = 3\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":538:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":539:16: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 6\n \226\148\130 \226\148\156\226\148\128i = 4\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":538:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":539:16: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 8\n \226\148\130 \226\148\156\226\148\128i = 5\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":538:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":539:16: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 10\n \226\148\130 \226\148\156\226\148\128i = 6\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":538:14: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":539:16: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 12\n \226\148\148\226\148\128_bar = ()\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 19046; - start_pos = 19050; - end_pos = 20363 - })) - ~node_loc:{ - start_bol = 19035; - start_pos = 19037; - end_pos = 20364 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:535 ~start_colnum:21 ~end_lnum:535 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Track; - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 1000); - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:538 ~start_colnum:10 ~end_lnum:541 - ~end_colnum:14 - ~message:"for:test_expect_test:538" - ~entry_id:__entry_id ~log_level:1 `Track; - (match for i = 0 to 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.log_value_show - ?descr:(Some "i") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i); - if - Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show - ~descr:"i" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:538 ~start_colnum:14 - ~end_lnum:538 ~end_colnum:15 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"i" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:539 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id - () in - (); - if - Debug_runtime.exceeds_max_children - () - then - (Debug_runtime.log_value_show - ~descr:"_baz" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:539 - ~start_colnum:16 - ~end_lnum:539 - ~end_colnum:20 - ~message:"_baz" - ~entry_id:__entry_id - ~log_level:1 `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"_baz" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:539 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:( - Some "_baz") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt - -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") - x) - [@ocaml.warning - "-39"] - [@ocaml.warning - "-A"]) - _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:539 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:539 - ~entry_id:__entry_id; - raise e))) in - () - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:539 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:539 - ~entry_id:__entry_id; - raise e))) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:538 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:538 ~entry_id:__entry_id; - raise e))) - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:535 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:535 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 37)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:582 - ~location:{ start_bol = 20366; start_pos = 20366; end_pos = 22505 } - ~trailing_loc:{ - start_bol = 22498; - start_pos = 22505; - end_pos = 22505 - } - ~body_loc:{ start_bol = 20366; start_pos = 20366; end_pos = 22505 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 41) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 42) - ~description:(Some "%track_show track for-loop, time spans") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 40), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":587:21: _bar \n \226\148\156\226\148\128\"test/test_expect_test.ml\":590:10: for:test_expect_test:590 \n \226\148\130 \226\148\156\226\148\128i = 0\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":590:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":591:16: _baz \n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 0\n \226\148\130 \226\148\156\226\148\128i = 1\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":590:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":591:16: _baz \n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 2\n \226\148\130 \226\148\156\226\148\128i = 2\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":590:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":591:16: _baz \n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 4\n \226\148\130 \226\148\156\226\148\128i = 3\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":590:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":591:16: _baz \n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 6\n \226\148\130 \226\148\156\226\148\128i = 4\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":590:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":591:16: _baz \n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 8\n \226\148\130 \226\148\156\226\148\128i = 5\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":590:14: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":591:16: _baz \n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 10\n \226\148\130 \226\148\156\226\148\128i = 6\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":590:14: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":591:16: _baz \n \226\148\130 \226\148\148\226\148\128_baz = 12\n \226\148\148\226\148\128_bar = ()\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 21027; - start_pos = 21031; - end_pos = 22504 - })) - ~node_loc:{ - start_bol = 21016; - start_pos = 21018; - end_pos = 22505 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~elapsed_times:Microseconds ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:587 ~start_colnum:21 ~end_lnum:587 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Track; - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 1000); - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:590 ~start_colnum:10 ~end_lnum:593 - ~end_colnum:14 - ~message:"for:test_expect_test:590" - ~entry_id:__entry_id ~log_level:1 `Track; - (match for i = 0 to 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.log_value_show - ?descr:(Some "i") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i); - if - Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show - ~descr:"i" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:590 ~start_colnum:14 - ~end_lnum:590 ~end_colnum:15 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"i" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:591 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id - () in - (); - if - Debug_runtime.exceeds_max_children - () - then - (Debug_runtime.log_value_show - ~descr:"_baz" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:591 - ~start_colnum:16 - ~end_lnum:591 - ~end_colnum:20 - ~message:"_baz" - ~entry_id:__entry_id - ~log_level:1 `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"_baz" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:591 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:( - Some "_baz") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt - -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") - x) - [@ocaml.warning - "-39"] - [@ocaml.warning - "-A"]) - _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:591 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:591 - ~entry_id:__entry_id; - raise e))) in - () - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:591 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:591 - ~entry_id:__entry_id; - raise e))) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:590 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:590 ~entry_id:__entry_id; - raise e))) - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:587 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:587 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - let output = - ((Ppx_expect_test_block.read_test_output_no_backtrace_check - ()) - [@merlin.hide ]) in - let output = - Str.global_replace - (Str.regexp {|[0-9]+?[0-9]+.[0-9]+[0-9]+μs|}) - "N.NN\206\188s" output in - print_endline output; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 40)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:639 - ~location:{ start_bol = 22507; start_pos = 22507; end_pos = 23953 } - ~trailing_loc:{ - start_bol = 23946; - start_pos = 23953; - end_pos = 23953 - } - ~body_loc:{ start_bol = 22507; start_pos = 22507; end_pos = 23953 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 44) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 45) - ~description:(Some "%track_show track while-loop") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 43), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":643:21: _bar\n \226\148\156\226\148\128\"test/test_expect_test.ml\":645:8: while:test_expect_test:645\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":646:10: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":646:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 0\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":646:10: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":646:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 2\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":646:10: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":646:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 4\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":646:10: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":646:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 6\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":646:10: \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":646:14: _baz\n \226\148\130 \226\148\130 \226\148\148\226\148\128_baz = 8\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":646:10: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":646:14: _baz\n \226\148\130 \226\148\148\226\148\128_baz = 10\n \226\148\148\226\148\128_bar = ()\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 22889; - start_pos = 22893; - end_pos = 23952 - })) - ~node_loc:{ - start_bol = 22878; - start_pos = 22880; - end_pos = 23953 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:643 ~start_colnum:21 ~end_lnum:643 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let i = ref 0 in - let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:645 ~start_colnum:8 ~end_lnum:648 - ~end_colnum:12 - ~message:"while:test_expect_test:645" - ~entry_id:__entry_id ~log_level:1 `Track; - (match while (!i) < 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:646 ~start_colnum:10 - ~end_lnum:647 ~end_colnum:16 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:646 - ~start_colnum:14 - ~end_lnum:646 ~end_colnum:18 - ~message:"_baz" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match (!i) * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_baz") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") - x) - [@ocaml.warning - "-39"][@ocaml.warning - "-A"]) - _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:646 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:646 - ~entry_id:__entry_id; - raise e)) in - incr i - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:646 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:646 - ~entry_id:__entry_id; - raise e)) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:645 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:645 ~entry_id:__entry_id; - raise e)) - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:643 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:643 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 43)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:679 - ~location:{ start_bol = 23955; start_pos = 23955; end_pos = 26053 } - ~trailing_loc:{ - start_bol = 26046; - start_pos = 26053; - end_pos = 26053 - } - ~body_loc:{ start_bol = 23955; start_pos = 23955; end_pos = 26053 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 47) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 48) - ~description:(Some "%debug_show num children exceeded nested") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 46), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":681:35: loop_exceeded\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\148\226\148\128\"test/test_expect_test.ml\":681:35: loop_exceeded\n \226\148\156\226\148\128x = 2\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":681:35: loop_exceeded\n \226\148\156\226\148\128x = 1\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":681:35: loop_exceeded\n \226\148\156\226\148\128x = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 4\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 5\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 6\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 7\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 8\n \226\148\156\226\148\128\"test/test_expect_test.ml\":688:17: z\n \226\148\130 \226\148\148\226\148\128z = 9\n \226\148\148\226\148\128z = \n Raised exception: ppx_minidebug: max_num_children exceeded\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 24589; - start_pos = 24593; - end_pos = 26052 - })) - ~node_loc:{ - start_bol = 24578; - start_pos = 24580; - end_pos = 26053 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let rec loop_exceeded (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:681 ~start_colnum:35 ~end_lnum:689 - ~end_colnum:72 ~message:"loop_exceeded" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 10); - (Array.fold_left (+) 0) @@ - (Array.init (100 / (x + 1)) - (fun i -> - let z : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - if Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show ~descr:"z" - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:688 ~start_colnum:17 - ~end_lnum:688 ~end_colnum:18 - ~message:"z" ~entry_id:__entry_id - ~log_level:1 `Debug; - if Debug_runtime.exceeds_max_nesting () - then - (Debug_runtime.log_value_show - ~descr:"z" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:688 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i + ((x - 1) / 2) with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:688 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:688 - ~entry_id:__entry_id; - raise e))) in - if x <= 0 - then i - else i + (loop_exceeded ((z + (x / 2)) - i)))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_exceeded") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:681 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:681 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_exceeded 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 46)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:736 - ~location:{ start_bol = 26055; start_pos = 26055; end_pos = 31677 } - ~trailing_loc:{ - start_bol = 31670; - start_pos = 31677; - end_pos = 31677 - } - ~body_loc:{ start_bol = 26055; start_pos = 26055; end_pos = 31677 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 50) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 51) - ~description:(Some "%debug_show truncated children nested") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 49), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\156\226\148\128\n \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 17\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 18\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 9\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 17\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 18\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 1945\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 5\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 17\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 18\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 9\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 17\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 18\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 1945\n \226\148\130 \226\148\148\226\148\128loop_exceeded = 11685\n \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\148\226\148\128z = 5\n \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 17\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 18\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 9\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 17\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 18\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 1945\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 5\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 17\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 18\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 9\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":738:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 17\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 18\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":743:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 1945\n \226\148\130 \226\148\148\226\148\128loop_exceeded = 11685\n \226\148\148\226\148\128loop_exceeded = 58435\n 58435\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 26611; - start_pos = 26615; - end_pos = 31676 - })) - ~node_loc:{ - start_bol = 26600; - start_pos = 26602; - end_pos = 31677 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~truncate_children:4 ()) in - let rec loop_exceeded (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:738 ~start_colnum:35 ~end_lnum:744 - ~end_colnum:69 ~message:"loop_exceeded" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match (Array.fold_left (+) 0) @@ - (Array.init (20 / (x + 1)) - (fun i -> - let z : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:743 ~start_colnum:15 - ~end_lnum:743 ~end_colnum:16 ~message:"z" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match i + ((x - 1) / 2) with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:743 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:743 - ~entry_id:__entry_id; - raise e)) in - if x <= 0 - then i - else i + (loop_exceeded ((z + (x / 2)) - i)))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_exceeded") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:738 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:738 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_exceeded 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 49)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:863 - ~location:{ start_bol = 31679; start_pos = 31679; end_pos = 36183 } - ~trailing_loc:{ - start_bol = 36176; - start_pos = 36183; - end_pos = 36183 - } - ~body_loc:{ start_bol = 31679; start_pos = 31679; end_pos = 36183 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 53) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 54) - ~description:(Some "%track_show highlight") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 52), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \226\148\140\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130\"test/test_expect_test.ml\":867:36: loop_highlight\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130\"test/test_expect_test.ml\":870:10: z\226\148\130\n \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130z = 3\226\148\130\n \226\148\130 \226\148\148\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130\"test/test_expect_test.ml\":867:36: loop_highlight\226\148\130\n \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\156\226\148\128x = 6\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":870:10: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\130 \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130 \226\148\130\"test/test_expect_test.ml\":867:36: loop_highlight\226\148\130\n \226\148\130 \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\130 \226\148\156\226\148\128x = 5\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":870:10: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\130 \226\148\130 \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130 \226\148\130 \226\148\130\"test/test_expect_test.ml\":867:36: loop_highlight\226\148\130\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 4\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":870:10: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130\"test/test_expect_test.ml\":867:36: loop_highlight\226\148\130\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130x = 3\226\148\130\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":870:10: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":867:36: loop_highlight\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 2\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":870:10: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":867:36: loop_highlight\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 1\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":870:10: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":867:36: loop_highlight\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128x = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":870:10: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_highlight = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_highlight = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_highlight = 0\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_highlight = 1\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_highlight = 2\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_highlight = 4\n \226\148\130 \226\148\148\226\148\128loop_highlight = 6\n \226\148\148\226\148\128loop_highlight = 9\n 9\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 32127; - start_pos = 32131; - end_pos = 36182 - })) - ~node_loc:{ - start_bol = 32116; - start_pos = 32118; - end_pos = 36183 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~highlight_terms:(Re.str "3") ()) in - let rec loop_highlight (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:867 ~start_colnum:36 ~end_lnum:871 - ~end_colnum:61 ~message:"loop_highlight" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 1000); - (let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - if Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show ~descr:"z" - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:870 ~start_colnum:10 - ~end_lnum:870 ~end_colnum:11 ~message:"z" - ~entry_id:__entry_id ~log_level:1 `Debug; - if Debug_runtime.exceeds_max_nesting () - then - (Debug_runtime.log_value_show ~descr:"z" - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:870 ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match (x - 1) / 2 with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:870 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:870 ~entry_id:__entry_id; - raise e))) in - if x <= 0 - then 0 - else z + (loop_highlight (z + (x / 2)))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_highlight") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:867 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:867 - ~entry_id:__entry_id; - raise e)) in - print_endline @@ (Int.to_string @@ (loop_highlight 7)); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 52)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:936 - ~location:{ start_bol = 36185; start_pos = 36185; end_pos = 37187 } - ~trailing_loc:{ - start_bol = 37180; - start_pos = 37187; - end_pos = 37187 - } - ~body_loc:{ start_bol = 36185; start_pos = 36185; end_pos = 37187 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 56) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 57) - ~description:(Some "%track_show PrintBox tracking") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 55), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":938:32: track_branches\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128\"test/test_expect_test.ml\":940:9: else:test_expect_test:940\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":940:36: \n \226\148\148\226\148\128track_branches = 4\n 4\n \"test/test_expect_test.ml\":938:32: track_branches\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":939:18: then:test_expect_test:939\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":939:54: \n \226\148\148\226\148\128track_branches = -3\n -3\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 36658; - start_pos = 36662; - end_pos = 37186 - })) - ~node_loc:{ - start_bol = 36647; - start_pos = 36649; - end_pos = 37187 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let track_branches (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:938 ~start_colnum:32 ~end_lnum:940 - ~end_colnum:46 ~message:"track_branches" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match if x < 6 - then - let __entry_id = Debug_runtime.get_entry_id () in - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 ~start_colnum:18 ~end_lnum:939 - ~end_colnum:57 - ~message:"then:test_expect_test:939" - ~entry_id:__entry_id ~log_level:1 `Track; - (match match x with - | 0 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 ~start_colnum:36 - ~end_lnum:939 ~end_colnum:37 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 1 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 - ~entry_id:__entry_id; - raise e))) - | 1 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 ~start_colnum:45 - ~end_lnum:939 ~end_colnum:46 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 0 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 - ~entry_id:__entry_id; - raise e))) - | _ -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 ~start_colnum:54 - ~end_lnum:939 ~end_colnum:57 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match - x with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 - ~entry_id:__entry_id; - raise e))) - with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:939 ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 ~start_colnum:9 ~end_lnum:940 - ~end_colnum:46 - ~message:"else:test_expect_test:940" - ~entry_id:__entry_id ~log_level:1 `Track; - (match match x with - | 6 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 ~start_colnum:27 - ~end_lnum:940 ~end_colnum:28 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 5 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 - ~entry_id:__entry_id; - raise e))) - | 7 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 ~start_colnum:36 - ~end_lnum:940 ~end_colnum:37 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 4 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 - ~entry_id:__entry_id; - raise e))) - | _ -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 ~start_colnum:45 - ~end_lnum:940 ~end_colnum:46 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match x with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 - ~entry_id:__entry_id; - raise e))) - with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:940 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "track_branches") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:938 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:938 - ~entry_id:__entry_id; - raise e)) in - let () = - try - print_endline @@ (Int.to_string @@ (track_branches 7)); - print_endline @@ (Int.to_string @@ (track_branches 3)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 55)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:965 - ~location:{ start_bol = 37189; start_pos = 37189; end_pos = 37818 } - ~trailing_loc:{ - start_bol = 37811; - start_pos = 37818; - end_pos = 37818 - } - ~body_loc:{ start_bol = 37189; start_pos = 37189; end_pos = 37818 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 59) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 60) - ~description:(Some "%track_show PrintBox tracking ") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 58), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":971:11: \n 4\n \"test/test_expect_test.ml\":973:11: x\n -3\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 37641; - start_pos = 37645; - end_pos = 37817 - })) - ~node_loc:{ - start_bol = 37630; - start_pos = 37632; - end_pos = 37818 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let track_branches = - function - | 0 -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:968 - ~start_colnum:11 ~end_lnum:968 ~end_colnum:12 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 1 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:968 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:968 ~entry_id:__entry_id; - raise e))) - | 1 -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:969 - ~start_colnum:11 ~end_lnum:969 ~end_colnum:12 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 0 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:969 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:969 ~entry_id:__entry_id; - raise e))) - | 6 -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:970 - ~start_colnum:11 ~end_lnum:970 ~end_colnum:12 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 5 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:970 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:970 ~entry_id:__entry_id; - raise e))) - | 7 -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:971 - ~start_colnum:11 ~end_lnum:971 ~end_colnum:12 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 4 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:971 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:971 ~entry_id:__entry_id; - raise e))) - | 2 -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:972 - ~start_colnum:11 ~end_lnum:972 ~end_colnum:12 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 2 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:972 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:972 ~entry_id:__entry_id; - raise e))) - | x -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:973 - ~start_colnum:11 ~end_lnum:973 ~end_colnum:14 - ~message:" x" - ~entry_id:__entry_id ~log_level:1 `Track; - (match - x with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:973 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:973 ~entry_id:__entry_id; - raise e))) in - let () = - try - print_endline @@ (Int.to_string @@ (track_branches 7)); - print_endline @@ (Int.to_string @@ (track_branches 3)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 58)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:990 - ~location:{ start_bol = 37820; start_pos = 37820; end_pos = 39233 } - ~trailing_loc:{ - start_bol = 39226; - start_pos = 39233; - end_pos = 39233 - } - ~body_loc:{ start_bol = 37820; start_pos = 37820; end_pos = 39233 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 62) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 63) - ~description:(Some - "%track_show PrintBox tracking with debug_notrace") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 61), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":992:32: track_branches\n \226\148\156\226\148\128x = 8\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1001:6: else:test_expect_test:1001\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1005:10: \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1005:14: result\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1005:44: then:test_expect_test:1005\n \226\148\130 \226\148\148\226\148\128result = 8\n \226\148\148\226\148\128track_branches = 8\n 8\n \"test/test_expect_test.ml\":992:32: track_branches\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":994:6: then:test_expect_test:994\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":998:14: result\n \226\148\130 \226\148\148\226\148\128result = 3\n \226\148\148\226\148\128track_branches = 3\n 3\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 38521; - start_pos = 38525; - end_pos = 39232 - })) - ~node_loc:{ - start_bol = 38510; - start_pos = 38512; - end_pos = 39233 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let track_branches (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:992 ~start_colnum:32 ~end_lnum:1006 - ~end_colnum:16 ~message:"track_branches" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match if x < 6 - then - let __entry_id = Debug_runtime.get_entry_id () in - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:994 ~start_colnum:6 ~end_lnum:999 - ~end_colnum:16 - ~message:"then:test_expect_test:994" - ~entry_id:__entry_id ~log_level:1 `Track; - (match match x with - | 0 -> 1 - | 1 -> 0 - | _ -> - let result : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:998 ~start_colnum:14 - ~end_lnum:998 ~end_colnum:20 - ~message:"result" - ~entry_id:__entry_id ~log_level:1 - `Debug; - (match if x > 2 then x else - x with - | result as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "result") - ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) - result)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:998 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:998 - ~entry_id:__entry_id; - raise e)) in - result - with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:994 ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:994 ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1001 ~start_colnum:6 ~end_lnum:1006 - ~end_colnum:16 - ~message:"else:test_expect_test:1001" - ~entry_id:__entry_id ~log_level:1 `Track; - (match match x with - | 6 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1002 ~start_colnum:13 - ~end_lnum:1002 ~end_colnum:14 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 5 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1002 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1002 - ~entry_id:__entry_id; - raise e))) - | 7 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1003 ~start_colnum:13 - ~end_lnum:1003 ~end_colnum:14 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 4 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1003 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1003 - ~entry_id:__entry_id; - raise e))) - | _ -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 ~start_colnum:10 - ~end_lnum:1006 ~end_colnum:16 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match let result : int = - let __entry_id = - Debug_runtime.get_entry_id - () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~start_colnum:14 - ~end_lnum:1005 - ~end_colnum:20 - ~message:"result" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match if x < 10 - then - let __entry_id = - Debug_runtime.get_entry_id - () in - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~start_colnum:44 - ~end_lnum:1005 - ~end_colnum:45 - ~message:"then:test_expect_test:1005" - ~entry_id:__entry_id - ~log_level:1 - `Track; - (match x with - | if_then__result - -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = - Debug_runtime.get_entry_id - () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~start_colnum:51 - ~end_lnum:1005 - ~end_colnum:54 - ~message:"else:test_expect_test:1005" - ~entry_id:__entry_id - ~log_level:1 - `Track; - (match - x with - | if_else__result - -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~entry_id:__entry_id; - raise e))) - with - | result as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some - "result") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") - x) - [@ocaml.warning - "-39"][@ocaml.warning - "-A"]) - result)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~entry_id:__entry_id; - raise e)) in - result - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1005 - ~entry_id:__entry_id; - raise e))) - with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1001 ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1001 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "track_branches") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:992 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:992 - ~entry_id:__entry_id; - raise e)) in - let () = - try - print_endline @@ (Int.to_string @@ (track_branches 8)); - print_endline @@ (Int.to_string @@ (track_branches 3)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 61)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1035 - ~location:{ start_bol = 39235; start_pos = 39235; end_pos = 39949 } - ~trailing_loc:{ - start_bol = 39942; - start_pos = 39949; - end_pos = 39949 - } - ~body_loc:{ start_bol = 39235; start_pos = 39235; end_pos = 39949 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 65) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 66) - ~description:(Some - "%track_show PrintBox not tracking anonymous functions with debug_notrace") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 64), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1038:27: track_foo\n \226\148\156\226\148\128x = 8\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1041:4: fun:test_expect_test:1041\n \226\148\130 \226\148\148\226\148\128z = 8\n \226\148\148\226\148\128track_foo = 8\n 8\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 39724; - start_pos = 39728; - end_pos = 39948 - })) - ~node_loc:{ - start_bol = 39713; - start_pos = 39715; - end_pos = 39949 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let track_foo (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1038 ~start_colnum:27 ~end_lnum:1042 - ~end_colnum:5 ~message:"track_foo" ~entry_id:__entry_id - ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match ((fun (y : int) -> ignore y)) x; - (let w = (fun (v : int) -> v) x in - ((fun (z : int) -> - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1041 ~start_colnum:4 - ~end_lnum:1041 ~end_colnum:31 - ~message:"fun:test_expect_test:1041" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - (match ignore z with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1041 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1041 ~entry_id:__entry_id; - raise e)))) x; - w) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "track_foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1038 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1038 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (track_foo 8)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 64)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1059 - ~location:{ start_bol = 39951; start_pos = 39951; end_pos = 41316 } - ~trailing_loc:{ - start_bol = 41309; - start_pos = 41316; - end_pos = 41316 - } - ~body_loc:{ start_bol = 39951; start_pos = 39951; end_pos = 41316 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 68) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 69) - ~description:(Some "respect scope of nested extension points") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 67), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1061:32: track_branches\n \226\148\156\226\148\128x = 8\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1070:6: else:test_expect_test:1070\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1074:25: result\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1074:55: then:test_expect_test:1074\n \226\148\130 \226\148\148\226\148\128result = 8\n \226\148\148\226\148\128track_branches = 8\n 8\n \"test/test_expect_test.ml\":1061:32: track_branches\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1063:6: then:test_expect_test:1063\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1067:25: result\n \226\148\130 \226\148\148\226\148\128result = 3\n \226\148\148\226\148\128track_branches = 3\n 3\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 40675; - start_pos = 40679; - end_pos = 41315 - })) - ~node_loc:{ - start_bol = 40664; - start_pos = 40666; - end_pos = 41316 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let track_branches (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1061 ~start_colnum:32 ~end_lnum:1075 - ~end_colnum:16 ~message:"track_branches" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match if x < 6 - then - let __entry_id = Debug_runtime.get_entry_id () in - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1063 ~start_colnum:6 ~end_lnum:1068 - ~end_colnum:16 - ~message:"then:test_expect_test:1063" - ~entry_id:__entry_id ~log_level:1 `Track; - (match match x with - | 0 -> 1 - | 1 -> 0 - | _ -> - let result : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1067 ~start_colnum:25 - ~end_lnum:1067 ~end_colnum:31 - ~message:"result" - ~entry_id:__entry_id ~log_level:1 - `Debug; - (match if x > 2 then x else - x with - | result as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "result") - ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) - result)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1067 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1067 - ~entry_id:__entry_id; - raise e)) in - result - with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1063 ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1063 ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1070 ~start_colnum:6 ~end_lnum:1075 - ~end_colnum:16 - ~message:"else:test_expect_test:1070" - ~entry_id:__entry_id ~log_level:1 `Track; - (match match x with - | 6 -> 5 - | 7 -> 4 - | _ -> - let result : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 ~start_colnum:25 - ~end_lnum:1074 ~end_colnum:31 - ~message:"result" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match if x < 10 - then - let __entry_id = - Debug_runtime.get_entry_id - () in - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 - ~start_colnum:55 - ~end_lnum:1074 - ~end_colnum:56 - ~message:"then:test_expect_test:1074" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match x with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 - ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 - ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = - Debug_runtime.get_entry_id - () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 - ~start_colnum:62 - ~end_lnum:1074 - ~end_colnum:65 - ~message:"else:test_expect_test:1074" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match - x with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 - ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 - ~entry_id:__entry_id; - raise e))) - with - | result as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "result") - ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) - result)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1074 - ~entry_id:__entry_id; - raise e)) in - result - with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1070 ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1070 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "track_branches") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1061 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1061 - ~entry_id:__entry_id; - raise e)) in - let () = - try - print_endline @@ (Int.to_string @@ (track_branches 8)); - print_endline @@ (Int.to_string @@ (track_branches 3)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 67)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1103 - ~location:{ start_bol = 41318; start_pos = 41318; end_pos = 42079 } - ~trailing_loc:{ - start_bol = 42072; - start_pos = 42079; - end_pos = 42079 - } - ~body_loc:{ start_bol = 41318; start_pos = 41318; end_pos = 42079 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 71) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 72) - ~description:(Some "%debug_show un-annotated toplevel fun") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 70), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1105:27: anonymous\n \226\148\148\226\148\128\"We do log this function\"\n 6\n 6\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 41943; - start_pos = 41947; - end_pos = 42078 - })) - ~node_loc:{ - start_bol = 41932; - start_pos = 41934; - end_pos = 42079 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let anonymous x = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1105 ~start_colnum:27 ~end_lnum:1108 - ~end_colnum:73 ~message:"anonymous" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match let nested y = y + 1 in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "We do log this function"); - (Array.fold_left (+) 0) @@ - (Array.init (nested x) (fun (i : int) -> i)) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1105 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1105 - ~entry_id:__entry_id; - raise e)) in - let followup x = - let nested y = y + 1 in - (Array.fold_left (+) 0) @@ - (Array.init (nested x) (fun (i : int) -> i)) in - let () = - print_endline @@ (Int.to_string @@ (anonymous 3)); - print_endline @@ (Int.to_string @@ (followup 3)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 70)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1128 - ~location:{ start_bol = 42081; start_pos = 42081; end_pos = 42945 } - ~trailing_loc:{ - start_bol = 42938; - start_pos = 42945; - end_pos = 42945 - } - ~body_loc:{ start_bol = 42081; start_pos = 42081; end_pos = 42945 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 74) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 75) - ~description:(Some "%debug_show nested un-annotated toplevel fun") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 73), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1130:25: wrapper\n \"test/test_expect_test.ml\":1131:29: anonymous\n \226\148\148\226\148\128\"We do log this function\"\n 6\n 6\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 42761; - start_pos = 42765; - end_pos = 42944 - })) - ~node_loc:{ - start_bol = 42750; - start_pos = 42752; - end_pos = 42945 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let wrapper () = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1130 ~start_colnum:25 ~end_lnum:1140 - ~end_colnum:25 ~message:"wrapper" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match let anonymous x = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1131 ~start_colnum:29 ~end_lnum:1134 - ~end_colnum:75 ~message:"anonymous" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match let nested y = y + 1 in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%S") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - "We do log this function"); - (Array.fold_left (+) 0) @@ - (Array.init (nested x) - (fun (i : int) -> i)) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1131 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1131 ~entry_id:__entry_id; - raise e)) in - let followup x = - let nested y = y + 1 in - (Array.fold_left (+) 0) @@ - (Array.init (nested x) (fun (i : int) -> i)) in - (anonymous, followup) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1130 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1130 - ~entry_id:__entry_id; - raise e)) in - let (anonymous, followup) = wrapper () in - let () = - print_endline @@ (Int.to_string @@ (anonymous 3)); - print_endline @@ (Int.to_string @@ (followup 3)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 73)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1157 - ~location:{ start_bol = 42947; start_pos = 42947; end_pos = 44157 } - ~trailing_loc:{ - start_bol = 44150; - start_pos = 44157; - end_pos = 44157 - } - ~body_loc:{ start_bol = 42947; start_pos = 42947; end_pos = 44157 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 78) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 79) - ~description:(Some "%track_show no return type anonymous fun") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 77), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n \"test/test_expect_test.ml\":1173:27: anonymous\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1174:50: fun:test_expect_test:1174\n \226\148\130 \226\148\148\226\148\128i = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1174:50: fun:test_expect_test:1174\n \226\148\130 \226\148\148\226\148\128i = 1\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1174:50: fun:test_expect_test:1174\n \226\148\130 \226\148\148\226\148\128i = 2\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1174:50: fun:test_expect_test:1174\n \226\148\148\226\148\128i = 3\n 6\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 43705; - start_pos = 43709; - end_pos = 44156 - })) - ~node_loc:{ - start_bol = 43694; - start_pos = 43696; - end_pos = 44157 - })); - ((Ppx_expect_runtime.Expectation_id.of_int_exn 76), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1159:27: anonymous\n \226\148\148\226\148\128x = 3\n 6\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 43333; - start_pos = 43337; - end_pos = 43442 - })) - ~node_loc:{ - start_bol = 43322; - start_pos = 43324; - end_pos = 43443 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let anonymous (x : int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1159 ~start_colnum:27 ~end_lnum:1160 - ~end_colnum:70 ~message:"anonymous" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match (Array.fold_left (+) 0) @@ - (Array.init (x + 1) (fun (i : int) -> i)) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1159 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1159 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (anonymous 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 76)) - [@merlin.hide ]); - (let anonymous (x : int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1173 ~start_colnum:27 ~end_lnum:1174 - ~end_colnum:70 ~message:"anonymous" ~entry_id:__entry_id - ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - x)); - (match (Array.fold_left (+) 0) @@ - (Array.init (x + 1) - (fun (i : int) -> - let __entry_id = - Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1174 ~start_colnum:50 - ~end_lnum:1174 ~end_colnum:70 - ~message:"fun:test_expect_test:1174" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show - ?descr:(Some "i") ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i)); - (match i with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1174 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1174 - ~entry_id:__entry_id; - raise e)))) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1173 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1173 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (anonymous 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 77)) - [@merlin.hide ]))) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1195 - ~location:{ start_bol = 44159; start_pos = 44159; end_pos = 49509 } - ~trailing_loc:{ - start_bol = 49502; - start_pos = 49509; - end_pos = 49509 - } - ~body_loc:{ start_bol = 44159; start_pos = 44159; end_pos = 49509 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 81) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 82) - ~description:(Some - "%track_show anonymous fun, num children exceeded") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 80), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1197:35: loop_exceeded\n \226\148\156\226\148\128x = 3\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\156\226\148\128i = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:35: else:test_expect_test:1205\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1197:35: loop_exceeded\n \226\148\156\226\148\128x = 2\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\156\226\148\128i = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:35: else:test_expect_test:1205\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1197:35: loop_exceeded\n \226\148\156\226\148\128x = 1\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\156\226\148\128i = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:35: else:test_expect_test:1205\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1197:35: loop_exceeded\n \226\148\156\226\148\128x = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 0\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 1\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 2\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 3\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 4\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 4\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 5\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 5\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 6\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 6\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 7\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 7\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 8\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 8\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1203:11: fun:test_expect_test:1203\n \226\148\130 \226\148\156\226\148\128i = 9\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1204:17: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 9\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1205:28: then:test_expect_test:1205\n \226\148\148\226\148\128fun:test_expect_test:1203 = \n Raised exception: ppx_minidebug: max_num_children exceeded\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 44809; - start_pos = 44813; - end_pos = 49508 - })) - ~node_loc:{ - start_bol = 44798; - start_pos = 44800; - end_pos = 49509 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let rec loop_exceeded (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1197 ~start_colnum:35 ~end_lnum:1205 - ~end_colnum:72 ~message:"loop_exceeded" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 10); - (Array.fold_left (+) 0) @@ - (Array.init (100 / (x + 1)) - (fun (i : int) -> - let __entry_id = - Debug_runtime.get_entry_id () in - (); - if Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show - ~descr:"fun:test_expect_test:1203" - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1203 ~start_colnum:11 - ~end_lnum:1205 ~end_colnum:71 - ~message:"fun:test_expect_test:1203" - ~entry_id:__entry_id ~log_level:1 - `Track; - Debug_runtime.log_value_show - ?descr:(Some "i") ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i)); - if Debug_runtime.exceeds_max_nesting () - then - (Debug_runtime.log_value_show - ~descr:"fun:test_expect_test:1203" - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1203 ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match let z : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - if - Debug_runtime.exceeds_max_children - () - then - (Debug_runtime.log_value_show - ~descr:"z" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1204 - ~start_colnum:17 - ~end_lnum:1204 - ~end_colnum:18 - ~message:"z" - ~entry_id:__entry_id - ~log_level:1 `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"z" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1204 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i + ((x - 1) / 2) - with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt - -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") - x) - [@ocaml.warning - "-39"] - [@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1204 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1204 - ~entry_id:__entry_id; - raise e))) in - if x <= 0 - then - let __entry_id = - Debug_runtime.get_entry_id () in - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1205 - ~start_colnum:28 - ~end_lnum:1205 - ~end_colnum:29 - ~message:"then:test_expect_test:1205" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match i with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1205 - ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1205 - ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = - Debug_runtime.get_entry_id - () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1205 - ~start_colnum:35 - ~end_lnum:1205 - ~end_colnum:70 - ~message:"else:test_expect_test:1205" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match i + - (loop_exceeded - ((z + (x / 2)) - i)) - with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1205 - ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1205 - ~entry_id:__entry_id; - raise e))) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1203 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1203 - ~entry_id:__entry_id; - raise e))))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_exceeded") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1197 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1197 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_exceeded 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 80)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1291 - ~location:{ start_bol = 49511; start_pos = 49511; end_pos = 52088 } - ~trailing_loc:{ - start_bol = 52081; - start_pos = 52088; - end_pos = 52088 - } - ~body_loc:{ start_bol = 49511; start_pos = 49511; end_pos = 52088 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 84) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 85) - ~description:(Some "%track_show anonymous fun, truncated children") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 83), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1293:35: loop_exceeded\n \226\148\156\226\148\128\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1297:9: fun:test_expect_test:1297\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1298:15: z\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 7\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1299:33: else:test_expect_test:1299\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1293:35: loop_exceeded\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1297:9: fun:test_expect_test:1297\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1298:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 9\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1299:33: else:test_expect_test:1299\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1293:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1297:9: fun:test_expect_test:1297\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1298:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 14\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1299:33: else:test_expect_test:1299\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1293:35: loop_exceeded\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1297:9: fun:test_expect_test:1297\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1298:15: z\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 29\n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1299:26: then:test_expect_test:1299\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 435\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 6630\n \226\148\130 \226\148\148\226\148\128loop_exceeded = 66345\n \226\148\148\226\148\128loop_exceeded = 464436\n 464436\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 50083; - start_pos = 50087; - end_pos = 52087 - })) - ~node_loc:{ - start_bol = 50072; - start_pos = 50074; - end_pos = 52088 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~truncate_children:2 ()) in - let rec loop_exceeded (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1293 ~start_colnum:35 ~end_lnum:1299 - ~end_colnum:69 ~message:"loop_exceeded" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match (Array.fold_left (+) 0) @@ - (Array.init (30 / (x + 1)) - (fun (i : int) -> - let __entry_id = - Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1297 ~start_colnum:9 - ~end_lnum:1299 ~end_colnum:69 - ~message:"fun:test_expect_test:1297" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show - ?descr:(Some "i") ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i)); - (match let z : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1298 ~start_colnum:15 - ~end_lnum:1298 ~end_colnum:16 - ~message:"z" ~entry_id:__entry_id - ~log_level:1 `Track; - (match i + ((x - 1) / 2) with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1298 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1298 - ~entry_id:__entry_id; - raise e)) in - if x <= 0 - then - let __entry_id = - Debug_runtime.get_entry_id () in - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1299 ~start_colnum:26 - ~end_lnum:1299 ~end_colnum:27 - ~message:"then:test_expect_test:1299" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match i with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1299 - ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1299 - ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1299 ~start_colnum:33 - ~end_lnum:1299 ~end_colnum:68 - ~message:"else:test_expect_test:1299" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match i + - (loop_exceeded - ((z + (x / 2)) - i)) - with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1299 - ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1299 - ~entry_id:__entry_id; - raise e))) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1297 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1297 ~entry_id:__entry_id; - raise e)))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_exceeded") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1293 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1293 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_exceeded 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 83)) - [@merlin.hide ])) -module type T = sig type c val c : c end -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1349 - ~location:{ start_bol = 52137; start_pos = 52137; end_pos = 52778 } - ~trailing_loc:{ - start_bol = 52771; - start_pos = 52778; - end_pos = 52778 - } - ~body_loc:{ start_bol = 52137; start_pos = 52137; end_pos = 52778 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 87) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 88) - ~description:(Some "%debug_show function with abstract type") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 86), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1351:21: foo\n \226\148\156\226\148\128c = 1\n \226\148\148\226\148\128foo = 2\n 2\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 52656; - start_pos = 52660; - end_pos = 52777 - })) - ~node_loc:{ - start_bol = 52645; - start_pos = 52647; - end_pos = 52778 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let foo (type d) ((module D) : (module T with type c = d)) ~a - (c : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1351 ~start_colnum:21 ~end_lnum:1352 - ~end_colnum:47 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "c") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) c)); - (match if c = 0 then 0 else List.length [a; D.c] with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1351 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1351 - ~entry_id:__entry_id; - raise e)) in - let () = - try - print_endline @@ - (Int.to_string @@ - (foo (module struct type c = int - let c = 7 end) ~a:3 1)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 86)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1375 - ~location:{ start_bol = 52780; start_pos = 52780; end_pos = 54820 } - ~trailing_loc:{ - start_bol = 54813; - start_pos = 54820; - end_pos = 54820 - } - ~body_loc:{ start_bol = 52780; start_pos = 52780; end_pos = 54820 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 90) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 91) - ~description:(Some - "%debug_show PrintBox values_first_mode to stdout with exception") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 89), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n loop_truncated\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1377:36\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128z = 3\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1378:8\n \226\148\148\226\148\128loop_truncated\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1377:36\n \226\148\156\226\148\128x = 6\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1378:8\n \226\148\148\226\148\128loop_truncated\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1377:36\n \226\148\156\226\148\128x = 5\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1378:8\n \226\148\148\226\148\128loop_truncated\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1377:36\n \226\148\156\226\148\128x = 4\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1378:8\n \226\148\148\226\148\128loop_truncated\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1377:36\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1378:8\n \226\148\148\226\148\128loop_truncated\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1377:36\n \226\148\156\226\148\128x = 2\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1378:8\n \226\148\148\226\148\128loop_truncated\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1377:36\n \226\148\156\226\148\128x = 1\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1378:8\n \226\148\148\226\148\128loop_truncated\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1377:36\n \226\148\156\226\148\128x = 0\n \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1378:8\n Raised exception.\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 53302; - start_pos = 53306; - end_pos = 54819 - })) - ~node_loc:{ - start_bol = 53291; - start_pos = 53293; - end_pos = 54820 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let rec loop_truncated (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1377 ~start_colnum:36 ~end_lnum:1380 - ~end_colnum:36 ~message:"loop_truncated" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1378 ~start_colnum:8 ~end_lnum:1378 - ~end_colnum:9 ~message:"z" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match (x - 1) / 2 with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1378 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1378 ~entry_id:__entry_id; - raise e)) in - if x <= 0 - then - failwith - "the log as for loop_complete but without return values"; - z + (loop_truncated (z + (x / 2))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_truncated") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1377 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1377 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_truncated 7)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 89)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1432 - ~location:{ start_bol = 54822; start_pos = 54822; end_pos = 56323 } - ~trailing_loc:{ - start_bol = 56316; - start_pos = 56323; - end_pos = 56323 - } - ~body_loc:{ start_bol = 54822; start_pos = 54822; end_pos = 56323 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 93) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 94) - ~description:(Some - "%debug_show PrintBox values_first_mode to stdout num children exceeded linear") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 92), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n _bar\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1437:21\n \226\148\156\226\148\128_baz = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 4\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 6\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 8\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 10\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 12\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 14\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 16\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 18\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\156\226\148\128_baz = 20\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1441:16\n \226\148\148\226\148\128_baz = \n Raised exception: ppx_minidebug: max_num_children exceeded\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 55369; - start_pos = 55373; - end_pos = 56322 - })) - ~node_loc:{ - start_bol = 55358; - start_pos = 55360; - end_pos = 56323 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1437 ~start_colnum:21 ~end_lnum:1437 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 10); - for i = 0 to 100 do - (let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - if Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show - ~descr:"_baz" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1441 ~start_colnum:16 - ~end_lnum:1441 ~end_colnum:20 - ~message:"_baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - if Debug_runtime.exceeds_max_nesting () - then - (Debug_runtime.log_value_show - ~descr:"_baz" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1441 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "_baz") - ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1441 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1441 - ~entry_id:__entry_id; - raise e))) in - ()) - done - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1437 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1437 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 92)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1479 - ~location:{ start_bol = 56325; start_pos = 56325; end_pos = 58184 } - ~trailing_loc:{ - start_bol = 58177; - start_pos = 58184; - end_pos = 58184 - } - ~body_loc:{ start_bol = 56325; start_pos = 56325; end_pos = 58184 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 96) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 97) - ~description:(Some - "%track_show PrintBox values_first_mode to stdout track for-loop") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 95), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n _bar = ()\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1483:21\n \226\148\148\226\148\128for:test_expect_test:1486\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1486:10\n \226\148\156\226\148\128i = 0\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1486:14\n \226\148\130 \226\148\148\226\148\128_baz = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1487:16\n \226\148\156\226\148\128i = 1\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1486:14\n \226\148\130 \226\148\148\226\148\128_baz = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1487:16\n \226\148\156\226\148\128i = 2\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1486:14\n \226\148\130 \226\148\148\226\148\128_baz = 4\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1487:16\n \226\148\156\226\148\128i = 3\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1486:14\n \226\148\130 \226\148\148\226\148\128_baz = 6\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1487:16\n \226\148\156\226\148\128i = 4\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1486:14\n \226\148\130 \226\148\148\226\148\128_baz = 8\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1487:16\n \226\148\156\226\148\128i = 5\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1486:14\n \226\148\130 \226\148\148\226\148\128_baz = 10\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1487:16\n \226\148\156\226\148\128i = 6\n \226\148\148\226\148\128\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1486:14\n \226\148\148\226\148\128_baz = 12\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1487:16\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 56839; - start_pos = 56843; - end_pos = 58183 - })) - ~node_loc:{ - start_bol = 56828; - start_pos = 56830; - end_pos = 58184 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let () = - try - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1483 ~start_colnum:21 ~end_lnum:1483 - ~end_colnum:25 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Track; - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 1000); - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1486 ~start_colnum:10 - ~end_lnum:1489 ~end_colnum:14 - ~message:"for:test_expect_test:1486" - ~entry_id:__entry_id ~log_level:1 `Track; - (match for i = 0 to 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.log_value_show - ?descr:(Some "i") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i); - if - Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show - ~descr:"i" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1486 ~start_colnum:14 - ~end_lnum:1486 ~end_colnum:15 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"i" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1487 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match let _baz : int = - let __entry_id = - Debug_runtime.get_entry_id - () in - (); - if - Debug_runtime.exceeds_max_children - () - then - (Debug_runtime.log_value_show - ~descr:"_baz" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1487 - ~start_colnum:16 - ~end_lnum:1487 - ~end_colnum:20 - ~message:"_baz" - ~entry_id:__entry_id - ~log_level:1 `Track; - if - Debug_runtime.exceeds_max_nesting - () - then - (Debug_runtime.log_value_show - ~descr:"_baz" - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1487 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i * 2 with - | _baz as __res -> - (((); - Debug_runtime.log_value_show - ?descr:( - Some "_baz") - ~entry_id:__entry_id - ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt - -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") - x) - [@ocaml.warning - "-39"] - [@ocaml.warning - "-A"]) - _baz)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1487 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1487 - ~entry_id:__entry_id; - raise e))) in - () - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1487 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1487 - ~entry_id:__entry_id; - raise e))) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1486 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1486 ~entry_id:__entry_id; - raise e))) - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1483 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1483 ~entry_id:__entry_id; - raise e)) in - () - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 95)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1538 - ~location:{ start_bol = 58186; start_pos = 58186; end_pos = 60390 } - ~trailing_loc:{ - start_bol = 60383; - start_pos = 60390; - end_pos = 60390 - } - ~body_loc:{ start_bol = 58186; start_pos = 58186; end_pos = 60390 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 99) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 100) - ~description:(Some - "%debug_show PrintBox values_first_mode to stdout num children exceeded nested") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 98), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n loop_exceeded\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1541:35\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\148\226\148\128loop_exceeded\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1541:35\n \226\148\156\226\148\128x = 2\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\148\226\148\128loop_exceeded\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1541:35\n \226\148\156\226\148\128x = 1\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\148\226\148\128loop_exceeded\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1541:35\n \226\148\156\226\148\128x = 0\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 3\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 4\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 5\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 6\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 7\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 8\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\156\226\148\128z = 9\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1548:17\n \226\148\148\226\148\128z = \n Raised exception: ppx_minidebug: max_num_children exceeded\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 58900; - start_pos = 58904; - end_pos = 60389 - })) - ~node_loc:{ - start_bol = 58889; - start_pos = 58891; - end_pos = 60390 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let rec loop_exceeded (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1541 ~start_colnum:35 ~end_lnum:1549 - ~end_colnum:72 ~message:"loop_exceeded" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match Debug_runtime.max_nesting_depth := (Some 1000); - Debug_runtime.max_num_children := (Some 10); - (Array.fold_left (+) 0) @@ - (Array.init (100 / (x + 1)) - (fun i -> - let z : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - if Debug_runtime.exceeds_max_children () - then - (Debug_runtime.log_value_show ~descr:"z" - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - ""; - failwith - "ppx_minidebug: max_num_children exceeded") - else - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1548 ~start_colnum:17 - ~end_lnum:1548 ~end_colnum:18 - ~message:"z" ~entry_id:__entry_id - ~log_level:1 `Debug; - if Debug_runtime.exceeds_max_nesting () - then - (Debug_runtime.log_value_show - ~descr:"z" ~entry_id:__entry_id - ~log_level:1 ~is_result:false - ""; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1548 - ~entry_id:__entry_id; - failwith - "ppx_minidebug: max_nesting_depth exceeded") - else - (match i + ((x - 1) / 2) with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1548 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1548 - ~entry_id:__entry_id; - raise e))) in - if x <= 0 - then i - else i + (loop_exceeded ((z + (x / 2)) - i)))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_exceeded") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1541 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1541 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_exceeded 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 98)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1600 - ~location:{ start_bol = 60392; start_pos = 60392; end_pos = 67577 } - ~trailing_loc:{ - start_bol = 67570; - start_pos = 67577; - end_pos = 67577 - } - ~body_loc:{ start_bol = 60392; start_pos = 60392; end_pos = 67577 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 102) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 103) - ~description:(Some - "%debug_show elapsed times PrintBox values_first_mode to stdout nested, truncated children") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 101), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n loop_exceeded = 58435 \n \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\156\226\148\128\n \226\148\156\226\148\128z = 4 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\156\226\148\128loop_exceeded = 11685 \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128z = 4 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128loop_exceeded = 1945 \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 8 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\156\226\148\128loop_exceeded = 190 \n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128z = 16 \n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128z = 17 \n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\130 \226\148\156\226\148\128z = 18 \n \226\148\130 \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 9 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\148\226\148\128loop_exceeded = 190 \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 16 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 17 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 18 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 5 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\148\226\148\128loop_exceeded = 1945 \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128z = 8 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128loop_exceeded = 190 \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 16 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 17 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 18 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 9 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\148\226\148\128loop_exceeded = 190 \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128z = 16 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 17 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 18 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\148\226\148\128z = 19 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\156\226\148\128z = 5 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\148\226\148\128loop_exceeded = 11685 \n \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\156\226\148\128\n \226\148\156\226\148\128z = 4 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\156\226\148\128loop_exceeded = 1945 \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128z = 8 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128loop_exceeded = 190 \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 16 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 17 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\156\226\148\128z = 18 \n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 19 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 9 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\148\226\148\128loop_exceeded = 190 \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128z = 16 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 17 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 18 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\148\226\148\128z = 19 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\156\226\148\128z = 5 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\148\226\148\128loop_exceeded = 1945 \n \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\156\226\148\128\n \226\148\156\226\148\128z = 8 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\156\226\148\128loop_exceeded = 190 \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128z = 16 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 17 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\156\226\148\128z = 18 \n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\130 \226\148\148\226\148\128z = 19 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\156\226\148\128z = 9 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\148\226\148\128loop_exceeded = 190 \n \226\148\156\226\148\128\"test/test_expect_test.ml\":1606:35\n \226\148\156\226\148\128\n \226\148\156\226\148\128z = 16 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\156\226\148\128z = 17 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\156\226\148\128z = 18 \n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n \226\148\148\226\148\128z = 19 \n \226\148\148\226\148\128\"test/test_expect_test.ml\":1611:15\n 58435\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 61254; - start_pos = 61258; - end_pos = 67576 - })) - ~node_loc:{ - start_bol = 61243; - start_pos = 61245; - end_pos = 67577 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~elapsed_times:Microseconds - ~values_first_mode:true ~truncate_children:4 ()) in - let rec loop_exceeded (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1606 ~start_colnum:35 ~end_lnum:1612 - ~end_colnum:69 ~message:"loop_exceeded" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match (Array.fold_left (+) 0) @@ - (Array.init (20 / (x + 1)) - (fun i -> - let z : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1611 ~start_colnum:15 - ~end_lnum:1611 ~end_colnum:16 - ~message:"z" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match i + ((x - 1) / 2) with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1611 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1611 - ~entry_id:__entry_id; - raise e)) in - if x <= 0 - then i - else i + (loop_exceeded ((z + (x / 2)) - i)))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_exceeded") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1606 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1606 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (loop_exceeded 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - let output = - ((Ppx_expect_test_block.read_test_output_no_backtrace_check - ()) - [@merlin.hide ]) in - let output = - Str.global_replace - (Str.regexp {|[0-9]+?[0-9]+.[0-9]+[0-9]+μs|}) - "N.NN\206\188s" output in - print_endline output; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 101)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1766 - ~location:{ start_bol = 67579; start_pos = 67579; end_pos = 70401 } - ~trailing_loc:{ - start_bol = 70394; - start_pos = 70401; - end_pos = 70401 - } - ~body_loc:{ start_bol = 67579; start_pos = 67579; end_pos = 70401 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 105) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 106) - ~description:(Some - "%debug_show PrintBox values_first_mode to stdout highlight") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 104), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \226\148\140\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130loop_highlight = 9\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1770:36\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130z = 3\226\148\130\n \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1771:8\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130loop_highlight = 6\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1770:36\n \226\148\156\226\148\128x = 6\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1771:8\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130loop_highlight = 4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1770:36\n \226\148\156\226\148\128x = 5\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1771:8\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130loop_highlight = 2\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1770:36\n \226\148\156\226\148\128x = 4\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1771:8\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130loop_highlight = 1\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1770:36\n \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130x = 3\226\148\130\n \226\148\130 \226\148\148\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1771:8\n \226\148\148\226\148\128loop_highlight = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1770:36\n \226\148\156\226\148\128x = 2\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1771:8\n \226\148\148\226\148\128loop_highlight = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1770:36\n \226\148\156\226\148\128x = 1\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":1771:8\n \226\148\148\226\148\128loop_highlight = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1770:36\n \226\148\156\226\148\128x = 0\n \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1771:8\n 9\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 67999; - start_pos = 68003; - end_pos = 70400 - })) - ~node_loc:{ - start_bol = 67988; - start_pos = 67990; - end_pos = 70401 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~highlight_terms:(Re.str "3") - ~values_first_mode:true ()) in - let rec loop_highlight (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1770 ~start_colnum:36 ~end_lnum:1772 - ~end_colnum:58 ~message:"loop_highlight" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1771 ~start_colnum:8 ~end_lnum:1771 - ~end_colnum:9 ~message:"z" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match (x - 1) / 2 with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1771 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1771 ~entry_id:__entry_id; - raise e)) in - if x <= 0 - then 0 - else z + (loop_highlight (z + (x / 2))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_highlight") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1770 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1770 - ~entry_id:__entry_id; - raise e)) in - print_endline @@ (Int.to_string @@ (loop_highlight 7)); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 104)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1835 - ~location:{ start_bol = 70403; start_pos = 70403; end_pos = 71467 } - ~trailing_loc:{ - start_bol = 71460; - start_pos = 71467; - end_pos = 71467 - } - ~body_loc:{ start_bol = 70403; start_pos = 70403; end_pos = 71467 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 108) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 109) - ~description:(Some - "%track_show PrintBox values_first_mode tracking") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 107), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n track_branches = 4\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1837:32\n \226\148\156\226\148\128x = 7\n \226\148\148\226\148\128else:test_expect_test:1839\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1839:9\n \226\148\148\226\148\128\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1839:36\n 4\n track_branches = -3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1837:32\n \226\148\156\226\148\128x = 3\n \226\148\148\226\148\128then:test_expect_test:1838\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1838:18\n \226\148\148\226\148\128\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1838:54\n -3\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 70918; - start_pos = 70922; - end_pos = 71466 - })) - ~node_loc:{ - start_bol = 70907; - start_pos = 70909; - end_pos = 71467 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let track_branches (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1837 ~start_colnum:32 ~end_lnum:1839 - ~end_colnum:46 ~message:"track_branches" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match if x < 6 - then - let __entry_id = Debug_runtime.get_entry_id () in - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 ~start_colnum:18 ~end_lnum:1838 - ~end_colnum:57 - ~message:"then:test_expect_test:1838" - ~entry_id:__entry_id ~log_level:1 `Track; - (match match x with - | 0 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 ~start_colnum:36 - ~end_lnum:1838 ~end_colnum:37 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 1 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 - ~entry_id:__entry_id; - raise e))) - | 1 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 ~start_colnum:45 - ~end_lnum:1838 ~end_colnum:46 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 0 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 - ~entry_id:__entry_id; - raise e))) - | _ -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 ~start_colnum:54 - ~end_lnum:1838 ~end_colnum:57 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match - x with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 - ~entry_id:__entry_id; - raise e))) - with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1838 ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 ~start_colnum:9 ~end_lnum:1839 - ~end_colnum:46 - ~message:"else:test_expect_test:1839" - ~entry_id:__entry_id ~log_level:1 `Track; - (match match x with - | 6 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 ~start_colnum:27 - ~end_lnum:1839 ~end_colnum:28 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 5 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 - ~entry_id:__entry_id; - raise e))) - | 7 -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 ~start_colnum:36 - ~end_lnum:1839 ~end_colnum:37 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match 4 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 - ~entry_id:__entry_id; - raise e))) - | _ -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 ~start_colnum:45 - ~end_lnum:1839 ~end_colnum:46 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match x with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 - ~entry_id:__entry_id; - raise e))) - with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1839 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "track_branches") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1837 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1837 - ~entry_id:__entry_id; - raise e)) in - let () = - try - print_endline @@ (Int.to_string @@ (track_branches 7)); - print_endline @@ (Int.to_string @@ (track_branches 3)) - with | _ -> print_endline "Raised exception." in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 107)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1868 - ~location:{ start_bol = 71469; start_pos = 71469; end_pos = 72470 } - ~trailing_loc:{ - start_bol = 72463; - start_pos = 72470; - end_pos = 72470 - } - ~body_loc:{ start_bol = 71469; start_pos = 71469; end_pos = 72470 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 111) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 112) - ~description:(Some - "%track_show PrintBox values_first_mode to stdout no return type anonymous fun") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 110), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n anonymous\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1871:27\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128fun:test_expect_test:1872\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1872:50\n \226\148\130 \226\148\148\226\148\128i = 0\n \226\148\156\226\148\128fun:test_expect_test:1872\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1872:50\n \226\148\130 \226\148\148\226\148\128i = 1\n \226\148\156\226\148\128fun:test_expect_test:1872\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1872:50\n \226\148\130 \226\148\148\226\148\128i = 2\n \226\148\148\226\148\128fun:test_expect_test:1872\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1872:50\n \226\148\148\226\148\128i = 3\n 6\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 71935; - start_pos = 71939; - end_pos = 72469 - })) - ~node_loc:{ - start_bol = 71924; - start_pos = 71926; - end_pos = 72470 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let anonymous (x : int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1871 ~start_colnum:27 ~end_lnum:1872 - ~end_colnum:70 ~message:"anonymous" ~entry_id:__entry_id - ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match (Array.fold_left (+) 0) @@ - (Array.init (x + 1) - (fun (i : int) -> - let __entry_id = - Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1872 ~start_colnum:50 - ~end_lnum:1872 ~end_colnum:70 - ~message:"fun:test_expect_test:1872" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show - ?descr:(Some "i") ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) i)); - (match i with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1872 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1872 ~entry_id:__entry_id; - raise e)))) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1871 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1871 - ~entry_id:__entry_id; - raise e)) in - let () = - try print_endline @@ (Int.to_string @@ (anonymous 3)) - with - | Failure s -> print_endline @@ ("Raised exception: " ^ s) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 110)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1899 - ~location:{ start_bol = 72472; start_pos = 72472; end_pos = 73689 } - ~trailing_loc:{ - start_bol = 73682; - start_pos = 73689; - end_pos = 73689 - } - ~body_loc:{ start_bol = 72472; start_pos = 72472; end_pos = 73689 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 114) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 115) - ~description:(Some "%debug_show records") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 113), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1901:21: bar\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1902:8: {first=a; second=b}\n \226\148\130 \226\148\156\226\148\128a = 7\n \226\148\130 \226\148\148\226\148\128b = 45\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1903:8: y\n \226\148\130 \226\148\148\226\148\128y = 8\n \226\148\148\226\148\128bar = 336\n 336\n \"test/test_expect_test.ml\":1907:21: baz\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1908:8: {first; second}\n \226\148\130 \226\148\156\226\148\128first = 8\n \226\148\130 \226\148\148\226\148\128second = 45\n \226\148\148\226\148\128baz = 109\n 109\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 73139; - start_pos = 73143; - end_pos = 73688 - })) - ~node_loc:{ - start_bol = 73128; - start_pos = 73130; - end_pos = 73689 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:false ()) in - let bar { first = (first : int); second = (second : int) } : - int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1901 ~start_colnum:21 ~end_lnum:1904 - ~end_colnum:15 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let { first = (a : int); second = (b : int) } = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1902 ~start_colnum:8 ~end_lnum:1902 - ~end_colnum:45 ~message:"{first=a; second=b}" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match { first; second = (second + 3) } with - | { first = a; second = b } as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "a") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) a)); - Debug_runtime.log_value_show - ?descr:(Some "b") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) b)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1902 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1902 ~entry_id:__entry_id; - raise e)) in - let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1903 ~start_colnum:8 ~end_lnum:1903 - ~end_colnum:9 ~message:"y" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match a + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1903 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1903 ~entry_id:__entry_id; - raise e)) in - (b - 3) * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1901 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1901 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })) in - let baz { first = (first : int); second = (second : int) } : - int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1907 ~start_colnum:21 ~end_lnum:1909 - ~end_colnum:28 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let { first = (first : int); second = (second : int) - } - = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1908 ~start_colnum:8 ~end_lnum:1908 - ~end_colnum:37 ~message:"{first; second}" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match { first = (first + 1); second = (second + 3) - } - with - | { first; second } as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) first)); - Debug_runtime.log_value_show - ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) second)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1908 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1908 ~entry_id:__entry_id; - raise e)) in - (first * first) + second - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1907 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1907 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 113)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1935 - ~location:{ start_bol = 73691; start_pos = 73691; end_pos = 75027 } - ~trailing_loc:{ - start_bol = 75020; - start_pos = 75027; - end_pos = 75027 - } - ~body_loc:{ start_bol = 73691; start_pos = 73691; end_pos = 75027 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 117) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 118) - ~description:(Some "%debug_show tuples") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 116), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":1937:21: bar\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1938:8: y\n \226\148\130 \226\148\148\226\148\128y = 8\n \226\148\148\226\148\128bar = 336\n 336\n \"test/test_expect_test.ml\":1947:17: (r1, r2)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1942:21: baz\n \226\148\130 \226\148\156\226\148\128first = 7\n \226\148\130 \226\148\156\226\148\128second = 42\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1943:8: (y, z)\n \226\148\130 \226\148\130 \226\148\156\226\148\128y = 8\n \226\148\130 \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1944:8: (a, b)\n \226\148\130 \226\148\130 \226\148\156\226\148\128a = 8\n \226\148\130 \226\148\130 \226\148\148\226\148\128b = 45\n \226\148\130 \226\148\148\226\148\128baz = (339, 109)\n \226\148\156\226\148\128r1 = 339\n \226\148\148\226\148\128r2 = 109\n 339\n 109\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 74365; - start_pos = 74369; - end_pos = 75026 - })) - ~node_loc:{ - start_bol = 74354; - start_pos = 74356; - end_pos = 75027 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:false ()) in - let bar ((first : int), (second : int)) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1937 ~start_colnum:21 ~end_lnum:1939 - ~end_colnum:14 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1938 ~start_colnum:8 ~end_lnum:1938 - ~end_colnum:9 ~message:"y" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match first + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1938 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1938 ~entry_id:__entry_id; - raise e)) in - second * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1937 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1937 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (bar (7, 42))) in - let baz ((first, second) : (int * int)) : (int * int)= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1942 ~start_colnum:21 ~end_lnum:1945 - ~end_colnum:35 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let (y, z) : (int * int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1943 ~start_colnum:8 ~end_lnum:1943 - ~end_colnum:14 ~message:"(y, z)" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match ((first + 1), 3) with - | (y, z) as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1943 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1943 ~entry_id:__entry_id; - raise e)) in - let ((a : int), (b : int)) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1944 ~start_colnum:8 ~end_lnum:1944 - ~end_colnum:28 ~message:"(a, b)" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match ((first + 1), (second + 3)) with - | (a, b) as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "a") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) a)); - Debug_runtime.log_value_show - ?descr:(Some "b") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) b)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1944 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1944 ~entry_id:__entry_id; - raise e)) in - (((second * y) + z), ((a * a) + b)) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%d") a0; - Ppx_deriving_runtime.Format.fprintf fmt - ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1942 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1942 - ~entry_id:__entry_id; - raise e)) in - let (r1, r2) = - (let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1947 ~start_colnum:17 ~end_lnum:1947 - ~end_colnum:23 ~message:"(r1, r2)" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match baz (7, 42) with - | (r1, r2) as __res -> - ((((); - Debug_runtime.log_value_show ?descr:(Some "r1") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - r1)); - Debug_runtime.log_value_show ?descr:(Some "r2") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) r2)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1947 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1947 - ~entry_id:__entry_id; - raise e)) : (int * int)) in - let () = print_endline @@ (Int.to_string r1) in - let () = print_endline @@ (Int.to_string r2) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 116)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:1977 - ~location:{ start_bol = 75029; start_pos = 75029; end_pos = 76320 } - ~trailing_loc:{ - start_bol = 76313; - start_pos = 76320; - end_pos = 76320 - } - ~body_loc:{ start_bol = 75029; start_pos = 75029; end_pos = 76320 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 120) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 121) - ~description:(Some "%debug_show records values_first_mode") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 119), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n bar = 336\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1979:21\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128{first=a; second=b}\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":1980:8\n \226\148\130 \226\148\148\226\148\128\n \226\148\130 \226\148\156\226\148\128a = 7\n \226\148\130 \226\148\148\226\148\128b = 45\n \226\148\148\226\148\128y = 8\n \226\148\148\226\148\128\"test/test_expect_test.ml\":1981:8\n 336\n baz = 109\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1985:21\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\148\226\148\128{first; second}\n \226\148\156\226\148\128\"test/test_expect_test.ml\":1986:8\n \226\148\148\226\148\128\n \226\148\156\226\148\128first = 8\n \226\148\148\226\148\128second = 45\n 109\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 75713; - start_pos = 75717; - end_pos = 76319 - })) - ~node_loc:{ - start_bol = 75702; - start_pos = 75704; - end_pos = 76320 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let bar { first = (first : int); second = (second : int) } : - int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1979 ~start_colnum:21 ~end_lnum:1982 - ~end_colnum:15 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let { first = (a : int); second = (b : int) } = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1980 ~start_colnum:8 ~end_lnum:1980 - ~end_colnum:45 ~message:"{first=a; second=b}" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match { first; second = (second + 3) } with - | { first = a; second = b } as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "a") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) a)); - Debug_runtime.log_value_show - ?descr:(Some "b") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) b)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1980 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1980 ~entry_id:__entry_id; - raise e)) in - let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1981 ~start_colnum:8 ~end_lnum:1981 - ~end_colnum:9 ~message:"y" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match a + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1981 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1981 ~entry_id:__entry_id; - raise e)) in - (b - 3) * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1979 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1979 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })) in - let baz { first = (first : int); second = (second : int) } : - int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:1985 ~start_colnum:21 ~end_lnum:1987 - ~end_colnum:28 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let { first = (first : int); second = (second : int) - } - = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1986 ~start_colnum:8 ~end_lnum:1986 - ~end_colnum:37 ~message:"{first; second}" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match { first = (first + 1); second = (second + 3) - } - with - | { first; second } as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) first)); - Debug_runtime.log_value_show - ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) second)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1986 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:1986 ~entry_id:__entry_id; - raise e)) in - (first * first) + second - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1985 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:1985 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 119)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2017 - ~location:{ start_bol = 76322; start_pos = 76322; end_pos = 77759 } - ~trailing_loc:{ - start_bol = 77752; - start_pos = 77759; - end_pos = 77759 - } - ~body_loc:{ start_bol = 76322; start_pos = 76322; end_pos = 77759 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 123) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 124) - ~description:(Some "%debug_show tuples values_first_mode") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 122), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n bar = 336\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2019:21\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\148\226\148\128y = 8\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2020:8\n 336\n (r1, r2)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2029:17\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128r1 = 339\n \226\148\130 \226\148\148\226\148\128r2 = 109\n \226\148\148\226\148\128baz = (339, 109)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2024:21\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128(y, z)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2025:8\n \226\148\130 \226\148\148\226\148\128\n \226\148\130 \226\148\156\226\148\128y = 8\n \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\148\226\148\128(a, b)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2026:8\n \226\148\148\226\148\128\n \226\148\156\226\148\128a = 8\n \226\148\148\226\148\128b = 45\n 339\n 109\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 77013; - start_pos = 77017; - end_pos = 77758 - })) - ~node_loc:{ - start_bol = 77002; - start_pos = 77004; - end_pos = 77759 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let bar ((first : int), (second : int)) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2019 ~start_colnum:21 ~end_lnum:2021 - ~end_colnum:14 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2020 ~start_colnum:8 ~end_lnum:2020 - ~end_colnum:9 ~message:"y" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match first + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2020 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2020 ~entry_id:__entry_id; - raise e)) in - second * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2019 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2019 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (bar (7, 42))) in - let baz ((first, second) : (int * int)) : (int * int)= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2024 ~start_colnum:21 ~end_lnum:2027 - ~end_colnum:35 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let (y, z) : (int * int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2025 ~start_colnum:8 ~end_lnum:2025 - ~end_colnum:14 ~message:"(y, z)" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match ((first + 1), 3) with - | (y, z) as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2025 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2025 ~entry_id:__entry_id; - raise e)) in - let ((a : int), (b : int)) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2026 ~start_colnum:8 ~end_lnum:2026 - ~end_colnum:28 ~message:"(a, b)" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match ((first + 1), (second + 3)) with - | (a, b) as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "a") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) a)); - Debug_runtime.log_value_show - ?descr:(Some "b") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) b)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2026 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2026 ~entry_id:__entry_id; - raise e)) in - (((second * y) + z), ((a * a) + b)) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%d") a0; - Ppx_deriving_runtime.Format.fprintf fmt - ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2024 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2024 - ~entry_id:__entry_id; - raise e)) in - let (r1, r2) = - (let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2029 ~start_colnum:17 ~end_lnum:2029 - ~end_colnum:23 ~message:"(r1, r2)" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match baz (7, 42) with - | (r1, r2) as __res -> - ((((); - Debug_runtime.log_value_show ?descr:(Some "r1") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - r1)); - Debug_runtime.log_value_show ?descr:(Some "r2") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) r2)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2029 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2029 - ~entry_id:__entry_id; - raise e)) : (int * int)) in - let () = print_endline @@ (Int.to_string r1) in - let () = print_endline @@ (Int.to_string r2) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 122)) - [@merlin.hide ])) -type 'a irrefutable = - | Zero of 'a -type ('a, 'b) left_right = - | Left of 'a - | Right of 'b -type ('a, 'b, 'c) one_two_three = - | One of 'a - | Two of 'b - | Three of 'c -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2069 - ~location:{ start_bol = 77917; start_pos = 77917; end_pos = 79238 } - ~trailing_loc:{ - start_bol = 79231; - start_pos = 79238; - end_pos = 79238 - } - ~body_loc:{ start_bol = 77917; start_pos = 77917; end_pos = 79238 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 126) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 127) - ~description:(Some "%track_show variants values_first_mode") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 125), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n bar = 16\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2071:21\n \226\148\156\226\148\128x = 7\n \226\148\148\226\148\128y = 8\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2072:8\n 16\n baz = 5\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2077:24\n \226\148\156\226\148\128 Left x\n \226\148\148\226\148\128x = 4\n 5\n baz = 6\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2078:31\n \226\148\156\226\148\128 Right Two y\n \226\148\148\226\148\128y = 3\n 6\n foo = 3\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2081:21\n \226\148\148\226\148\128\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2082:81\n 3\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 78674; - start_pos = 78678; - end_pos = 79237 - })) - ~node_loc:{ - start_bol = 78663; - start_pos = 78665; - end_pos = 79238 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let bar (Zero (x : int)) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2071 ~start_colnum:21 ~end_lnum:2073 - ~end_colnum:9 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match let y = - (let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2072 ~start_colnum:8 ~end_lnum:2072 - ~end_colnum:9 ~message:"y" ~entry_id:__entry_id - ~log_level:1 `Track; - (match x + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2072 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2072 ~entry_id:__entry_id; - raise e)) : int) in - 2 * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2071 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2071 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (bar (Zero 7))) in - let baz : 'a -> int = - function - | Left (x : int) -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2077 - ~start_colnum:24 ~end_lnum:2077 ~end_colnum:29 - ~message:" Left x" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match x + 1 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2077 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2077 ~entry_id:__entry_id; - raise e))) - | Right (Two (y : int)) -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2078 - ~start_colnum:31 ~end_lnum:2078 ~end_colnum:36 - ~message:" Right Two y" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) y)); - (match y * 2 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2078 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2078 ~entry_id:__entry_id; - raise e))) - | _ -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2079 - ~start_colnum:11 ~end_lnum:2079 ~end_colnum:12 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 3 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2079 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2079 ~entry_id:__entry_id; - raise e))) in - let foo x : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2081 ~start_colnum:21 ~end_lnum:2082 - ~end_colnum:82 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Track; - (match match x with - | Left (x : int) -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~start_colnum:35 - ~end_lnum:2082 ~end_colnum:40 - ~message:" Left x" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) x)); - (match x + 1 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~entry_id:__entry_id; - raise e))) - | Right (Two (y : int)) -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~start_colnum:68 - ~end_lnum:2082 ~end_colnum:73 - ~message:" Right Two y" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - (match y * 2 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~entry_id:__entry_id; - raise e))) - | _ -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~start_colnum:81 - ~end_lnum:2082 ~end_colnum:82 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 3 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2082 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2081 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2081 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (baz (Left 4))) in - let () = - print_endline @@ (Int.to_string @@ (baz (Right (Two 3)))) in - let () = - print_endline @@ (Int.to_string @@ (foo (Right (Three 0)))) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 125)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2113 - ~location:{ start_bol = 79240; start_pos = 79240; end_pos = 80393 } - ~trailing_loc:{ - start_bol = 80386; - start_pos = 80393; - end_pos = 80393 - } - ~body_loc:{ start_bol = 79240; start_pos = 79240; end_pos = 80393 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 129) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 130) - ~description:(Some "%debug_show tuples merge type info") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 128), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n (r1, r2)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2120:17\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128r1 = 339\n \226\148\130 \226\148\148\226\148\128r2 = 109\n \226\148\148\226\148\128baz = (339, 109)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2115:21\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128(y, z)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2116:8\n \226\148\130 \226\148\148\226\148\128\n \226\148\130 \226\148\156\226\148\128y = 8\n \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\148\226\148\128a = 8\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2117:8\n 339\n 109\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 79887; - start_pos = 79891; - end_pos = 80392 - })) - ~node_loc:{ - start_bol = 79876; - start_pos = 79878; - end_pos = 80393 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let baz (((first : int), (second : 'a)) : ('b * int)) : - (int * int)= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2115 ~start_colnum:21 ~end_lnum:2118 - ~end_colnum:35 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let ((y : 'c), (z : int)) : (int * 'd) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2116 ~start_colnum:8 ~end_lnum:2116 - ~end_colnum:29 ~message:"(y, z)" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match ((first + 1), 3) with - | (y, z) as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2116 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2116 ~entry_id:__entry_id; - raise e)) in - let ((a : int), b) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2117 ~start_colnum:8 ~end_lnum:2117 - ~end_colnum:20 ~message:"(a, b)" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match ((first + 1), (second + 3 : int)) with - | (a, _) as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "a") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) a)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2117 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2117 ~entry_id:__entry_id; - raise e)) in - (((second * y) + z), ((a * a) + b)) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%d") a0; - Ppx_deriving_runtime.Format.fprintf fmt - ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2115 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2115 - ~entry_id:__entry_id; - raise e)) in - let ((r1 : 'e), (r2 : int)) = - (let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2120 ~start_colnum:17 ~end_lnum:2120 - ~end_colnum:38 ~message:"(r1, r2)" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match baz (7, 42) with - | (r1, r2) as __res -> - ((((); - Debug_runtime.log_value_show ?descr:(Some "r1") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - r1)); - Debug_runtime.log_value_show ?descr:(Some "r2") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) r2)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2120 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2120 - ~entry_id:__entry_id; - raise e)) : (int * 'f)) in - let () = print_endline @@ (Int.to_string r1) in - let () = print_endline @@ (Int.to_string r2) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 128)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2147 - ~location:{ start_bol = 80395; start_pos = 80395; end_pos = 81028 } - ~trailing_loc:{ - start_bol = 81021; - start_pos = 81028; - end_pos = 81028 - } - ~body_loc:{ start_bol = 80395; start_pos = 80395; end_pos = 81028 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 132) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 133) - ~description:(Some - "%debug_show decompose multi-argument function type") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 131), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n f = 7\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2149:44\n \226\148\148\226\148\128b = 6\n 7\n g = 12\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2150:56\n \226\148\148\226\148\128b = 6\n 12\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 80834; - start_pos = 80838; - end_pos = 81027 - })) - ~node_loc:{ - start_bol = 80823; - start_pos = 80825; - end_pos = 81028 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let f : 'a . 'a -> int -> int = - fun _a b -> - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2149 ~start_colnum:44 ~end_lnum:2149 - ~end_colnum:61 ~message:"f" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "b") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) b)); - (match b + 1 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "f") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2149 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2149 - ~entry_id:__entry_id; - raise e)) in - let g : 'a . 'a -> int -> 'a -> 'a -> int = - fun _a b _c _d -> - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2150 ~start_colnum:56 ~end_lnum:2150 - ~end_colnum:79 ~message:"g" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "b") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) b)); - (match b * 2 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "g") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2150 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2150 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (f 'a' 6)) in - let () = print_endline @@ (Int.to_string @@ (g 'a' 6 'b' 'c')) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 131)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2166 - ~location:{ start_bol = 81030; start_pos = 81030; end_pos = 81722 } - ~trailing_loc:{ - start_bol = 81715; - start_pos = 81722; - end_pos = 81722 - } - ~body_loc:{ start_bol = 81030; start_pos = 81030; end_pos = 81722 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 135) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 136) - ~description:(Some "%debug_show debug type info") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 134), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n f : int = 7\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2170:37\n \226\148\156\226\148\128f : int\n \226\148\148\226\148\128b : int = 6\n 7\n g : int = 12\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2171:49\n \226\148\156\226\148\128g : int\n \226\148\148\226\148\128b : int = 6\n 12\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 81468; - start_pos = 81472; - end_pos = 81721 - })) - ~node_loc:{ - start_bol = 81457; - start_pos = 81459; - end_pos = 81722 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - (let f : 'a . 'a -> int -> int = - fun _a b -> - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2170 ~start_colnum:37 ~end_lnum:2170 - ~end_colnum:54 ~message:"f : int" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "b : int") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) b)); - (match b + 1 with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "f : int") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2170 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2170 ~entry_id:__entry_id; - raise e)) in - let g : 'a . 'a -> int -> 'a -> 'a -> int = - fun _a b _c _d -> - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2171 ~start_colnum:49 ~end_lnum:2171 - ~end_colnum:72 ~message:"g : int" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "b : int") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) b)); - (match b * 2 with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "g : int") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2171 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2171 ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (f 'a' 6)) in - print_endline @@ (Int.to_string @@ (g 'a' 6 'b' 'c'))); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 134)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2189 - ~location:{ start_bol = 81724; start_pos = 81724; end_pos = 83150 } - ~trailing_loc:{ - start_bol = 83143; - start_pos = 83150; - end_pos = 83150 - } - ~body_loc:{ start_bol = 81724; start_pos = 81724; end_pos = 83150 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 138) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 139) - ~description:(Some "%track_show options values_first_mode") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 137), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n foo = 14\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2191:21\n \226\148\148\226\148\128 Some y\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2192:54\n \226\148\148\226\148\128y = 7\n 14\n bar = 14\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2195:21\n \226\148\156\226\148\128l = (Some 7)\n \226\148\148\226\148\128 Some y\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2196:39\n 14\n baz = 8\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2199:74\n \226\148\156\226\148\128 Some y\n \226\148\148\226\148\128y = 4\n 8\n zoo = 9\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2203:21\n \226\148\156\226\148\128 Some (y, z)\n \226\148\156\226\148\128y = 4\n \226\148\148\226\148\128z = 5\n 9\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 82514; - start_pos = 82518; - end_pos = 83149 - })) - ~node_loc:{ - start_bol = 82503; - start_pos = 82505; - end_pos = 83150 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let foo l : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2191 ~start_colnum:21 ~end_lnum:2192 - ~end_colnum:59 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Track; - (match match l with - | None -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2192 ~start_colnum:40 - ~end_lnum:2192 ~end_colnum:41 - ~message:" None" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2192 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2192 ~entry_id:__entry_id; - raise e))) - | Some y -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2192 ~start_colnum:54 - ~end_lnum:2192 ~end_colnum:59 - ~message:" Some y" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - (match y * 2 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2192 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2192 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2191 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2191 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (foo (Some 7))) in - let bar (l : int option) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2195 ~start_colnum:21 ~end_lnum:2196 - ~end_colnum:44 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "l") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - function - | None -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "None" - | Some x -> - (Ppx_deriving_runtime.Format.pp_print_string - fmt "(Some "; - (Ppx_deriving_runtime.Format.fprintf fmt - "%d") x; - Ppx_deriving_runtime.Format.pp_print_string - fmt ")")) x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) l)); - (match match l with - | None -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2196 ~start_colnum:25 - ~end_lnum:2196 ~end_colnum:26 - ~message:" None" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2196 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2196 ~entry_id:__entry_id; - raise e))) - | Some y -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2196 ~start_colnum:39 - ~end_lnum:2196 ~end_colnum:44 - ~message:" Some y" - ~entry_id:__entry_id ~log_level:1 `Track; - (match y * 2 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2196 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2196 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2195 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2195 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (bar (Some 7))) in - let baz : int option -> int = - function - | None -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2199 - ~start_colnum:60 ~end_lnum:2199 ~end_colnum:61 - ~message:" None" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2199 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2199 ~entry_id:__entry_id; - raise e))) - | Some y -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2199 - ~start_colnum:74 ~end_lnum:2199 ~end_colnum:79 - ~message:" Some y" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) y)); - (match y * 2 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2199 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2199 ~entry_id:__entry_id; - raise e))) in - let () = print_endline @@ (Int.to_string @@ (baz (Some 4))) in - let zoo : (int * int) option -> int = - function - | None -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2202 - ~start_colnum:14 ~end_lnum:2202 ~end_colnum:15 - ~message:" None" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "zoo") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2202 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2202 ~entry_id:__entry_id; - raise e))) - | Some (y, z) -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2203 - ~start_colnum:21 ~end_lnum:2203 ~end_colnum:26 - ~message:" Some (y, z)" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) y)); - Debug_runtime.log_value_show ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) z)); - (match y + z with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "zoo") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2203 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2203 ~entry_id:__entry_id; - raise e))) in - let () = - print_endline @@ (Int.to_string @@ (zoo (Some (4, 5)))) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 137)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2234 - ~location:{ start_bol = 83152; start_pos = 83152; end_pos = 84719 } - ~trailing_loc:{ - start_bol = 84712; - start_pos = 84719; - end_pos = 84719 - } - ~body_loc:{ start_bol = 83152; start_pos = 83152; end_pos = 84719 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 141) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 142) - ~description:(Some "%track_show list values_first_mode") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 140), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n foo = 14\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2236:21\n \226\148\148\226\148\128 :: (y, _)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2236:77\n \226\148\148\226\148\128y = 7\n 14\n bar = 14\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2238:21\n \226\148\156\226\148\128l = [7]\n \226\148\148\226\148\128 :: (y, _)\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2238:77\n 14\n baz = 8\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2242:15\n \226\148\156\226\148\128 :: (y, [])\n \226\148\148\226\148\128y = 4\n 8\n baz = 9\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2243:18\n \226\148\156\226\148\128 :: (y, :: (z, []))\n \226\148\156\226\148\128y = 4\n \226\148\148\226\148\128z = 5\n 9\n baz = 10\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2244:21\n \226\148\156\226\148\128 :: (y, :: (z, _))\n \226\148\156\226\148\128y = 4\n \226\148\148\226\148\128z = 5\n 10\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 83923; - start_pos = 83927; - end_pos = 84718 - })) - ~node_loc:{ - start_bol = 83912; - start_pos = 83914; - end_pos = 84719 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let foo l : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2236 ~start_colnum:21 ~end_lnum:2236 - ~end_colnum:82 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Track; - (match match l with - | [] -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2236 ~start_colnum:63 - ~end_lnum:2236 ~end_colnum:64 - ~message:" []" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2236 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2236 ~entry_id:__entry_id; - raise e))) - | y::_ -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2236 ~start_colnum:77 - ~end_lnum:2236 ~end_colnum:82 - ~message:" :: (y, _)" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - (match y * 2 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2236 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2236 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2236 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2236 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (foo [7])) in - let bar (l : int list) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2238 ~start_colnum:21 ~end_lnum:2238 - ~end_colnum:82 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "l") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf fmt - "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf fmt - "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) l)); - (match match l with - | [] -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2238 ~start_colnum:63 - ~end_lnum:2238 ~end_colnum:64 - ~message:" []" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2238 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2238 ~entry_id:__entry_id; - raise e))) - | y::_ -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2238 ~start_colnum:77 - ~end_lnum:2238 ~end_colnum:82 - ~message:" :: (y, _)" - ~entry_id:__entry_id ~log_level:1 `Track; - (match y * 2 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2238 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2238 ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2238 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2238 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (bar [7])) in - let baz : int list -> int = - function - | [] -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2241 - ~start_colnum:12 ~end_lnum:2241 ~end_colnum:13 - ~message:" []" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2241 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2241 ~entry_id:__entry_id; - raise e))) - | y::[] -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2242 - ~start_colnum:15 ~end_lnum:2242 ~end_colnum:20 - ~message:" :: (y, [])" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) y)); - (match y * 2 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2242 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2242 ~entry_id:__entry_id; - raise e))) - | y::z::[] -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2243 - ~start_colnum:18 ~end_lnum:2243 ~end_colnum:23 - ~message:" :: (y, :: (z, []))" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) y)); - Debug_runtime.log_value_show ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) z)); - (match y + z with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2243 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2243 ~entry_id:__entry_id; - raise e))) - | y::z::_ -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2244 - ~start_colnum:21 ~end_lnum:2244 ~end_colnum:30 - ~message:" :: (y, :: (z, _))" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) y)); - Debug_runtime.log_value_show ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) z)); - (match (y + z) + 1 with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2244 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2244 ~entry_id:__entry_id; - raise e))) in - let () = print_endline @@ (Int.to_string @@ (baz [4])) in - let () = print_endline @@ (Int.to_string @@ (baz [4; 5])) in - let () = print_endline @@ (Int.to_string @@ (baz [4; 5; 6])) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 140)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2283 - ~location:{ start_bol = 84721; start_pos = 84721; end_pos = 86175 } - ~trailing_loc:{ - start_bol = 86168; - start_pos = 86175; - end_pos = 86175 - } - ~body_loc:{ start_bol = 84721; start_pos = 84721; end_pos = 86175 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 144) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 145) - ~description:(Some "%track_rt_show list runtime passing") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 143), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION foo-1\n foo = 14\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2284:24\n \226\148\148\226\148\128foo-1 :: (y, _)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2284:80\n \226\148\148\226\148\128y = 7\n 14\n\n BEGIN DEBUG SESSION baz-1\n baz = 8\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2294:15\n \226\148\156\226\148\128baz-1 :: (y, [])\n \226\148\148\226\148\128y = 4\n 8\n\n BEGIN DEBUG SESSION baz-2\n baz = 10\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2296:21\n \226\148\156\226\148\128baz-2 :: (y, :: (z, _))\n \226\148\156\226\148\128y = 4\n \226\148\148\226\148\128z = 5\n 10\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 85610; - start_pos = 85614; - end_pos = 86174 - })) - ~node_loc:{ - start_bol = 85599; - start_pos = 85601; - end_pos = 86175 - }))])[@merlin.hide ]) - (fun () -> - let foo = - (fun - (_debug_runtime : (module Minidebug_runtime.Debug_runtime)) - l -> - let module Debug_runtime = (val _debug_runtime) in - (let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 ~start_colnum:24 ~end_lnum:2284 - ~end_colnum:85 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Track; - (match match l with - | [] -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 ~start_colnum:66 - ~end_lnum:2284 ~end_colnum:67 - ~message:" []" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 - ~entry_id:__entry_id; - raise e))) - | y::_ -> - let __entry_id = - Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 ~start_colnum:80 - ~end_lnum:2284 ~end_colnum:85 - ~message:" :: (y, _)" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - (match y * 2 with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 - ~entry_id:__entry_id; - raise e))) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2284 ~entry_id:__entry_id; - raise e)) : int) : (module - Minidebug_runtime.Debug_runtime) - -> _) in - let () = - print_endline @@ - (Int.to_string @@ - (foo - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~global_prefix:"foo-1" - ~values_first_mode:true ())) [7])) in - let baz = - (fun - (_debug_runtime : (module Minidebug_runtime.Debug_runtime)) - -> - let module Debug_runtime = (val _debug_runtime) in - (function - | [] -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2293 ~start_colnum:12 ~end_lnum:2293 - ~end_colnum:13 - ~message:" []" - ~entry_id:__entry_id ~log_level:1 `Track; - (match 7 with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "baz") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2293 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2293 ~entry_id:__entry_id; - raise e))) - | y::[] -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - (Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2294 ~start_colnum:15 ~end_lnum:2294 - ~end_colnum:20 - ~message:" :: (y, [])" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - y)); - (match y * 2 with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "baz") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2294 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2294 ~entry_id:__entry_id; - raise e))) - | y::z::[] -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2295 ~start_colnum:18 - ~end_lnum:2295 ~end_colnum:23 - ~message:" :: (y, :: (z, []))" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - y)); - Debug_runtime.log_value_show ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - z)); - (match y + z with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "baz") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2295 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2295 ~entry_id:__entry_id; - raise e))) - | y::z::_ -> - let __entry_id = Debug_runtime.get_entry_id () in - ((); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2296 ~start_colnum:21 - ~end_lnum:2296 ~end_colnum:30 - ~message:" :: (y, :: (z, _))" - ~entry_id:__entry_id ~log_level:1 `Track; - Debug_runtime.log_value_show ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - y)); - Debug_runtime.log_value_show ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - z)); - (match (y + z) + 1 with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "baz") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2296 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2296 ~entry_id:__entry_id; - raise e)))) : (module - Minidebug_runtime.Debug_runtime) - -> int list -> int) in - let () = - print_endline @@ - (Int.to_string @@ - (baz - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~global_prefix:"baz-1" - ~values_first_mode:true ())) [4])) in - let () = - print_endline @@ - (Int.to_string @@ - (baz - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~global_prefix:"baz-2" - ~values_first_mode:true ())) [4; 5; 6])) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 143)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2338 - ~location:{ start_bol = 86177; start_pos = 86177; end_pos = 87360 } - ~trailing_loc:{ - start_bol = 87353; - start_pos = 87360; - end_pos = 87360 - } - ~body_loc:{ start_bol = 86177; start_pos = 86177; end_pos = 87360 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 147) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 148) - ~description:(Some "%track_rt_show procedure runtime passing") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 146), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION bar-1\n bar-1 bar begin \"test/test_expect_test.ml\":2339:24:\n bar-1 fun:test_expect_test:2339 begin \"test/test_expect_test.ml\":2339:29:\n bar-1 fun:test_expect_test:2339 end\n bar-1 bar end\n\n BEGIN DEBUG SESSION bar-2\n bar-2 bar begin \"test/test_expect_test.ml\":2339:24:\n bar-2 fun:test_expect_test:2339 begin \"test/test_expect_test.ml\":2339:29:\n bar-2 fun:test_expect_test:2339 end\n bar-2 bar end\n\n BEGIN DEBUG SESSION foo-1\n foo-1 foo begin \"test/test_expect_test.ml\":2342:24:\n foo-1 foo end\n\n BEGIN DEBUG SESSION foo-2\n foo-2 foo begin \"test/test_expect_test.ml\":2342:24:\n foo-2 foo end\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 86687; - start_pos = 86691; - end_pos = 87359 - })) - ~node_loc:{ - start_bol = 86676; - start_pos = 86678; - end_pos = 87360 - }))])[@merlin.hide ]) - (fun () -> - let bar = - (fun - (_debug_runtime : (module Minidebug_runtime.Debug_runtime)) - () -> - let module Debug_runtime = (val _debug_runtime) in - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2339 ~start_colnum:24 ~end_lnum:2339 - ~end_colnum:46 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Track; - (match (fun () -> - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2339 ~start_colnum:29 - ~end_lnum:2339 ~end_colnum:43 - ~message:"fun:test_expect_test:2339" - ~entry_id:__entry_id ~log_level:1 `Track; - (match () with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2339 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2339 ~entry_id:__entry_id; - raise e))) () - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2339 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2339 ~entry_id:__entry_id; - raise e)) : (module - Minidebug_runtime.Debug_runtime) -> - _) in - let () = - bar - (Minidebug_runtime.debug_flushing ~global_prefix:"bar-1" ()) - () in - let () = - bar - (Minidebug_runtime.debug_flushing ~global_prefix:"bar-2" ()) - () in - let foo = - (fun - (_debug_runtime : (module Minidebug_runtime.Debug_runtime)) - () -> - let module Debug_runtime = (val _debug_runtime) in - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2342 ~start_colnum:24 ~end_lnum:2344 - ~end_colnum:6 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let () = () in () with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2342 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2342 ~entry_id:__entry_id; - raise e)) : (module - Minidebug_runtime.Debug_runtime) -> - _) in - let () = - foo - (Minidebug_runtime.debug_flushing ~global_prefix:"foo-1" ()) - () in - let () = - foo - (Minidebug_runtime.debug_flushing ~global_prefix:"foo-2" ()) - () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 146)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2371 - ~location:{ start_bol = 87362; start_pos = 87362; end_pos = 88757 } - ~trailing_loc:{ - start_bol = 88750; - start_pos = 88757; - end_pos = 88757 - } - ~body_loc:{ start_bol = 87362; start_pos = 87362; end_pos = 88757 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 150) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 151) - ~description:(Some - "%track_rt_show nested procedure runtime passing") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 149), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n\n BEGIN DEBUG SESSION foo-1\n foo-1 foo begin \"test/test_expect_test.ml\":2375:26:\n foo-1 foo end\n\n BEGIN DEBUG SESSION foo-2\n foo-2 foo begin \"test/test_expect_test.ml\":2375:26:\n foo-2 foo end\n\n BEGIN DEBUG SESSION bar-1\n bar-1 bar begin \"test/test_expect_test.ml\":2374:26:\n bar-1 fun:test_expect_test:2374 begin \"test/test_expect_test.ml\":2374:31:\n bar-1 fun:test_expect_test:2374 end\n bar-1 bar end\n\n BEGIN DEBUG SESSION bar-2\n bar-2 bar begin \"test/test_expect_test.ml\":2374:26:\n bar-2 fun:test_expect_test:2374 begin \"test/test_expect_test.ml\":2374:31:\n bar-2 fun:test_expect_test:2374 end\n bar-2 bar end\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 88059; - start_pos = 88063; - end_pos = 88756 - })) - ~node_loc:{ - start_bol = 88048; - start_pos = 88050; - end_pos = 88757 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let rt_test () = - let bar = - (fun - (_debug_runtime : - (module Minidebug_runtime.Debug_runtime)) - () -> - let module Debug_runtime = (val _debug_runtime) in - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2374 - ~start_colnum:26 ~end_lnum:2374 ~end_colnum:48 - ~message:"bar" ~entry_id:__entry_id ~log_level:1 - `Track; - (match (fun () -> - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2374 ~start_colnum:31 - ~end_lnum:2374 ~end_colnum:45 - ~message:"fun:test_expect_test:2374" - ~entry_id:__entry_id ~log_level:1 `Track; - (match () with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2374 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2374 - ~entry_id:__entry_id; - raise e))) () - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2374 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2374 ~entry_id:__entry_id; - raise e)) : (module - Minidebug_runtime.Debug_runtime) - -> _) in - let foo = - (fun - (_debug_runtime : - (module Minidebug_runtime.Debug_runtime)) - () -> - let module Debug_runtime = (val _debug_runtime) in - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2375 - ~start_colnum:26 ~end_lnum:2377 ~end_colnum:8 - ~message:"foo" ~entry_id:__entry_id ~log_level:1 - `Track; - (match let () = () in () with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2375 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2375 ~entry_id:__entry_id; - raise e)) : (module - Minidebug_runtime.Debug_runtime) - -> _) in - (foo, bar) in - let (foo, bar) = rt_test () in - let () = - foo - (Minidebug_runtime.debug_flushing ~global_prefix:"foo-1" - ()) () in - let () = - foo - (Minidebug_runtime.debug_flushing ~global_prefix:"foo-2" - ()) () in - let () = - bar - (Minidebug_runtime.debug_flushing ~global_prefix:"bar-1" - ()) () in - let () = - bar - (Minidebug_runtime.debug_flushing ~global_prefix:"bar-2" - ()) () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 149)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2411 - ~location:{ start_bol = 88759; start_pos = 88759; end_pos = 89821 } - ~trailing_loc:{ - start_bol = 89814; - start_pos = 89821; - end_pos = 89821 - } - ~body_loc:{ start_bol = 88759; start_pos = 88759; end_pos = 89821 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 153) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 154) - ~description:(Some "%log constant entries") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 152), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n foo = ()\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2413:21\n \226\148\156\226\148\128\"This is the first log line\"\n \226\148\156\226\148\128[\"This is the\"; \"2\"; \"log line\"]\n \226\148\148\226\148\128(\"This is the\", 3, \"or\", 3.14, \"log line\")\n bar\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2420:21\n \226\148\156\226\148\128This is the first log line\n \226\148\156\226\148\128This is the\n \226\148\130 \226\148\156\226\148\1282\n \226\148\130 \226\148\148\226\148\128log line\n \226\148\148\226\148\128This is the\n \226\148\156\226\148\1283\n \226\148\156\226\148\128or\n \226\148\156\226\148\1283.14\n \226\148\148\226\148\128log line\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 89350; - start_pos = 89354; - end_pos = 89820 - })) - ~node_loc:{ - start_bol = 89339; - start_pos = 89341; - end_pos = 89821 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let foo () : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2413 ~start_colnum:21 ~end_lnum:2416 - ~end_colnum:51 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "This is the first log line"); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf fmt - "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf fmt - "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ["This is the"; "2"; "log line"]); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1, a2, a3, a4) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - (((((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a2); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a3); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a4); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("This is the", 3, "or", 3.14, "log line")) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2413 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2413 - ~entry_id:__entry_id; - raise e)) in - let () = foo () in - Debug_runtime.config.boxify_sexp_from_size <- 2; - (let bar () : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2420 ~start_colnum:21 ~end_lnum:2423 - ~end_colnum:51 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match Debug_runtime.log_value_sexp ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((sexp_of_string)[@merlin.hide ]) - "This is the first log line"); - Debug_runtime.log_value_sexp ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((fun x__001_ -> - sexp_of_list sexp_of_string x__001_) - [@merlin.hide ]) - ["This is the"; "2"; "log line"]); - Debug_runtime.log_value_sexp ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((fun - (arg0__002_, arg1__003_, arg2__004_, - arg3__005_, arg4__006_) - -> - let res0__007_ = sexp_of_string arg0__002_ - and res1__008_ = sexp_of_int arg1__003_ - and res2__009_ = sexp_of_string arg2__004_ - and res3__010_ = sexp_of_float arg3__005_ - and res4__011_ = sexp_of_string arg4__006_ in - Sexplib0.Sexp.List - [res0__007_; - res1__008_; - res2__009_; - res3__010_; - res4__011_])[@merlin.hide ]) - ("This is the", 3, "or", 3.14, "log line")) - with - | __res -> - (Debug_runtime.log_value_sexp ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((sexp_of_unit)[@merlin.hide ]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2420 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2420 - ~entry_id:__entry_id; - raise e)) in - let () = bar () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn - 152)) - [@merlin.hide ]))) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2447 - ~location:{ start_bol = 89823; start_pos = 89823; end_pos = 90514 } - ~trailing_loc:{ - start_bol = 90507; - start_pos = 90514; - end_pos = 90514 - } - ~body_loc:{ start_bol = 89823; start_pos = 89823; end_pos = 90514 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 156) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 157) - ~description:(Some "%log with type annotations") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 155), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n foo = ()\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2452:21\n \226\148\156\226\148\128(\"This is like\", 3, \"or\", 3.14, \"above\")\n \226\148\156\226\148\128(\"tau =\", 6.28)\n \226\148\156\226\148\128[4; 1; 2; 3]\n \226\148\156\226\148\128[3; 1; 2; 3]\n \226\148\148\226\148\128[3; 1; 2; 3]\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 90272; - start_pos = 90276; - end_pos = 90513 - })) - ~node_loc:{ - start_bol = 90261; - start_pos = 90263; - end_pos = 90514 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let i = 3 in - let pi = 3.14 in - let l = [1; 2; 3] in - let foo () : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2452 ~start_colnum:21 ~end_lnum:2457 - ~end_colnum:25 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1, a2, a3, a4) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - (((((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a2); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a3); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a4); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("This is like", (i : int), "or", (pi : - float), "above")); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a1); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("tau =", (pi *. 2. : float))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf fmt - "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf fmt - "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) (4 - :: l)); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf fmt - "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf fmt - "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) (i - :: (l : int list))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf fmt - "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf fmt - "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ((i : int) :: l)) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2452 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2452 - ~entry_id:__entry_id; - raise e)) in - let () = foo () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 155)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2472 - ~location:{ start_bol = 90516; start_pos = 90516; end_pos = 91325 } - ~trailing_loc:{ - start_bol = 91318; - start_pos = 91325; - end_pos = 91325 - } - ~body_loc:{ start_bol = 90516; start_pos = 90516; end_pos = 91325 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 159) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 160) - ~description:(Some "%log with default type assumption") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 158), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n foo = ()\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2478:21\n \226\148\156\226\148\128\"2*3\"\n \226\148\156\226\148\128(\"This is like\", \"3\", \"or\", \"3.14\", \"above\")\n \226\148\156\226\148\128(\"tau =\", \"2*3.14\")\n \226\148\148\226\148\128[(\"2*3\", 0); (\"1\", 1); (\"2\", 2); (\"3\", 3)]\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 91075; - start_pos = 91079; - end_pos = 91324 - })) - ~node_loc:{ - start_bol = 91064; - start_pos = 91066; - end_pos = 91325 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let s = "3" in - let pi = "3.14" in - let x2 s = "2*" ^ s in - let l = [("1", 1); ("2", 2); ("3", 3)] in - let foo () : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2478 ~start_colnum:21 ~end_lnum:2485 - ~end_colnum:25 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - (x2 s)); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1, a2, a3, a4) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - (((((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a1); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a2); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a3); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a4); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("This is like", s, "or", pi, "above")); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a1); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("tau =", (x2 pi))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf fmt - "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - ((fun (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])")) x; - true) false x); - Ppx_deriving_runtime.Format.fprintf fmt - "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - (((x2 s), 0) :: l)) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2478 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2478 - ~entry_id:__entry_id; - raise e)) in - let () = foo () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 158)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2499 - ~location:{ start_bol = 91327; start_pos = 91327; end_pos = 92703 } - ~trailing_loc:{ - start_bol = 92696; - start_pos = 92703; - end_pos = 92703 - } - ~body_loc:{ start_bol = 91327; start_pos = 91327; end_pos = 92703 } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 162) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 163) - ~description:(Some "%log track while-loop") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 161), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":2501:17: result\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2504:4: while:test_expect_test:2504\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2505:6: \n \226\148\130 \226\148\156\226\148\128(1 i= 0)\n \226\148\130 \226\148\156\226\148\128(2 i= 1)\n \226\148\130 \226\148\148\226\148\128(3 j= 1)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2505:6: \n \226\148\130 \226\148\156\226\148\128(1 i= 1)\n \226\148\130 \226\148\156\226\148\128(2 i= 2)\n \226\148\130 \226\148\148\226\148\128(3 j= 3)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2505:6: \n \226\148\130 \226\148\156\226\148\128(1 i= 2)\n \226\148\130 \226\148\156\226\148\128(2 i= 3)\n \226\148\130 \226\148\148\226\148\128(3 j= 6)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2505:6: \n \226\148\130 \226\148\156\226\148\128(1 i= 3)\n \226\148\130 \226\148\156\226\148\128(2 i= 4)\n \226\148\130 \226\148\148\226\148\128(3 j= 10)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2505:6: \n \226\148\130 \226\148\156\226\148\128(1 i= 4)\n \226\148\130 \226\148\156\226\148\128(2 i= 5)\n \226\148\130 \226\148\148\226\148\128(3 j= 15)\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2505:6: \n \226\148\156\226\148\128(1 i= 5)\n \226\148\156\226\148\128(2 i= 6)\n \226\148\148\226\148\128(3 j= 21)\n 21\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 91731; - start_pos = 91735; - end_pos = 92702 - })) - ~node_loc:{ - start_bol = 91720; - start_pos = 91722; - end_pos = 92703 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let result = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2501 ~start_colnum:17 ~end_lnum:2501 - ~end_colnum:23 ~message:"result" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let i = ref 0 in - let j = ref 0 in - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2504 - ~start_colnum:4 ~end_lnum:2510 ~end_colnum:8 - ~message:"while:test_expect_test:2504" - ~entry_id:__entry_id ~log_level:1 `Track; - (match while (!i) < 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2505 ~start_colnum:6 - ~end_lnum:2509 ~end_colnum:32 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((fun - (arg0__012_, arg1__013_, - arg2__014_) - -> - let res0__015_ = - sexp_of_int arg0__012_ - and res1__016_ = - sexp_of_string arg1__013_ - and res2__017_ = - sexp_of_int arg2__014_ in - Sexplib0.Sexp.List - [res0__015_; - res1__016_; - res2__017_]) - [@merlin.hide ]) - (1, "i=", (!i : int))); - incr i; - Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((fun - (arg0__018_, arg1__019_, - arg2__020_) - -> - let res0__021_ = - sexp_of_int arg0__018_ - and res1__022_ = - sexp_of_string arg1__019_ - and res2__023_ = - sexp_of_int arg2__020_ in - Sexplib0.Sexp.List - [res0__021_; - res1__022_; - res2__023_]) - [@merlin.hide ]) - (2, "i=", (!i : int))); - j := ((!j) + (!i)); - Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((fun - (arg0__024_, arg1__025_, - arg2__026_) - -> - let res0__027_ = - sexp_of_int arg0__024_ - and res1__028_ = - sexp_of_string arg1__025_ - and res2__029_ = - sexp_of_int arg2__026_ in - Sexplib0.Sexp.List - [res0__027_; - res1__028_; - res2__029_]) - [@merlin.hide ]) - (3, "j=", (!j : int))) - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2505 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2505 - ~entry_id:__entry_id; - raise e)) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2504 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2504 ~entry_id:__entry_id; - raise e))); - !j - with - | _ as __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2501 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2501 - ~entry_id:__entry_id; - raise e)) in - print_endline @@ (Int.to_string result); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 161)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2546 - ~location:{ start_bol = 92705; start_pos = 92705; end_pos = 100410 - } - ~trailing_loc:{ - start_bol = 100403; - start_pos = 100410; - end_pos = 100410 - } - ~body_loc:{ start_bol = 92705; start_pos = 92705; end_pos = 100410 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 165) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 166) - ~description:(Some "%log runtime log levels while-loop") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 164), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION Everything\n \"test/test_expect_test.ml\":2547:27: Everything result\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2550:4: Everything while:test_expect_test:2550\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6: Everything \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:21: Everything then:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128(ERROR: 1 i= 0)\n \226\148\130 \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 1)\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2555:11: Everything fun:test_expect_test:2555\n \226\148\130 \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 1)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6: Everything \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:21: Everything then:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\130 \226\148\148\226\148\128(ERROR: 1 i= 1)\n \226\148\130 \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 2)\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2555:11: Everything fun:test_expect_test:2555\n \226\148\130 \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 3)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6: Everything \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:64: Everything else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 3)\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2555:11: Everything fun:test_expect_test:2555\n \226\148\130 \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 6)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6: Everything \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:64: Everything else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 4)\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2555:11: Everything fun:test_expect_test:2555\n \226\148\130 \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 10)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6: Everything \n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:64: Everything else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 5)\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2555:11: Everything fun:test_expect_test:2555\n \226\148\130 \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 15)\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:6: Everything \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:64: Everything else:test_expect_test:2552\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 6)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2555:11: Everything fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 21)\n \226\148\148\226\148\128result = 21\n 21\n\n BEGIN DEBUG SESSION Nothing\n 21\n\n BEGIN DEBUG SESSION Error\n result = 21\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2547:27\n \226\148\148\226\148\128Error while:test_expect_test:2550\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2550:4\n \226\148\156\226\148\128Error \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Error then:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:21\n \226\148\130 \226\148\130 \226\148\148\226\148\128(ERROR: 1 i= 0)\n \226\148\130 \226\148\148\226\148\128Error fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\156\226\148\128Error \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Error then:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:21\n \226\148\130 \226\148\130 \226\148\148\226\148\128(ERROR: 1 i= 1)\n \226\148\130 \226\148\148\226\148\128Error fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\156\226\148\128Error \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Error else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:64\n \226\148\130 \226\148\148\226\148\128Error fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\156\226\148\128Error \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Error else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:64\n \226\148\130 \226\148\148\226\148\128Error fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\156\226\148\128Error \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Error else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:64\n \226\148\130 \226\148\148\226\148\128Error fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\148\226\148\128Error \n \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\156\226\148\128Error else:test_expect_test:2552\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:64\n \226\148\148\226\148\128Error fun:test_expect_test:2555\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n 21\n\n BEGIN DEBUG SESSION Warning\n result = 21\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2547:27\n \226\148\148\226\148\128Warning while:test_expect_test:2550\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2550:4\n \226\148\156\226\148\128Warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Warning then:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:21\n \226\148\130 \226\148\130 \226\148\148\226\148\128(ERROR: 1 i= 0)\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 1)\n \226\148\130 \226\148\148\226\148\128Warning fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\156\226\148\128Warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Warning then:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:21\n \226\148\130 \226\148\130 \226\148\148\226\148\128(ERROR: 1 i= 1)\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 2)\n \226\148\130 \226\148\148\226\148\128Warning fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\156\226\148\128Warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Warning else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:64\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 3)\n \226\148\130 \226\148\148\226\148\128Warning fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\156\226\148\128Warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Warning else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:64\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 4)\n \226\148\130 \226\148\148\226\148\128Warning fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\156\226\148\128Warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\130 \226\148\156\226\148\128Warning else:test_expect_test:2552\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:64\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 5)\n \226\148\130 \226\148\148\226\148\128Warning fun:test_expect_test:2555\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n \226\148\148\226\148\128Warning \n \226\148\156\226\148\128\"test/test_expect_test.ml\":2552:6\n \226\148\156\226\148\128Warning else:test_expect_test:2552\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2552:64\n \226\148\156\226\148\128(WARNING: 2 i= 6)\n \226\148\148\226\148\128Warning fun:test_expect_test:2555\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2555:11\n 21\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 93953; - start_pos = 93957; - end_pos = 100409 - })) - ~node_loc:{ - start_bol = 93942; - start_pos = 93944; - end_pos = 100410 - }))])[@merlin.hide ]) - (fun () -> - let result = - (fun - (_debug_runtime : (module Minidebug_runtime.Debug_runtime)) - () -> - let module Debug_runtime = (val _debug_runtime) in - (let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2547 ~start_colnum:27 ~end_lnum:2558 - ~end_colnum:6 ~message:"result" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let i = ref 0 in - let j = ref 0 in - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2550 ~start_colnum:4 - ~end_lnum:2557 ~end_colnum:8 - ~message:"while:test_expect_test:2550" - ~entry_id:__entry_id ~log_level:1 `Track; - (match while (!i) < 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 ~start_colnum:6 - ~end_lnum:2556 ~end_colnum:42 - ~message:"" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match if (!i) < 2 - then - (let __entry_id = - Debug_runtime.get_entry_id - () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 - ~start_colnum:21 - ~end_lnum:2552 - ~end_colnum:58 - ~message:"then:test_expect_test:2552" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match Debug_runtime.log_value_sexp - ?descr:None - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - (((fun - (arg0__030_, - arg1__031_, - arg2__032_, - arg3__033_) - -> - let res0__034_ - = - sexp_of_string - arg0__030_ - and res1__035_ - = - sexp_of_int - arg1__031_ - and res2__036_ - = - sexp_of_string - arg2__032_ - and res3__037_ - = - sexp_of_int - arg3__033_ in - Sexplib0.Sexp.List - [res0__034_; - res1__035_; - res2__036_; - res3__037_]) - [@merlin.hide ]) - ("ERROR:", 1, - "i=", - (!i : int))) - with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 - ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 - ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = - Debug_runtime.get_entry_id - () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 - ~start_colnum:64 - ~end_lnum:2552 - ~end_colnum:66 - ~message:"else:test_expect_test:2552" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match () with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 - ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 - ~entry_id:__entry_id; - raise e))); - incr i; - Debug_runtime.log_value_sexp - ?descr:None - ~entry_id:__entry_id - ~log_level:2 ~is_result:false - (((fun - (arg0__038_, arg1__039_, - arg2__040_, arg3__041_) - -> - let res0__042_ = - sexp_of_string - arg0__038_ - and res1__043_ = - sexp_of_int arg1__039_ - and res2__044_ = - sexp_of_string - arg2__040_ - and res3__045_ = - sexp_of_int arg3__041_ in - Sexplib0.Sexp.List - [res0__042_; - res1__043_; - res2__044_; - res3__045_]) - [@merlin.hide ]) - ("WARNING:", 2, "i=", - (!i : int))); - j := - (((fun { contents } -> - let __entry_id = - Debug_runtime.get_entry_id - () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2555 - ~start_colnum:11 - ~end_lnum:2555 - ~end_colnum:46 - ~message:"fun:test_expect_test:2555" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match (!j) + contents - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2555 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2555 - ~entry_id:__entry_id; - raise e)))) i); - Debug_runtime.log_value_sexp - ?descr:None - ~entry_id:__entry_id - ~log_level:3 ~is_result:false - (((fun - (arg0__046_, arg1__047_, - arg2__048_, arg3__049_) - -> - let res0__050_ = - sexp_of_string - arg0__046_ - and res1__051_ = - sexp_of_int arg1__047_ - and res2__052_ = - sexp_of_string - arg2__048_ - and res3__053_ = - sexp_of_int arg3__049_ in - Sexplib0.Sexp.List - [res0__050_; - res1__051_; - res2__052_; - res3__053_]) - [@merlin.hide ]) - ("INFO:", 3, "j=", - (!j : int))) - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2552 - ~entry_id:__entry_id; - raise e)) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2550 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2550 ~entry_id:__entry_id; - raise e))); - !j - with - | __res -> - (Debug_runtime.log_value_sexp - ?descr:(Some "result") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((sexp_of_int)[@merlin.hide ]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2547 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2547 ~entry_id:__entry_id; - raise e)) : int) : (module - Minidebug_runtime.Debug_runtime) - -> _) in - print_endline @@ - (Int.to_string - (result - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~global_prefix:"Everything" ())) ())); - print_endline @@ - (Int.to_string - (result - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~values_first_mode:true ~log_level:0 - ~global_prefix:"Nothing" ())) ())); - print_endline @@ - (Int.to_string - (result - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~values_first_mode:true ~log_level:1 - ~global_prefix:"Error" ())) ())); - print_endline @@ - (Int.to_string - (result - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~values_first_mode:true ~log_level:2 - ~global_prefix:"Warning" ())) ())); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 164)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2726 - ~location:{ - start_bol = 100412; - start_pos = 100412; - end_pos = 105430 - } - ~trailing_loc:{ - start_bol = 105423; - start_pos = 105430; - end_pos = 105430 - } - ~body_loc:{ - start_bol = 100412; - start_pos = 100412; - end_pos = 105430 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 168) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 169) - ~description:(Some "%log compile time log levels while-loop") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 167), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n everything = 21\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2728:28\n \226\148\148\226\148\128while:test_expect_test:2733\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2733:6\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2735:8\n \226\148\130 \226\148\156\226\148\128then:test_expect_test:2735\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2735:23\n \226\148\130 \226\148\130 \226\148\148\226\148\128(ERROR: 1 i= 0)\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 1)\n \226\148\130 \226\148\156\226\148\128fun:test_expect_test:2738\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2738:13\n \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 1)\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2735:8\n \226\148\130 \226\148\156\226\148\128then:test_expect_test:2735\n \226\148\130 \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2735:23\n \226\148\130 \226\148\130 \226\148\148\226\148\128(ERROR: 1 i= 1)\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 2)\n \226\148\130 \226\148\156\226\148\128fun:test_expect_test:2738\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2738:13\n \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 3)\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2735:8\n \226\148\130 \226\148\156\226\148\128else:test_expect_test:2735\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2735:66\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 3)\n \226\148\130 \226\148\156\226\148\128fun:test_expect_test:2738\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2738:13\n \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 6)\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2735:8\n \226\148\130 \226\148\156\226\148\128else:test_expect_test:2735\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2735:66\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 4)\n \226\148\130 \226\148\156\226\148\128fun:test_expect_test:2738\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2738:13\n \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 10)\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2735:8\n \226\148\130 \226\148\156\226\148\128else:test_expect_test:2735\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2735:66\n \226\148\130 \226\148\156\226\148\128(WARNING: 2 i= 5)\n \226\148\130 \226\148\156\226\148\128fun:test_expect_test:2738\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2738:13\n \226\148\130 \226\148\148\226\148\128(INFO: 3 j= 15)\n \226\148\148\226\148\128\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2735:8\n \226\148\156\226\148\128else:test_expect_test:2735\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2735:66\n \226\148\156\226\148\128(WARNING: 2 i= 6)\n \226\148\156\226\148\128fun:test_expect_test:2738\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":2738:13\n \226\148\148\226\148\128(INFO: 3 j= 21)\n 21\n nothing = 21\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2743:25\n 21\n warning = 21\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2759:25\n \226\148\148\226\148\128while:test_expect_test:2764\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2764:6\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2766:8\n \226\148\130 \226\148\156\226\148\128(ERROR: 1 i= 0)\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 1)\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2766:8\n \226\148\130 \226\148\156\226\148\128(ERROR: 1 i= 1)\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 2)\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2766:8\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 3)\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2766:8\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 4)\n \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2766:8\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 5)\n \226\148\148\226\148\128\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2766:8\n \226\148\148\226\148\128(WARNING: 2 i= 6)\n 21\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 102229; - start_pos = 102233; - end_pos = 105429 - })) - ~node_loc:{ - start_bol = 102218; - start_pos = 102220; - end_pos = 105430 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let everything () : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2728 ~start_colnum:28 ~end_lnum:2741 - ~end_colnum:9 ~message:"everything" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let i = ref 0 in - let j = ref 0 in - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2733 - ~start_colnum:6 ~end_lnum:2740 ~end_colnum:10 - ~message:"while:test_expect_test:2733" - ~entry_id:__entry_id ~log_level:1 `Track; - (match while (!i) < 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 ~start_colnum:8 - ~end_lnum:2739 ~end_colnum:44 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match if (!i) < 2 - then - (let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 - ~start_colnum:23 ~end_lnum:2735 - ~end_colnum:60 - ~message:"then:test_expect_test:2735" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match Debug_runtime.log_value_sexp - ?descr:None - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - (((fun - (arg0__054_, - arg1__055_, - arg2__056_, - arg3__057_) - -> - let res0__058_ = - sexp_of_string - arg0__054_ - and res1__059_ = - sexp_of_int - arg1__055_ - and res2__060_ = - sexp_of_string - arg2__056_ - and res3__061_ = - sexp_of_int - arg3__057_ in - Sexplib0.Sexp.List - [res0__058_; - res1__059_; - res2__060_; - res3__061_]) - [@merlin.hide ]) - ("ERROR:", 1, "i=", - (!i : int))) - with - | if_then__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 - ~entry_id:__entry_id; - if_then__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 - ~entry_id:__entry_id; - raise e))) - else - (let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 - ~start_colnum:66 ~end_lnum:2735 - ~end_colnum:68 - ~message:"else:test_expect_test:2735" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match () with - | if_else__result -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 - ~entry_id:__entry_id; - if_else__result) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 - ~entry_id:__entry_id; - raise e))); - incr i; - Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:2 ~is_result:false - (((fun - (arg0__062_, arg1__063_, - arg2__064_, arg3__065_) - -> - let res0__066_ = - sexp_of_string arg0__062_ - and res1__067_ = - sexp_of_int arg1__063_ - and res2__068_ = - sexp_of_string arg2__064_ - and res3__069_ = - sexp_of_int arg3__065_ in - Sexplib0.Sexp.List - [res0__066_; - res1__067_; - res2__068_; - res3__069_]) - [@merlin.hide ]) - ("WARNING:", 2, "i=", - (!i : int))); - j := - (((fun { contents } -> - let __entry_id = - Debug_runtime.get_entry_id - () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2738 - ~start_colnum:13 - ~end_lnum:2738 - ~end_colnum:48 - ~message:"fun:test_expect_test:2738" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match (!j) + contents with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2738 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2738 - ~entry_id:__entry_id; - raise e)))) i); - Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:3 ~is_result:false - (((fun - (arg0__070_, arg1__071_, - arg2__072_, arg3__073_) - -> - let res0__074_ = - sexp_of_string arg0__070_ - and res1__075_ = - sexp_of_int arg1__071_ - and res2__076_ = - sexp_of_string arg2__072_ - and res3__077_ = - sexp_of_int arg3__073_ in - Sexplib0.Sexp.List - [res0__074_; - res1__075_; - res2__076_; - res3__077_]) - [@merlin.hide ]) - ("INFO:", 3, "j=", (!j : int))) - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2735 - ~entry_id:__entry_id; - raise e)) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2733 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2733 ~entry_id:__entry_id; - raise e))); - !j - with - | __res -> - (Debug_runtime.log_value_sexp - ?descr:(Some "everything") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((sexp_of_int)[@merlin.hide ]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2728 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2728 - ~entry_id:__entry_id; - raise e)) in - let nothing () : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2743 ~start_colnum:25 ~end_lnum:2757 - ~end_colnum:9 ~message:"nothing" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let i = ref 0 in - let j = ref 0 in - while (!i) < 6 do - (if (!i) < 2 then () else (); - incr i; - (); - j := (((fun { contents } -> (!j) + contents)) i); - ()) - done; - !j - with - | __res -> - (Debug_runtime.log_value_sexp ?descr:(Some "nothing") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((sexp_of_int)[@merlin.hide ]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2743 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2743 - ~entry_id:__entry_id; - raise e)) in - let warning () : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2759 ~start_colnum:25 ~end_lnum:2774 - ~end_colnum:9 ~message:"warning" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let i = ref 0 in - let j = ref 0 in - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2764 - ~start_colnum:6 ~end_lnum:2773 ~end_colnum:10 - ~message:"while:test_expect_test:2764" - ~entry_id:__entry_id ~log_level:1 `Track; - (match while (!i) < 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2766 ~start_colnum:8 - ~end_lnum:2772 ~end_colnum:47 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match if (!i) < 2 - then - Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((fun - (arg0__078_, arg1__079_, - arg2__080_, arg3__081_) - -> - let res0__082_ = - sexp_of_string arg0__078_ - and res1__083_ = - sexp_of_int arg1__079_ - and res2__084_ = - sexp_of_string arg2__080_ - and res3__085_ = - sexp_of_int arg3__081_ in - Sexplib0.Sexp.List - [res0__082_; - res1__083_; - res2__084_; - res3__085_]) - [@merlin.hide ]) - ("ERROR:", 1, "i=", - (!i : int))) - else (); - incr i; - Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:2 ~is_result:false - (((fun - (arg0__086_, arg1__087_, - arg2__088_, arg3__089_) - -> - let res0__090_ = - sexp_of_string arg0__086_ - and res1__091_ = - sexp_of_int arg1__087_ - and res2__092_ = - sexp_of_string arg2__088_ - and res3__093_ = - sexp_of_int arg3__089_ in - Sexplib0.Sexp.List - [res0__090_; - res1__091_; - res2__092_; - res3__093_]) - [@merlin.hide ]) - ("WARNING:", 2, "i=", - (!i : int))); - j := - (((fun { contents } -> - (!j) + contents)) i); - () - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2766 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2766 - ~entry_id:__entry_id; - raise e)) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2764 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2764 ~entry_id:__entry_id; - raise e))); - !j - with - | __res -> - (Debug_runtime.log_value_sexp ?descr:(Some "warning") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((sexp_of_int)[@merlin.hide ]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2759 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2759 - ~entry_id:__entry_id; - raise e)) in - print_endline @@ (Int.to_string @@ (everything ())); - print_endline @@ (Int.to_string @@ (nothing ())); - print_endline @@ (Int.to_string @@ (warning ())); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 167)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2867 - ~location:{ - start_bol = 105432; - start_pos = 105432; - end_pos = 108331 - } - ~trailing_loc:{ - start_bol = 108324; - start_pos = 108331; - end_pos = 108331 - } - ~body_loc:{ - start_bol = 105432; - start_pos = 105432; - end_pos = 108331 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 171) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 172) - ~description:(Some - "%log compile time log levels runtime-passing while-loop") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 170), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION TOPLEVEL\n\n BEGIN DEBUG SESSION nothing\n 21\n\n BEGIN DEBUG SESSION warning\n warning = 21\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2896:32\n \226\148\148\226\148\128warning while:test_expect_test:2899\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2899:8\n \226\148\156\226\148\128warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2901:10\n \226\148\130 \226\148\156\226\148\128(ERROR: 1 i= 0)\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 1)\n \226\148\156\226\148\128warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2901:10\n \226\148\130 \226\148\156\226\148\128(ERROR: 1 i= 1)\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 2)\n \226\148\156\226\148\128warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2901:10\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 3)\n \226\148\156\226\148\128warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2901:10\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 4)\n \226\148\156\226\148\128warning \n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2901:10\n \226\148\130 \226\148\148\226\148\128(WARNING: 2 i= 5)\n \226\148\148\226\148\128warning \n \226\148\156\226\148\128\"test/test_expect_test.ml\":2901:10\n \226\148\148\226\148\128(WARNING: 2 i= 6)\n 21\n TOPLEVEL ()\n \226\148\148\226\148\128\"test/test_expect_test.ml\":2873:17\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 107221; - start_pos = 107225; - end_pos = 108330 - })) - ~node_loc:{ - start_bol = 107210; - start_pos = 107212; - end_pos = 108331 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~global_prefix:"TOPLEVEL" - ~values_first_mode:true ()) in - let () = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2873 ~start_colnum:17 ~end_lnum:2873 - ~end_colnum:19 ~message:"()" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match (let nothing - (_debug_runtime : - (module Minidebug_runtime.Debug_runtime)) - () : int= - let i = ref 0 in - let j = ref 0 in - while (!i) < 6 do - (if (!i) < 2 then () else (); - incr i; - (); - j := - (((fun { contents } -> (!j) + contents)) i); - ()) - done; - !j in - print_endline @@ - (Int.to_string @@ - (nothing - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~global_prefix:"nothing" - ~values_first_mode:true ())) ()))); - (let warning = - (fun - (_debug_runtime : - (module Minidebug_runtime.Debug_runtime)) - () -> - let module Debug_runtime = (val _debug_runtime) - in - (let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2896 ~start_colnum:32 - ~end_lnum:2909 ~end_colnum:10 - ~message:"warning" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let i = ref 0 in - let j = ref 0 in - (let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2899 ~start_colnum:8 - ~end_lnum:2908 ~end_colnum:12 - ~message:"while:test_expect_test:2899" - ~entry_id:__entry_id ~log_level:1 - `Track; - (match while (!i) < 6 do - let __entry_id = - Debug_runtime.get_entry_id - () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2901 - ~start_colnum:10 - ~end_lnum:2907 - ~end_colnum:49 - ~message:"" - ~entry_id:__entry_id - ~log_level:1 `Track; - (match if (!i) < 2 - then - Debug_runtime.log_value_sexp - ?descr:None - ~entry_id:__entry_id - ~log_level:1 - ~is_result:false - (((fun - (arg0__094_, - arg1__095_, - arg2__096_, - arg3__097_) - -> - let res0__098_ - = - sexp_of_string - arg0__094_ - and res1__099_ - = - sexp_of_int - arg1__095_ - and res2__100_ - = - sexp_of_string - arg2__096_ - and res3__101_ - = - sexp_of_int - arg3__097_ in - Sexplib0.Sexp.List - [res0__098_; - res1__099_; - res2__100_; - res3__101_]) - [@merlin.hide - ]) - ("ERROR:", 1, - "i=", - (!i : - int))) - else (); - incr i; - Debug_runtime.log_value_sexp - ?descr:None - ~entry_id:__entry_id - ~log_level:2 - ~is_result:false - (((fun - (arg0__102_, - arg1__103_, - arg2__104_, - arg3__105_) - -> - let res0__106_ - = - sexp_of_string - arg0__102_ - and res1__107_ - = - sexp_of_int - arg1__103_ - and res2__108_ - = - sexp_of_string - arg2__104_ - and res3__109_ - = - sexp_of_int - arg3__105_ in - Sexplib0.Sexp.List - [res0__106_; - res1__107_; - res2__108_; - res3__109_]) - [@merlin.hide ]) - ("WARNING:", 2, - "i=", - (!i : - int))); - j := - (((fun - { contents } - -> - (!j) + - contents)) - i); - () - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2901 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2901 - ~entry_id:__entry_id; - raise e)) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2899 - ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2899 - ~entry_id:__entry_id; - raise e))); - !j - with - | __res -> - (Debug_runtime.log_value_sexp - ?descr:(Some "warning") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((sexp_of_int)[@merlin.hide ]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2896 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2896 - ~entry_id:__entry_id; - raise e)) : int) : (module - Minidebug_runtime.Debug_runtime) - -> _) in - print_endline @@ - (Int.to_string @@ - (warning - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~global_prefix:"warning" - ~values_first_mode:true ())) ()))) - with - | () as __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2873 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2873 - ~entry_id:__entry_id; - raise e)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 170)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:2954 - ~location:{ - start_bol = 108333; - start_pos = 108333; - end_pos = 109881 - } - ~trailing_loc:{ - start_bol = 109874; - start_pos = 109881; - end_pos = 109881 - } - ~body_loc:{ - start_bol = 108333; - start_pos = 108333; - end_pos = 109881 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 174) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 175) - ~description:(Some "%log track while-loop result") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 173), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n 21\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2956:17\n \226\148\148\226\148\128while:test_expect_test:2959\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2959:4\n \226\148\156\226\148\128(3 j= 1)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2960:6\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128(1 i= 0)\n \226\148\130 \226\148\148\226\148\128(2 i= 1)\n \226\148\156\226\148\128(3 j= 3)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2960:6\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128(1 i= 1)\n \226\148\130 \226\148\148\226\148\128(2 i= 2)\n \226\148\156\226\148\128(3 j= 6)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2960:6\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128(1 i= 2)\n \226\148\130 \226\148\148\226\148\128(2 i= 3)\n \226\148\156\226\148\128(3 j= 10)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2960:6\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128(1 i= 3)\n \226\148\130 \226\148\148\226\148\128(2 i= 4)\n \226\148\156\226\148\128(3 j= 15)\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":2960:6\n \226\148\130 \226\148\156\226\148\128\n \226\148\130 \226\148\156\226\148\128(1 i= 4)\n \226\148\130 \226\148\148\226\148\128(2 i= 5)\n \226\148\148\226\148\128(3 j= 21)\n \226\148\156\226\148\128\"test/test_expect_test.ml\":2960:6\n \226\148\156\226\148\128\n \226\148\156\226\148\128(1 i= 5)\n \226\148\148\226\148\128(2 i= 6)\n 21\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 108805; - start_pos = 108809; - end_pos = 109880 - })) - ~node_loc:{ - start_bol = 108794; - start_pos = 108796; - end_pos = 109881 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let result = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:2956 ~start_colnum:17 ~end_lnum:2956 - ~end_colnum:23 ~message:"result" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let i = ref 0 in - let j = ref 0 in - (let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2959 - ~start_colnum:4 ~end_lnum:2965 ~end_colnum:8 - ~message:"while:test_expect_test:2959" - ~entry_id:__entry_id ~log_level:1 `Track; - (match while (!i) < 6 do - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2960 ~start_colnum:6 - ~end_lnum:2964 ~end_colnum:39 - ~message:"" - ~entry_id:__entry_id ~log_level:1 `Track; - (match Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((fun - (arg0__110_, arg1__111_, - arg2__112_) - -> - let res0__113_ = - sexp_of_int arg0__110_ - and res1__114_ = - sexp_of_string arg1__111_ - and res2__115_ = - sexp_of_int arg2__112_ in - Sexplib0.Sexp.List - [res0__113_; - res1__114_; - res2__115_]) - [@merlin.hide ]) - (1, "i=", (!i : int))); - incr i; - Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:1 ~is_result:false - (((fun - (arg0__116_, arg1__117_, - arg2__118_) - -> - let res0__119_ = - sexp_of_int arg0__116_ - and res1__120_ = - sexp_of_string arg1__117_ - and res2__121_ = - sexp_of_int arg2__118_ in - Sexplib0.Sexp.List - [res0__119_; - res1__120_; - res2__121_]) - [@merlin.hide ]) - (2, "i=", (!i : int))); - j := ((!j) + (!i)); - Debug_runtime.log_value_sexp - ?descr:None ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((fun - (arg0__122_, arg1__123_, - arg2__124_) - -> - let res0__125_ = - sexp_of_int arg0__122_ - and res1__126_ = - sexp_of_string arg1__123_ - and res2__127_ = - sexp_of_int arg2__124_ in - Sexplib0.Sexp.List - [res0__125_; - res1__126_; - res2__127_]) - [@merlin.hide ]) - (3, "j=", (!j : int))) - with - | () -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2960 - ~entry_id:__entry_id; - ()) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2960 - ~entry_id:__entry_id; - raise e)) - done - with - | () -> - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2959 ~entry_id:__entry_id - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:2959 ~entry_id:__entry_id; - raise e))); - Debug_runtime.log_value_sexp ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((sexp_of_int)[@merlin.hide ]) (!j : int)); - !j - with - | _ as __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2956 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:2956 - ~entry_id:__entry_id; - raise e)) in - print_endline @@ (Int.to_string result); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 173)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3010 - ~location:{ - start_bol = 109883; - start_pos = 109883; - end_pos = 110971 - } - ~trailing_loc:{ - start_bol = 110964; - start_pos = 110971; - end_pos = 110971 - } - ~body_loc:{ - start_bol = 109883; - start_pos = 109883; - end_pos = 110971 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 177) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 178) - ~description:(Some "%log without scope") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 176), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":3019:17: _bar {#1}\n \226\148\148\226\148\128_bar = ()\n {orphaned from #1}\n \226\148\148\226\148\128(\"This is like\", 3, \"or\", 3.14, \"above\")\n {orphaned from #1}\n \226\148\148\226\148\128(\"tau =\", 6.28)\n {orphaned from #1}\n \226\148\148\226\148\128[4; 1; 2; 3]\n {orphaned from #1}\n \226\148\148\226\148\128[3; 1; 2; 3]\n {orphaned from #1}\n \226\148\148\226\148\128[3; 1; 2; 3]\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 110602; - start_pos = 110606; - end_pos = 110970 - })) - ~node_loc:{ - start_bol = 110591; - start_pos = 110593; - end_pos = 110971 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~print_entry_ids:true ()) in - let i = 3 in - let pi = 3.14 in - let l = [1; 2; 3] in - let foo = ref @@ (fun () -> ()) in - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3019 ~start_colnum:17 ~end_lnum:3019 - ~end_colnum:21 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match foo := - (fun () -> - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1, a2, a3, a4) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - (((((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a2); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a3); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a4); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("This is like", (i : int), "or", - (pi : float), "above")); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("tau =", (pi *. 2. : float))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - (4 :: l)); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - (i :: (l : int list))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ((i : int) :: l))) - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3019 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3019 - ~entry_id:__entry_id; - raise e)) in - let () = (!foo) () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 176)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3046 - ~location:{ - start_bol = 110973; - start_pos = 110973; - end_pos = 111904 - } - ~trailing_loc:{ - start_bol = 111897; - start_pos = 111904; - end_pos = 111904 - } - ~body_loc:{ - start_bol = 110973; - start_pos = 110973; - end_pos = 111904 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 180) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 181) - ~description:(Some "%log without scope values_first_mode") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 179), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n _bar = ()\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3054:17 {#1}\n (\"This is like\", 3, \"or\", 3.14, \"above\")\n \226\148\148\226\148\128{orphaned from #1}\n (\"tau =\", 6.28)\n \226\148\148\226\148\128{orphaned from #1}\n [4; 1; 2; 3]\n \226\148\148\226\148\128{orphaned from #1}\n [3; 1; 2; 3]\n \226\148\148\226\148\128{orphaned from #1}\n [3; 1; 2; 3]\n \226\148\148\226\148\128{orphaned from #1}\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 111541; - start_pos = 111545; - end_pos = 111903 - })) - ~node_loc:{ - start_bol = 111530; - start_pos = 111532; - end_pos = 111904 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~print_entry_ids:true - ~values_first_mode:true ()) in - let i = 3 in - let pi = 3.14 in - let l = [1; 2; 3] in - let foo = ref @@ (fun () -> ()) in - let _bar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3054 ~start_colnum:17 ~end_lnum:3054 - ~end_colnum:21 ~message:"_bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match foo := - (fun () -> - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1, a2, a3, a4) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - (((((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a2); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a3); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a4); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("This is like", (i : int), "or", - (pi : float), "above")); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("tau =", (pi *. 2. : float))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - (4 :: l)); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - (i :: (l : int list))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ((i : int) :: l))) - with - | _bar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _bar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3054 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3054 - ~entry_id:__entry_id; - raise e)) in - let () = (!foo) () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 179)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3081 - ~location:{ - start_bol = 111906; - start_pos = 111906; - end_pos = 113511 - } - ~trailing_loc:{ - start_bol = 113504; - start_pos = 113511; - end_pos = 113511 - } - ~body_loc:{ - start_bol = 111906; - start_pos = 111906; - end_pos = 113511 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 183) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 184) - ~description:(Some "%log with print_entry_ids, mixed up scopes") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 182), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n bar = ()\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3091:21 {#1}\n baz = ()\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3098:21 {#2}\n bar = ()\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3091:21 {#3}\n _foobar = ()\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3110:17 {#4}\n \226\148\156\226\148\128(\"This is like\", 3, \"or\", 3.14, \"above\")\n \226\148\156\226\148\128(\"tau =\", 6.28)\n \226\148\156\226\148\128[3; 1; 2; 3]\n \226\148\156\226\148\128[3; 1; 2; 3]\n \226\148\156\226\148\128(\"This is like\", 3, \"or\", 3.14, \"above\")\n \226\148\148\226\148\128(\"tau =\", 6.28)\n [3; 1; 2; 3]\n \226\148\148\226\148\128{orphaned from #2}\n [3; 1; 2; 3]\n \226\148\148\226\148\128{orphaned from #2}\n (\"This is like\", 3, \"or\", 3.14, \"above\")\n \226\148\148\226\148\128{orphaned from #1}\n (\"tau =\", 6.28)\n \226\148\148\226\148\128{orphaned from #1}\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 112802; - start_pos = 112806; - end_pos = 113510 - })) - ~node_loc:{ - start_bol = 112791; - start_pos = 112793; - end_pos = 113511 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~print_entry_ids:true - ~values_first_mode:true ()) in - let i = 3 in - let pi = 3.14 in - let l = [1; 2; 3] in - let foo1 = ref @@ (fun () -> ()) in - let foo2 = ref @@ (fun () -> ()) in - let bar callback : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3091 ~start_colnum:21 ~end_lnum:3096 - ~end_colnum:19 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match foo1 := - (fun () -> - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1, a2, a3, a4) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - (((((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a2); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a3); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a4); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("This is like", (i : int), "or", - (pi : float), "above")); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("tau =", (pi *. 2. : float))); - callback ()) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3091 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3091 - ~entry_id:__entry_id; - raise e)) in - let baz callback : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3098 ~start_colnum:21 ~end_lnum:3103 - ~end_colnum:19 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match foo2 := - (fun () -> - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - (i :: (l : int list))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ((i : int) :: l)); - callback ()) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3098 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3098 - ~entry_id:__entry_id; - raise e)) in - let () = bar (!foo2); baz (!foo1); bar (!foo2) in - let _foobar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3110 ~start_colnum:17 ~end_lnum:3110 - ~end_colnum:24 ~message:"_foobar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match (!foo1) () with - | _foobar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_foobar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _foobar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3110 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3110 - ~entry_id:__entry_id; - raise e)) in - let () = (!foo2) () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 182)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3139 - ~location:{ - start_bol = 113513; - start_pos = 113513; - end_pos = 117373 - } - ~trailing_loc:{ - start_bol = 117366; - start_pos = 117373; - end_pos = 117373 - } - ~body_loc:{ - start_bol = 113513; - start_pos = 113513; - end_pos = 117373 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 186) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 187) - ~description:(Some - "%log with print_entry_ids, verbose_entry_ids in HTML, values_first_mode") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 185), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n
{#1} bar = ()
  • "test/test_expect_test.ml":3152:21
\n\n
{#2} baz = ()
  • "test/test_expect_test.ml":3159:21
\n\n
{#3} bar = ()
  • "test/test_expect_test.ml":3152:21
\n\n
{#4} _foobar = ()
  • "test/test_expect_test.ml":3171:17
  • {#3} ("This is like", 3, "or", 3.14, "above")
  • {#3} ("tau =", 6.28)
  • {#2} [3; 1; 2; 3]
  • {#2} [3; 1; 2; 3]
  • {#1} ("This is like", 3, "or", 3.14, "above")
  • {#1} ("tau =", 6.28)
\n\n
{#2} [3; 1; 2; 3]
  • {orphaned from #2}
\n\n
{#2} [3; 1; 2; 3]
  • {orphaned from #2}
\n\n
{#1} ("This is like", 3, "or", 3.14, "above")
  • {orphaned from #1}
\n\n
{#1} ("tau =", 6.28)
  • {orphaned from #1}
\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 114547; - start_pos = 114551; - end_pos = 117372 - })) - ~node_loc:{ - start_bol = 114536; - start_pos = 114538; - end_pos = 117373 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~print_entry_ids:true - ~verbose_entry_ids:true ~values_first_mode:true ()) in - Debug_runtime.config.backend <- - (`Html PrintBox_html.Config.default); - (let i = 3 in - let pi = 3.14 in - let l = [1; 2; 3] in - let foo1 = ref @@ (fun () -> ()) in - let foo2 = ref @@ (fun () -> ()) in - let bar callback : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3152 ~start_colnum:21 ~end_lnum:3157 - ~end_colnum:19 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match foo1 := - (fun () -> - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1, a2, a3, a4) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - (((((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a2); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a3); - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%S") a4); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - ("This is like", (i : int), "or", - (pi : float), "above")); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%F") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - ("tau =", (pi *. 2. : float))); - callback ()) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3152 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3152 - ~entry_id:__entry_id; - raise e)) in - let baz callback : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3159 ~start_colnum:21 ~end_lnum:3164 - ~end_colnum:19 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match foo2 := - (fun () -> - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) (i :: - (l : int list))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt x -> - Ppx_deriving_runtime.Format.fprintf - fmt "@[<2>["; - ignore - (List.fold_left - (fun sep x -> - if sep - then - Ppx_deriving_runtime.Format.fprintf - fmt ";@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") x; - true) false x); - Ppx_deriving_runtime.Format.fprintf - fmt "@,]@]") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) ((i : - int) :: l)); - callback ()) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3159 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3159 - ~entry_id:__entry_id; - raise e)) in - let () = bar (!foo2); baz (!foo1); bar (!foo2) in - let _foobar : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3171 ~start_colnum:17 ~end_lnum:3171 - ~end_colnum:24 ~message:"_foobar" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match (!foo1) () with - | _foobar as __res -> - (((); - Debug_runtime.log_value_show ?descr:(Some "_foobar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - _foobar)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3171 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3171 - ~entry_id:__entry_id; - raise e)) in - let () = (!foo2) () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn - 185)) - [@merlin.hide ]))) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3193 - ~location:{ - start_bol = 117375; - start_pos = 117375; - end_pos = 118375 - } - ~trailing_loc:{ - start_bol = 118368; - start_pos = 118375; - end_pos = 118375 - } - ~body_loc:{ - start_bol = 117375; - start_pos = 117375; - end_pos = 118375 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 189) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 190) - ~description:(Some "%diagn_show ignores type annots") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 188), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n 336\n 109\n toplevel\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3195:17\n \226\148\156\226\148\128(\"for bar, b-3\", 42)\n \226\148\148\226\148\128(\"for baz, f squared\", 64)\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 118195; - start_pos = 118199; - end_pos = 118374 - })) - ~node_loc:{ - start_bol = 118184; - start_pos = 118186; - end_pos = 118375 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let toplevel = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3195 ~start_colnum:17 ~end_lnum:3195 - ~end_colnum:25 ~message:"toplevel" ~entry_id:__entry_id - ~log_level:1 `Diagn; - (match let bar - { first = (first : int); second = (second : int) } - : int= - let { first = (a : int); second = (b : int) } = - { first; second = (second + 3) } in - let y : int = a + 1 in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("for bar, b-3", (b - 3 : int))); - (b - 3) * y in - let () = - print_endline @@ - (Int.to_string @@ - (bar { first = 7; second = 42 })) in - let baz - { first = (first : int); second = (second : int) } - : int= - let { first = (first : int); - second = (second : int) } - = { first = (first + 1); second = (second + 3) } in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("for baz, f squared", (first * first : int))); - (first * first) + second in - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) - with - | _ as __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3195 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3195 - ~entry_id:__entry_id; - raise e)) in - ignore toplevel; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 188)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3222 - ~location:{ - start_bol = 118377; - start_pos = 118377; - end_pos = 119388 - } - ~trailing_loc:{ - start_bol = 119381; - start_pos = 119388; - end_pos = 119388 - } - ~body_loc:{ - start_bol = 118377; - start_pos = 118377; - end_pos = 119388 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 192) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 193) - ~description:(Some "%diagn_show ignores non-empty bindings") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 191), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n bar\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3224:21\n \226\148\148\226\148\128(\"for bar, b-3\", 42)\n 336\n baz\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3231:21\n \226\148\148\226\148\128(\"foo baz, f squared\", 49)\n 91\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 119161; - start_pos = 119165; - end_pos = 119387 - })) - ~node_loc:{ - start_bol = 119150; - start_pos = 119152; - end_pos = 119388 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let bar { first = (first : int); second = (second : int) } : - int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3224 ~start_colnum:21 ~end_lnum:3228 - ~end_colnum:15 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Diagn; - ()); - ()); - (match let { first = (a : int); second = (b : int) } = - { first; second = (second + 3) } in - let y : int = a + 1 in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("for bar, b-3", (b - 3 : int))); - (b - 3) * y - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3224 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3224 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })) in - let baz { first = (first : int); second = (second : int) } : - int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3231 ~start_colnum:21 ~end_lnum:3236 - ~end_colnum:25 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Diagn; - ()); - ()); - (match let foo - { first = (first : int); second = (second : int) } - : int= - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - ("foo baz, f squared", (first * first : int))); - (first * first) + second in - foo { first; second } - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3231 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3231 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 191)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3252 - ~location:{ - start_bol = 119390; - start_pos = 119390; - end_pos = 120094 - } - ~trailing_loc:{ - start_bol = 120087; - start_pos = 120094; - end_pos = 120094 - } - ~body_loc:{ - start_bol = 119390; - start_pos = 119390; - end_pos = 120094 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 195) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 196) - ~description:(Some "%diagn_show no logs") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 194), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n 336\n 91\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 120034; - start_pos = 120045; - end_pos = 120093 - })) - ~node_loc:{ - start_bol = 120034; - start_pos = 120036; - end_pos = 120094 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let bar { first = (first : int); second = (second : int) } : - int= - let { first = (a : int); second = (b : int) } = - { first; second = (second + 3) } in - let y : int = a + 1 in (b - 3) * y in - let () = - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })) in - let baz { first = (first : int); second = (second : int) } : - int= - let foo { first = (first : int); second = (second : int) } : - int= (first * first) + second in - foo { first; second } in - let () = - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 194)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3271 - ~location:{ - start_bol = 120096; - start_pos = 120096; - end_pos = 121895 - } - ~trailing_loc:{ - start_bol = 121888; - start_pos = 121895; - end_pos = 121895 - } - ~body_loc:{ - start_bol = 120096; - start_pos = 120096; - end_pos = 121895 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 198) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 199) - ~description:(Some "%debug_show log level compile time") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 197), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n 336\n 336\n 109\n ()\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3273:18\n \226\148\156\226\148\128bar\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":3282:14\n \226\148\130 \226\148\148\226\148\128(\"for bar, b-3\", 42)\n \226\148\148\226\148\128baz = 109\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3290:26\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128{first; second}\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":3291:12\n \226\148\130 \226\148\148\226\148\128\n \226\148\130 \226\148\156\226\148\128first = 8\n \226\148\130 \226\148\148\226\148\128second = 45\n \226\148\148\226\148\128(\"for baz, f squared\", 64)\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 121369; - start_pos = 121373; - end_pos = 121894 - })) - ~node_loc:{ - start_bol = 121358; - start_pos = 121360; - end_pos = 121895 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let () = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3273 ~start_colnum:18 ~end_lnum:3273 - ~end_colnum:20 ~message:"()" ~entry_id:__entry_id - ~log_level:3 `Debug; - (match let foo - { first = (first : int); second = (second : int) } - : int= - let { first = (a : int); second = (b : int) } = - { first; second = (second + 3) } in - let y : int = a + 1 in (); (b - 3) * y in - let bar - { first = (first : int); second = (second : int) } - : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3282 ~start_colnum:14 - ~end_lnum:3286 ~end_colnum:19 ~message:"bar" - ~entry_id:__entry_id ~log_level:3 `Debug; - ()); - ()); - (match let { first = (a : int); second = (b : int) - } - = { first; second = (second + 3) } in - let y : int = a + 1 in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - ("for bar, b-3", (b - 3 : int))); - (b - 3) * y - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3282 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3282 ~entry_id:__entry_id; - raise e)) in - let baz - { first = (first : int); second = (second : int) } - : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3290 ~start_colnum:26 - ~end_lnum:3293 ~end_colnum:32 ~message:"baz" - ~entry_id:__entry_id ~log_level:2 `Debug; - Debug_runtime.log_value_show - ?descr:(Some "first") ~entry_id:__entry_id - ~log_level:2 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show - ?descr:(Some "second") ~entry_id:__entry_id - ~log_level:2 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let { first = (first : int); - second = (second : int) } - = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3291 ~start_colnum:12 - ~end_lnum:3291 ~end_colnum:41 - ~message:"{first; second}" - ~entry_id:__entry_id ~log_level:2 `Debug; - (match { - first = (first + 1); - second = (second + 3) - } - with - | { first; second } as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "first") - ~entry_id:__entry_id - ~log_level:2 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) first)); - Debug_runtime.log_value_show - ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:2 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) second)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3291 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3291 - ~entry_id:__entry_id; - raise e)) in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:2 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - ("for baz, f squared", - (first * first : int))); - (first * first) + second - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "baz") ~entry_id:__entry_id - ~log_level:2 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3290 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3290 ~entry_id:__entry_id; - raise e)) in - print_endline @@ - (Int.to_string @@ (foo { first = 7; second = 42 })); - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })); - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) - with - | () as __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3273 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3273 - ~entry_id:__entry_id; - raise e)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 197)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3322 - ~location:{ - start_bol = 121897; - start_pos = 121897; - end_pos = 123520 - } - ~trailing_loc:{ - start_bol = 123513; - start_pos = 123520; - end_pos = 123520 - } - ~body_loc:{ - start_bol = 121897; - start_pos = 121897; - end_pos = 123520 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 201) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 202) - ~description:(Some "%debug_show log level runtime") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 200), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n 336\n (\"for bar, b-3\", 42)\n \226\148\148\226\148\128{orphaned from #5}\n 336\n baz = 109\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3341:24\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128{first; second}\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":3342:10\n \226\148\130 \226\148\148\226\148\128\n \226\148\130 \226\148\156\226\148\128first = 8\n \226\148\130 \226\148\148\226\148\128second = 45\n \226\148\148\226\148\128(\"for baz, f squared\", 64)\n 109\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 123114; - start_pos = 123118; - end_pos = 123519 - })) - ~node_loc:{ - start_bol = 123103; - start_pos = 123105; - end_pos = 123520 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ~log_level:2 - ()) in - let () = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3326 ~start_colnum:18 ~end_lnum:3326 - ~end_colnum:20 ~message:"()" ~entry_id:__entry_id - ~log_level:3 `Debug; - (match let foo - { first = (first : int); second = (second : int) } - : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3327 ~start_colnum:12 - ~end_lnum:3331 ~end_colnum:17 ~message:"foo" - ~entry_id:__entry_id ~log_level:3 `Debug; - Debug_runtime.log_value_show - ?descr:(Some "first") ~entry_id:__entry_id - ~log_level:3 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show - ?descr:(Some "second") ~entry_id:__entry_id - ~log_level:3 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let { first = (a : int); second = (b : int) - } - = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3328 ~start_colnum:10 - ~end_lnum:3328 ~end_colnum:47 - ~message:"{first=a; second=b}" - ~entry_id:__entry_id ~log_level:3 `Debug; - (match { first; second = (second + 3) } - with - | { first = a; second = b } as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "a") - ~entry_id:__entry_id - ~log_level:3 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) a)); - Debug_runtime.log_value_show - ?descr:(Some "b") - ~entry_id:__entry_id ~log_level:3 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) b)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3328 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3328 - ~entry_id:__entry_id; - raise e)) in - let y : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3329 ~start_colnum:10 - ~end_lnum:3329 ~end_colnum:11 - ~message:"y" ~entry_id:__entry_id - ~log_level:3 `Debug; - (match a + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:3 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3329 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3329 - ~entry_id:__entry_id; - raise e)) in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:3 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - ("for foo, b-3", (b - 3 : int))); - (b - 3) * y - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "foo") ~entry_id:__entry_id - ~log_level:3 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3327 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3327 ~entry_id:__entry_id; - raise e)) in - let bar - { first = (first : int); second = (second : int) } - : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3333 ~start_colnum:12 - ~end_lnum:3337 ~end_colnum:17 ~message:"bar" - ~entry_id:__entry_id ~log_level:3 `Debug; - Debug_runtime.log_value_show - ?descr:(Some "first") ~entry_id:__entry_id - ~log_level:3 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show - ?descr:(Some "second") ~entry_id:__entry_id - ~log_level:3 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let { first = (a : int); second = (b : int) - } - = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3334 ~start_colnum:10 - ~end_lnum:3334 ~end_colnum:47 - ~message:"{first=a; second=b}" - ~entry_id:__entry_id ~log_level:3 `Debug; - (match { first; second = (second + 3) } - with - | { first = a; second = b } as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "a") - ~entry_id:__entry_id - ~log_level:3 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) a)); - Debug_runtime.log_value_show - ?descr:(Some "b") - ~entry_id:__entry_id ~log_level:3 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) b)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3334 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3334 - ~entry_id:__entry_id; - raise e)) in - let y : int = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3335 ~start_colnum:10 - ~end_lnum:3335 ~end_colnum:11 - ~message:"y" ~entry_id:__entry_id - ~log_level:3 `Debug; - (match a + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:3 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3335 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3335 - ~entry_id:__entry_id; - raise e)) in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - ("for bar, b-3", (b - 3 : int))); - (b - 3) * y - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "bar") ~entry_id:__entry_id - ~log_level:3 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3333 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3333 ~entry_id:__entry_id; - raise e)) in - let baz - { first = (first : int); second = (second : int) } - : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3341 ~start_colnum:24 - ~end_lnum:3344 ~end_colnum:30 ~message:"baz" - ~entry_id:__entry_id ~log_level:2 `Debug; - Debug_runtime.log_value_show - ?descr:(Some "first") ~entry_id:__entry_id - ~log_level:2 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show - ?descr:(Some "second") ~entry_id:__entry_id - ~log_level:2 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let { first = (first : int); - second = (second : int) } - = - let __entry_id = - Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3342 ~start_colnum:10 - ~end_lnum:3342 ~end_colnum:39 - ~message:"{first; second}" - ~entry_id:__entry_id ~log_level:2 `Debug; - (match { - first = (first + 1); - second = (second + 3) - } - with - | { first; second } as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "first") - ~entry_id:__entry_id - ~log_level:2 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) first)); - Debug_runtime.log_value_show - ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:2 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"] - [@ocaml.warning "-A"]) second)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3342 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3342 - ~entry_id:__entry_id; - raise e)) in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:2 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf - fmt "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%S") a0; - Ppx_deriving_runtime.Format.fprintf - fmt ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf - fmt "@])") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - ("for baz, f squared", - (first * first : int))); - (first * first) + second - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "baz") ~entry_id:__entry_id - ~log_level:2 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3341 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3341 ~entry_id:__entry_id; - raise e)) in - print_endline @@ - (Int.to_string @@ (foo { first = 7; second = 42 })); - print_endline @@ - (Int.to_string @@ (bar { first = 7; second = 42 })); - print_endline @@ - (Int.to_string @@ (baz { first = 7; second = 42 })) - with - | () as __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3326 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3326 - ~entry_id:__entry_id; - raise e)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 200)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3370 - ~location:{ - start_bol = 123522; - start_pos = 123522; - end_pos = 126461 - } - ~trailing_loc:{ - start_bol = 126454; - start_pos = 126461; - end_pos = 126461 - } - ~body_loc:{ - start_bol = 123522; - start_pos = 123522; - end_pos = 126461 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 204) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 205) - ~description:(Some "%debug_show PrintBox snapshot") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 203), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n loop_highlight\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 7\n \226\148\148\226\148\128z = 3\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \027[2J\027[1;1Hloop_highlight\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128z = 3\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 6\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 5\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 4\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 3\n \226\148\148\226\148\128z = 1\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \027[2J\027[1;1Hloop_highlight = 9\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 7\n \226\148\156\226\148\128z = 3\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight = 6\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 6\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight = 4\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 5\n \226\148\156\226\148\128z = 2\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight = 2\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 4\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight = 1\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 3\n \226\148\156\226\148\128z = 1\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 2\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 1\n \226\148\156\226\148\128z = 0\n \226\148\130 \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n \226\148\148\226\148\128loop_highlight = 0\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3372:36\n \226\148\156\226\148\128x = 0\n \226\148\148\226\148\128z = 0\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3373:8\n 9\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 123931; - start_pos = 123935; - end_pos = 126460 - })) - ~node_loc:{ - start_bol = 123920; - start_pos = 123922; - end_pos = 126461 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let rec loop_highlight (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3372 ~start_colnum:36 ~end_lnum:3375 - ~end_colnum:58 ~message:"loop_highlight" - ~entry_id:__entry_id ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) x)); - (match let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3373 ~start_colnum:8 ~end_lnum:3373 - ~end_colnum:9 ~message:"z" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match (x - 1) / 2 with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3373 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3373 ~entry_id:__entry_id; - raise e)) in - if (z = 3) || (x = 3) then Debug_runtime.snapshot (); - if x <= 0 - then 0 - else z + (loop_highlight (z + (x / 2))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "loop_highlight") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3372 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3372 - ~entry_id:__entry_id; - raise e)) in - print_endline @@ (Int.to_string @@ (loop_highlight 7)); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 203)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3454 - ~location:{ - start_bol = 126463; - start_pos = 126463; - end_pos = 126879 - } - ~trailing_loc:{ - start_bol = 126848; - start_pos = 126879; - end_pos = 126879 - } - ~body_loc:{ - start_bol = 126463; - start_pos = 126463; - end_pos = 126879 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 207) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 208) - ~description:(Some - "%track_show don't show unannotated non-function bindings") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 206), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 126834; - start_pos = 126845; - end_pos = 126878 - })) - ~node_loc:{ - start_bol = 126834; - start_pos = 126836; - end_pos = 126879 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ~log_level:3 - ()) in - let result = - let point = let open! Minidebug_runtime in (1, 2) in - ignore point in - ignore result; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 206)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3470 - ~location:{ - start_bol = 126881; - start_pos = 126881; - end_pos = 129025 - } - ~trailing_loc:{ - start_bol = 129018; - start_pos = 129025; - end_pos = 129025 - } - ~body_loc:{ - start_bol = 126881; - start_pos = 126881; - end_pos = 129025 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 210) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 211) - ~description:(Some "%log_printbox") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 209), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n foo = ()\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3472:21\n \226\148\156\226\148\1280/0\226\148\1300/1\226\148\1300/2\226\148\1300/3\226\148\1300/4\n \226\148\130 \226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\n \226\148\130 1/0\226\148\1301/1\226\148\1301/2\226\148\1301/3\226\148\1301/4\n \226\148\130 \226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\n \226\148\130 2/0\226\148\1302/1\226\148\1302/2\226\148\1302/3\226\148\1302/4\n \226\148\130 \226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\n \226\148\130 3/0\226\148\1303/1\226\148\1303/2\226\148\1303/3\226\148\1303/4\n \226\148\130 \226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\n \226\148\130 4/0\226\148\1304/1\226\148\1304/2\226\148\1304/3\226\148\1304/4\n \226\148\156\226\148\128\"No bars but pad:\"\n \226\148\156\226\148\128\n \226\148\130 0/0 0/1 0/2 0/3 0/4\n \226\148\130\n \226\148\130\n \226\148\130 1/0 1/1 1/2 1/3 1/4\n \226\148\130\n \226\148\130\n \226\148\130 2/0 2/1 2/2 2/3 2/4\n \226\148\130\n \226\148\130\n \226\148\130 3/0 3/1 3/2 3/3 3/4\n \226\148\130\n \226\148\130\n \226\148\130 4/0 4/1 4/2 4/3 4/4\n \226\148\130\n \226\148\156\226\148\128\"Now with a frame:\"\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\1300/0\226\148\1300/1\226\148\1300/2\226\148\1300/3\226\148\1300/4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\164\n \226\148\1301/0\226\148\1301/1\226\148\1301/2\226\148\1301/3\226\148\1301/4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\164\n \226\148\1302/0\226\148\1302/1\226\148\1302/2\226\148\1302/3\226\148\1302/4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\164\n \226\148\1303/0\226\148\1303/1\226\148\1303/2\226\148\1303/3\226\148\1303/4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\164\n \226\148\1304/0\226\148\1304/1\226\148\1304/2\226\148\1304/3\226\148\1304/4\226\148\130\n \226\148\148\226\148\128\226\148\128\226\148\128\226\148\180\226\148\128\226\148\128\226\148\128\226\148\180\226\148\128\226\148\128\226\148\128\226\148\180\226\148\128\226\148\128\226\148\128\226\148\180\226\148\128\226\148\128\226\148\128\226\148\152\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 127552; - start_pos = 127556; - end_pos = 129024 - })) - ~node_loc:{ - start_bol = 127541; - start_pos = 127543; - end_pos = 129025 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let foo () : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3472 ~start_colnum:21 ~end_lnum:3485 - ~end_colnum:91 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match Debug_runtime.log_value_printbox ~entry_id:__entry_id - ~log_level:1 - (PrintBox.init_grid ~line:5 ~col:5 - (fun ~line ~col -> - PrintBox.sprintf "%d/%d" line col)); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "No bars but pad:"); - Debug_runtime.log_value_printbox ~entry_id:__entry_id - ~log_level:1 - (let open PrintBox in - init_grid ~bars:false ~line:5 ~col:5 - (fun ~line ~col -> - pad @@ (sprintf "%d/%d" line col))); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "Now with a frame:"); - Debug_runtime.log_value_printbox ~entry_id:__entry_id - ~log_level:1 - (let open PrintBox in - frame @@ - (init_grid ~line:5 ~col:5 - (fun ~line ~col -> - PrintBox.sprintf "%d/%d" line col))) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3472 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3472 - ~entry_id:__entry_id; - raise e)) in - let () = foo () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 209)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3532 - ~location:{ - start_bol = 129027; - start_pos = 129027; - end_pos = 131200 - } - ~trailing_loc:{ - start_bol = 131193; - start_pos = 131200; - end_pos = 131200 - } - ~body_loc:{ - start_bol = 129027; - start_pos = 129027; - end_pos = 131200 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 213) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 214) - ~description:(Some "%log_printbox flushing") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 212), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n foo begin \"test/test_expect_test.ml\":3534:21:\n 0/0\226\148\1300/1\226\148\1300/2\226\148\1300/3\226\148\1300/4\n \226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\n 1/0\226\148\1301/1\226\148\1301/2\226\148\1301/3\226\148\1301/4\n \226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\n 2/0\226\148\1302/1\226\148\1302/2\226\148\1302/3\226\148\1302/4\n \226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\n 3/0\226\148\1303/1\226\148\1303/2\226\148\1303/3\226\148\1303/4\n \226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\n 4/0\226\148\1304/1\226\148\1304/2\226\148\1304/3\226\148\1304/4\n \"No bars but pad:\"\n\n 0/0 0/1 0/2 0/3 0/4\n\n\n 1/0 1/1 1/2 1/3 1/4\n\n\n 2/0 2/1 2/2 2/3 2/4\n\n\n 3/0 3/1 3/2 3/3 3/4\n\n\n 4/0 4/1 4/2 4/3 4/4\n bar begin \"test/test_expect_test.ml\":3543:12:\n \"Now with a frame:\"\n \226\148\140\226\148\128\226\148\128\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\1300/0\226\148\1300/1\226\148\1300/2\226\148\1300/3\226\148\1300/4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\164\n \226\148\1301/0\226\148\1301/1\226\148\1301/2\226\148\1301/3\226\148\1301/4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\164\n \226\148\1302/0\226\148\1302/1\226\148\1302/2\226\148\1302/3\226\148\1302/4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\164\n \226\148\1303/0\226\148\1303/1\226\148\1303/2\226\148\1303/3\226\148\1303/4\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\188\226\148\128\226\148\128\226\148\128\226\148\164\n \226\148\1304/0\226\148\1304/1\226\148\1304/2\226\148\1304/3\226\148\1304/4\226\148\130\n \226\148\148\226\148\128\226\148\128\226\148\128\226\148\180\226\148\128\226\148\128\226\148\128\226\148\180\226\148\128\226\148\128\226\148\128\226\148\180\226\148\128\226\148\128\226\148\128\226\148\180\226\148\128\226\148\128\226\148\128\226\148\152\n bar = ()\n bar end\n foo = ()\n foo end\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 129761; - start_pos = 129765; - end_pos = 131199 - })) - ~node_loc:{ - start_bol = 129750; - start_pos = 129752; - end_pos = 131200 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug_flushing ()) in - let foo () : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3534 ~start_colnum:21 ~end_lnum:3551 - ~end_colnum:10 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match Debug_runtime.log_value_printbox ~entry_id:__entry_id - ~log_level:1 - (PrintBox.init_grid ~line:5 ~col:5 - (fun ~line ~col -> - PrintBox.sprintf "%d/%d" line col)); - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "No bars but pad:"); - Debug_runtime.log_value_printbox ~entry_id:__entry_id - ~log_level:1 - (let open PrintBox in - init_grid ~bars:false ~line:5 ~col:5 - (fun ~line ~col -> - pad @@ (sprintf "%d/%d" line col))); - (let bar () : unit= - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3543 ~start_colnum:12 ~end_lnum:3549 - ~end_colnum:53 ~message:"bar" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%S") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) - "Now with a frame:"); - Debug_runtime.log_value_printbox - ~entry_id:__entry_id ~log_level:1 - (let open PrintBox in - frame @@ - (init_grid ~line:5 ~col:5 - (fun ~line ~col -> - PrintBox.sprintf "%d/%d" line - col))) - with - | __res -> - (Debug_runtime.log_value_show - ?descr:(Some "bar") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3543 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3543 ~entry_id:__entry_id; - raise e)) in - bar ()) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "foo") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt () -> - Ppx_deriving_runtime.Format.pp_print_string - fmt "()") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3534 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3534 - ~entry_id:__entry_id; - raise e)) in - let () = foo () in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 212)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3601 - ~location:{ - start_bol = 131202; - start_pos = 131202; - end_pos = 132326 - } - ~trailing_loc:{ - start_bol = 132319; - start_pos = 132326; - end_pos = 132326 - } - ~body_loc:{ - start_bol = 131202; - start_pos = 131202; - end_pos = 132326 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 216) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 217) - ~description:(Some "%log_block") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 215), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \"test/test_expect_test.ml\":3603:17: _logging_logic\n \226\148\156\226\148\128\"preamble\"\n \226\148\156\226\148\128header 1\n \226\148\130 \226\148\156\226\148\128\"log 1\"\n \226\148\130 \226\148\156\226\148\128nested header\n \226\148\130 \226\148\130 \226\148\148\226\148\128\"log 2\"\n \226\148\130 \226\148\148\226\148\128\"log 3\"\n \226\148\156\226\148\128header 2\n \226\148\130 \226\148\148\226\148\128\"log 4\"\n \226\148\148\226\148\128\"postscript\"\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 132031; - start_pos = 132035; - end_pos = 132325 - })) - ~node_loc:{ - start_bol = 132020; - start_pos = 132022; - end_pos = 132326 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val Minidebug_runtime.debug ()) in - let _logging_logic : unit = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3603 ~start_colnum:17 ~end_lnum:3603 - ~end_colnum:31 ~message:"_logging_logic" - ~entry_id:__entry_id ~log_level:1 `Diagn; - (match let rec loop logs = - match logs with - | "start"::header::tl -> - let more = - let __entry_id = - Debug_runtime.get_entry_id () in - Debug_runtime.open_log_no_source - ~message:header ~entry_id:__entry_id - ~log_level:1 `Diagn; - (try - loop tl; - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3608 ~entry_id:__entry_id - with - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3608 ~entry_id:__entry_id; - raise e)) in - loop more - | "end"::tl -> tl - | msg::tl -> - (Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%S") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) msg); - loop tl) - | [] -> [] in - ignore @@ - (loop - ["preamble"; - "start"; - "header 1"; - "log 1"; - "start"; - "nested header"; - "log 2"; - "end"; - "log 3"; - "end"; - "start"; - "header 2"; - "log 4"; - "end"; - "postscript"]) - with - | _logging_logic as __res -> - (((); ()); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3603 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3603 - ~entry_id:__entry_id; - raise e)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 215)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3654 - ~location:{ - start_bol = 132328; - start_pos = 132328; - end_pos = 143689 - } - ~trailing_loc:{ - start_bol = 143682; - start_pos = 143689; - end_pos = 143689 - } - ~body_loc:{ - start_bol = 132328; - start_pos = 132328; - end_pos = 143689 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 219) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 220) - ~description:(Some "flame graph") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 218), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n
\n \n
\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 133409; - start_pos = 133413; - end_pos = 143688 - })) - ~node_loc:{ - start_bol = 133398; - start_pos = 133400; - end_pos = 143689 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug_file ~hyperlink:"../" - ~toc_specific_hyperlink:"./" ~toc_flame_graph:true - ~backend:(`Html - (let open PrintBox_html.Config in - tree_summary true default)) - "test_expect_test_flame_graph") in - let rec loop (depth : int) (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3661 ~start_colnum:26 ~end_lnum:3667 - ~end_colnum:11 ~message:"loop" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "depth") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - depth)); - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match if depth > 4 - then x.first + x.second - else - if depth > 1 - then - loop (depth + 1) - { - first = (x.second + 1); - second = (x.first / 2) - } - else - (let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3665 ~start_colnum:10 - ~end_lnum:3665 ~end_colnum:11 ~message:"y" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match loop (depth + 1) - { - first = (x.second - 1); - second = (x.first + 2) - } - with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3665 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3665 ~entry_id:__entry_id; - raise e)) in - let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3666 ~start_colnum:10 - ~end_lnum:3666 ~end_colnum:11 ~message:"z" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match loop (depth + 1) - { first = (x.second + 1); second = y - } - with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3666 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3666 ~entry_id:__entry_id; - raise e)) in - z + 7) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "loop") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3661 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3661 - ~entry_id:__entry_id; - raise e)) in - let () = ignore @@ (loop 0 { first = 7; second = 42 }) in - let file = open_in "test_expect_test_flame_graph-toc.html" in - (try while true do print_endline @@ (input_line file) done - with | End_of_file -> ()); - close_in file; - (let output = - ((Ppx_expect_test_block.read_test_output_no_backtrace_check - ()) - [@merlin.hide ]) in - let output = - Str.global_replace (Str.regexp {|[0-9]+\.[0-9]*%|}) - "N.NNNN%" output in - print_endline output; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn - 218)) - [@merlin.hide ]))) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3758 - ~location:{ - start_bol = 143691; - start_pos = 143691; - end_pos = 153416 - } - ~trailing_loc:{ - start_bol = 153409; - start_pos = 153416; - end_pos = 153416 - } - ~body_loc:{ - start_bol = 143691; - start_pos = 143691; - end_pos = 153416 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 222) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 223) - ~description:(Some "flame graph reduced ToC") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 221), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n
\n \n
\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 144831; - start_pos = 144835; - end_pos = 153415 - })) - ~node_loc:{ - start_bol = 144820; - start_pos = 144822; - end_pos = 153416 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug_file ~hyperlink:"../" - ~toc_specific_hyperlink:"./" ~toc_flame_graph:true - ~toc_entry:(Minidebug_runtime.Minimal_depth 1) - ~backend:(`Html - (let open PrintBox_html.Config in - tree_summary true default)) - "test_expect_test_flame_graph") in - let rec loop (depth : int) (x : t) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3765 ~start_colnum:26 ~end_lnum:3771 - ~end_colnum:11 ~message:"loop" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "depth") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - depth)); - Debug_runtime.log_value_show ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let __0 = pp in - ((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> __0 fmt) x) - [@ocaml.warning "-A"]))[@ocaml.warning "-39"]) x)); - (match if depth > 4 - then x.first + x.second - else - if depth > 1 - then - loop (depth + 1) - { - first = (x.second + 1); - second = (x.first / 2) - } - else - (let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3769 ~start_colnum:10 - ~end_lnum:3769 ~end_colnum:11 ~message:"y" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match loop (depth + 1) - { - first = (x.second - 1); - second = (x.first + 2) - } - with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3769 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3769 ~entry_id:__entry_id; - raise e)) in - let z : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3770 ~start_colnum:10 - ~end_lnum:3770 ~end_colnum:11 ~message:"z" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match loop (depth + 1) - { first = (x.second + 1); second = y - } - with - | z as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "z") - ~entry_id:__entry_id ~log_level:1 - ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3770 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3770 ~entry_id:__entry_id; - raise e)) in - z + 7) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "loop") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3765 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3765 - ~entry_id:__entry_id; - raise e)) in - let () = ignore @@ (loop 0 { first = 7; second = 42 }) in - let file = open_in "test_expect_test_flame_graph-toc.html" in - (try while true do print_endline @@ (input_line file) done - with | End_of_file -> ()); - close_in file; - (let output = - ((Ppx_expect_test_block.read_test_output_no_backtrace_check - ()) - [@merlin.hide ]) in - let output = - Str.global_replace (Str.regexp {|[0-9]+\.[0-9]*%|}) - "N.NNNN%" output in - print_endline output; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn - 221)) - [@merlin.hide ]))) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3850 - ~location:{ - start_bol = 153418; - start_pos = 153418; - end_pos = 154215 - } - ~trailing_loc:{ - start_bol = 154208; - start_pos = 154215; - end_pos = 154215 - } - ~body_loc:{ - start_bol = 153418; - start_pos = 153418; - end_pos = 154215 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 225) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 226) - ~description:(Some "%debug_show skip module bindings") ~tags:[] - ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 224), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n bar = 15\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3853:21\n \226\148\156\226\148\128x = 7\n \226\148\148\226\148\128y = 8\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3855:8\n 15\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 154034; - start_pos = 154038; - end_pos = 154214 - })) - ~node_loc:{ - start_bol = 154023; - start_pos = 154025; - end_pos = 154215 - }))])[@merlin.hide ]) - (fun () -> - let optional v thunk = - match v with | Some v -> v | None -> thunk () in - let module Debug_runtime = (val - Minidebug_runtime.debug ~values_first_mode:true ()) in - let bar - ?rt:(rt : (module Minidebug_runtime.Debug_runtime) option) - (x : int) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - (Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3853 ~start_colnum:21 ~end_lnum:3861 - ~end_colnum:9 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Track; - Debug_runtime.log_value_sexp ?descr:(Some "x") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((sexp_of_int)[@merlin.hide ]) x)); - (match let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3855 ~start_colnum:8 ~end_lnum:3855 - ~end_colnum:9 ~message:"y" ~entry_id:__entry_id - ~log_level:1 `Track; - (match x + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_sexp - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((sexp_of_int)[@merlin.hide ]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3855 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3855 ~entry_id:__entry_id; - raise e)) in - let module Debug_runtime = (val - optional rt - (fun () : - (module Minidebug_runtime.Debug_runtime)-> - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3857 ~start_colnum:23 - ~end_lnum:3858 ~end_colnum:72 - ~message:"fun:test_expect_test:3857" - ~entry_id:__entry_id ~log_level:1 `Track; - (match ((module - Debug_runtime) : (module - Minidebug_runtime.Debug_runtime)) - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3857 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3857 ~entry_id:__entry_id; - raise e)))) in let z = y * 2 in z - 1 - with - | __res -> - (Debug_runtime.log_value_sexp ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((sexp_of_int)[@merlin.hide ]) __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3853 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3853 - ~entry_id:__entry_id; - raise e)) in - let () = - print_endline @@ - (Int.to_string @@ (bar ~rt:(module Debug_runtime) 7)) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 224)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3875 - ~location:{ - start_bol = 154217; - start_pos = 154217; - end_pos = 156128 - } - ~trailing_loc:{ - start_bol = 156121; - start_pos = 156128; - end_pos = 156128 - } - ~body_loc:{ - start_bol = 154217; - start_pos = 154217; - end_pos = 156128 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 228) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 229) - ~description:(Some "%track_l_show procedure runtime passing") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 227), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION foo-1\n foo-1 foo begin \"test/test_expect_test.ml\":3880:23:\n \"inside foo\"\n foo-1 foo end\n\n BEGIN DEBUG SESSION foo-1\n foo-1 () begin \"test/test_expect_test.ml\":3886:8:\n \"inside bar\"\n foo-1 () end\n\n BEGIN DEBUG SESSION foo-2\n foo-2 foo begin \"test/test_expect_test.ml\":3880:23:\n \"inside foo\"\n foo-2 foo end\n\n BEGIN DEBUG SESSION foo-2\n foo-2 () begin \"test/test_expect_test.ml\":3886:8:\n \"inside bar\"\n foo-2 () end\n\n BEGIN DEBUG SESSION foo-3\n foo-3 foo begin \"test/test_expect_test.ml\":3880:23:\n \"inside foo\"\n foo-3 foo end\n\n BEGIN DEBUG SESSION foo-3\n foo-3 () begin \"test/test_expect_test.ml\":3886:8:\n \"inside bar\"\n foo-3 () end\n\n BEGIN DEBUG SESSION foo-4\n foo-4 foo begin \"test/test_expect_test.ml\":3880:23:\n \"inside foo\"\n foo-4 foo end\n\n BEGIN DEBUG SESSION foo-4\n foo-4 () begin \"test/test_expect_test.ml\":3886:8:\n \"inside bar\"\n foo-4 () end\n\n BEGIN DEBUG SESSION foo-5\n foo-5 foo begin \"test/test_expect_test.ml\":3880:23:\n \"inside foo\"\n foo-5 foo end\n\n BEGIN DEBUG SESSION foo-5\n foo-5 () begin \"test/test_expect_test.ml\":3886:8:\n \"inside bar\"\n foo-5 () end\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 154670; - start_pos = 154674; - end_pos = 156127 - })) - ~node_loc:{ - start_bol = 154659; - start_pos = 154661; - end_pos = 156128 - }))])[@merlin.hide ]) - (fun () -> - let i = ref 0 in - let _get_local_debug_runtime () = - Minidebug_runtime.debug_flushing - ~global_prefix:("foo-" ^ (string_of_int (!i))) () in - let foo () = - let module Debug_runtime = (val _get_local_debug_runtime ()) - in - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3880 ~start_colnum:23 ~end_lnum:3882 - ~end_colnum:23 ~message:"foo" ~entry_id:__entry_id - ~log_level:1 `Track; - (match let () = () in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "inside foo") - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3880 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3880 - ~entry_id:__entry_id; - raise e)) in - let bar = - function - | () -> - let module Debug_runtime = (val - _get_local_debug_runtime ()) in - let __entry_id = Debug_runtime.get_entry_id () in - ((); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3886 - ~start_colnum:8 ~end_lnum:3887 ~end_colnum:27 - ~message:" ()" - ~entry_id:__entry_id ~log_level:1 `Track; - (match let () = () in - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 - ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "inside bar") - with - | __res -> - ((); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3886 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3886 ~entry_id:__entry_id; - raise e))) in - while (!i) < 5 do (incr i; foo (); bar ()) done; - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 227)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3947 - ~location:{ - start_bol = 156130; - start_pos = 156130; - end_pos = 156834 - } - ~trailing_loc:{ - start_bol = 156804; - start_pos = 156834; - end_pos = 156834 - } - ~body_loc:{ - start_bol = 156130; - start_pos = 156130; - end_pos = 156834 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 231) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 232) - ~description:(Some "%track_rt_show expression runtime passing") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 230), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION t1\n t1 test A begin\n \"line A\"\n t1 test A end\n\n BEGIN DEBUG SESSION t2\n t2 test B begin\n \"line B\"\n t2 test B end\n\n BEGIN DEBUG SESSION t3 "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 156637; - start_pos = 156641; - end_pos = 156833 - })) - ~node_loc:{ - start_bol = 156626; - start_pos = 156628; - end_pos = 156834 - }))])[@merlin.hide ]) - (fun () -> - ((fun - (_debug_runtime : (module Minidebug_runtime.Debug_runtime)) - -> - let module Debug_runtime = (val _debug_runtime) in - let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log_no_source ~message:"test A" - ~entry_id:__entry_id ~log_level:1 `Track; - (try - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "line A"); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3949 - ~entry_id:__entry_id - with - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3949 - ~entry_id:__entry_id; - raise e)))) - (Minidebug_runtime.debug_flushing ~global_prefix:"t1" ()); - ((fun - (_debug_runtime : (module Minidebug_runtime.Debug_runtime)) - -> - let module Debug_runtime = (val _debug_runtime) in - let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log_no_source ~message:"test B" - ~entry_id:__entry_id ~log_level:1 `Track; - (try - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "line B"); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3954 - ~entry_id:__entry_id - with - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3954 - ~entry_id:__entry_id; - raise e)))) - (Minidebug_runtime.debug_flushing ~global_prefix:"t2" ()); - ((fun - (_debug_runtime : (module Minidebug_runtime.Debug_runtime)) - -> - let module Debug_runtime = (val _debug_runtime) in - let __entry_id = Debug_runtime.get_entry_id () in - Debug_runtime.open_log_no_source ~message:"test C" - ~entry_id:__entry_id ~log_level:1 `Track; - (try - Debug_runtime.log_value_show ?descr:None - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%S") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - "line C"); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3959 - ~entry_id:__entry_id - with - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3959 - ~entry_id:__entry_id; - raise e)))) - (let open Minidebug_runtime in - forget_printbox @@ - (debug ~global_prefix:"t3" ~log_level:0 ())); - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 230)) - [@merlin.hide ])) -let () = - match Ppx_inline_test_lib.testing with - | `Not_testing -> () - | `Testing _ -> - let module Ppx_expect_test_block = - (Ppx_expect_runtime.Make_test_block)(Expect_test_config) in - Ppx_expect_test_block.run_suite - ~filename_rel_to_project_root:"test/test_expect_test.ml" - ~line_number:3977 - ~location:{ - start_bol = 156836; - start_pos = 156836; - end_pos = 159380 - } - ~trailing_loc:{ - start_bol = 159373; - start_pos = 159380; - end_pos = 159380 - } - ~body_loc:{ - start_bol = 156836; - start_pos = 156836; - end_pos = 159380 - } - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~expected_exn:None - ~trailing_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 234) - ~exn_test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 235) - ~description:(Some - "%debug_show tuples values_first_mode highlighted") - ~tags:[] ~inline_test_config:(module Inline_test_config) - ~expectations:(([((Ppx_expect_runtime.Expectation_id.of_int_exn 233), - (Ppx_expect_runtime.Test_node.Create.expect - ~formatting_flexibility:(Ppx_expect_runtime.Expect_node_formatting.Flexibility.Flexible_modulo - Ppx_expect_runtime.Expect_node_formatting.default) - ~located_payload:(Some - ({ - contents = - "\n BEGIN DEBUG SESSION\n \226\148\140\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130bar = 336\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3983:21\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130y = 8\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\148\226\148\128\"test/test_expect_test.ml\":3984:8\n 336\n \226\148\140\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130(r1, r2)\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3993:17\n \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130\226\148\130\n \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130 \226\148\130r1 = 339\226\148\130\n \226\148\130 \226\148\130 \226\148\148\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\148\226\148\128r2 = 109\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130baz = (339, 109)\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3988:21\n \226\148\156\226\148\128first = 7\n \226\148\156\226\148\128second = 42\n \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130(y, z)\226\148\130\n \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\156\226\148\128\"test/test_expect_test.ml\":3989:8\n \226\148\130 \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130\226\148\130\n \226\148\130 \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130 \226\148\130y = 8\226\148\130\n \226\148\130 \226\148\130 \226\148\148\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\130 \226\148\148\226\148\128z = 3\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130(a, b)\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\"test/test_expect_test.ml\":3990:8\n \226\148\148\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130\226\148\130\n \226\148\156\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\156\226\148\128\226\148\172\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\144\n \226\148\130 \226\148\130a = 8\226\148\130\n \226\148\130 \226\148\148\226\148\128\226\148\128\226\148\128\226\148\128\226\148\128\226\148\152\n \226\148\148\226\148\128b = 45\n 339\n 109\n "; - tag = - (T (Tag "") : - Ppx_expect_runtime.Delimiter.t) - }, - { - start_bol = 157616; - start_pos = 157620; - end_pos = 159379 - })) - ~node_loc:{ - start_bol = 157605; - start_pos = 157607; - end_pos = 159380 - }))])[@merlin.hide ]) - (fun () -> - let module Debug_runtime = (val - Minidebug_runtime.debug - ~highlight_terms:(let open Re in alt [str "339"; str "8"]) - ~values_first_mode:true ()) in - let bar ((first : int), (second : int)) : int= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3983 ~start_colnum:21 ~end_lnum:3985 - ~end_colnum:14 ~message:"bar" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let y : int = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3984 ~start_colnum:8 ~end_lnum:3984 - ~end_colnum:9 ~message:"y" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match first + 1 with - | y as __res -> - (((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3984 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3984 ~entry_id:__entry_id; - raise e)) in - second * y - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "bar") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt - "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3983 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3983 - ~entry_id:__entry_id; - raise e)) in - let () = print_endline @@ (Int.to_string @@ (bar (7, 42))) in - let baz ((first, second) : (int * int)) : (int * int)= - let __entry_id = Debug_runtime.get_entry_id () in - (); - ((Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3988 ~start_colnum:21 ~end_lnum:3991 - ~end_colnum:35 ~message:"baz" ~entry_id:__entry_id - ~log_level:1 `Debug; - Debug_runtime.log_value_show ?descr:(Some "first") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - first)); - Debug_runtime.log_value_show ?descr:(Some "second") - ~entry_id:__entry_id ~log_level:1 ~is_result:false - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf fmt "%d") - x)[@ocaml.warning "-39"][@ocaml.warning "-A"]) - second)); - (match let (y, z) : (int * int) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3989 ~start_colnum:8 ~end_lnum:3989 - ~end_colnum:14 ~message:"(y, z)" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match ((first + 1), 3) with - | (y, z) as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "y") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) y)); - Debug_runtime.log_value_show - ?descr:(Some "z") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) z)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3989 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3989 ~entry_id:__entry_id; - raise e)) in - let ((a : int), (b : int)) = - let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3990 ~start_colnum:8 ~end_lnum:3990 - ~end_colnum:28 ~message:"(a, b)" - ~entry_id:__entry_id ~log_level:1 `Debug; - (match ((first + 1), (second + 3)) with - | (a, b) as __res -> - ((((); - Debug_runtime.log_value_show - ?descr:(Some "a") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) a)); - Debug_runtime.log_value_show - ?descr:(Some "b") ~entry_id:__entry_id - ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime) - [@ocaml.warning "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf - "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning - "-A"]) b)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3990 ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" - ~start_lnum:3990 ~entry_id:__entry_id; - raise e)) in - (((second * y) + z), ((a * a) + b)) - with - | __res -> - (Debug_runtime.log_value_show ?descr:(Some "baz") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt (a0, a1) -> - Ppx_deriving_runtime.Format.fprintf fmt - "(@["; - ((Ppx_deriving_runtime.Format.fprintf - fmt "%d") a0; - Ppx_deriving_runtime.Format.fprintf fmt - ",@ "; - (Ppx_deriving_runtime.Format.fprintf - fmt "%d") a1); - Ppx_deriving_runtime.Format.fprintf fmt - "@])") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - __res); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3988 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3988 - ~entry_id:__entry_id; - raise e)) in - let (r1, r2) = - (let __entry_id = Debug_runtime.get_entry_id () in - (); - Debug_runtime.open_log ~fname:"test/test_expect_test.ml" - ~start_lnum:3993 ~start_colnum:17 ~end_lnum:3993 - ~end_colnum:23 ~message:"(r1, r2)" ~entry_id:__entry_id - ~log_level:1 `Debug; - (match baz (7, 42) with - | (r1, r2) as __res -> - ((((); - Debug_runtime.log_value_show ?descr:(Some "r1") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) - r1)); - Debug_runtime.log_value_show ?descr:(Some "r2") - ~entry_id:__entry_id ~log_level:1 ~is_result:true - (((let open! ((Ppx_deriving_runtime)[@ocaml.warning - "-A"]) in - fun x -> - Ppx_deriving_runtime.Format.asprintf "%a" - (fun fmt -> - Ppx_deriving_runtime.Format.fprintf - fmt "%d") x) - [@ocaml.warning "-39"][@ocaml.warning "-A"]) r2)); - Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3993 - ~entry_id:__entry_id; - __res) - | exception e -> - (Debug_runtime.close_log - ~fname:"test/test_expect_test.ml" ~start_lnum:3993 - ~entry_id:__entry_id; - raise e)) : (int * int)) in - let () = print_endline @@ (Int.to_string r1) in - let () = print_endline @@ (Int.to_string r2) in - ((Ppx_expect_test_block.run_test - ~test_id:(Ppx_expect_runtime.Expectation_id.of_int_exn 233)) - [@merlin.hide ])) -let () = Ppx_inline_test_lib.unset_lib "test_inline_tests" -let () = Ppx_expect_runtime.Current_file.unset () -File "_none_", line 1: -Warning 53 [misplaced-attribute]: the "ocaml.warning" attribute cannot appear in this context