package ppx_expect
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
On This Page
  
  
  Cram like framework for OCaml
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
  
    
      v0.17.2.tar.gz
    
    
        
    
  
  
  
    
  
  
    
  
        md5=055c8c86665d158e0b03494a3e188f1c
    
    
  sha512=c6394522da7f1e03df5d2f62766aa8534c09a12efff7908cc1215b06959e6eeaa2cb85514cd5def1582db66455ed922024387f28b84b4412aed4879ea905c38a
    
    
  doc/ppx_expect.runtime/Ppx_expect_runtime/Make_test_block/index.html
Module Ppx_expect_runtime.Make_test_blockSource
Parameters
module C : Expect_test_config_types.SSignature
Read test output, passing it through the configured sanitization function but not checking for backtraces. Equivalent to [%expect.output].
Consuming read.
Given a test id:
- Look up the 
Test_node.twith that id - Perform a consuming read of current test output, performing sanitization and checking for backtraces
 - Compare the consumed output with the output expected by the associated 
Test_node.t - Record the test outcome in the associated 
Test_node.t - If the test failed, set the current 
Test_block'sfailref totrue(so that the test harness will be informed of a failure at the conclusion of thislet%expect_testblock) 
Source
val run_suite : 
  filename_rel_to_project_root:Base.string ->
  line_number:Base.int ->
  location:Ppx_expect_runtime__.Types.Compact_loc.t ->
  trailing_loc:Ppx_expect_runtime__.Types.Compact_loc.t ->
  body_loc:Ppx_expect_runtime__.Types.Compact_loc.t ->
  formatting_flexibility:
    Ppx_expect_runtime__.Types.Expect_node_formatting.Flexibility.t ->
  expected_exn:
    (Ppx_expect_runtime__.Output.Payload.t
     * Ppx_expect_runtime__.Types.Compact_loc.t)
      Base.option ->
  trailing_test_id:Ppx_expect_runtime__.Types.Expectation_id.t ->
  exn_test_id:Ppx_expect_runtime__.Types.Expectation_id.t ->
  description:Base.string Base.option ->
  tags:Base.string Base.list ->
  inline_test_config:Ppx_inline_test_lib.config ->
  expectations:
    (Ppx_expect_runtime__.Types.Expectation_id.t, Test_node.t)
      Base.List.Assoc.t ->
  (Base.unit -> Base.unit C.IO.t) ->
  Base.unitExecute a single let%expect_test block through Ppx_inline_test_lib.test.
- Assert that the test is defined in the currently-executing file.
 - Generate two implicit 
Test_node.ts representing trailing output (expectation that there is none) and uncaught exception (expectation that there is none ifexpected_exn = None, or else that the test raises withexpected_exn). - Add the explicit 
Test_node.ts inexpectations(those actually present in the test body), as well as the two implicitTest_node.ts described above, into the global table ofTest_node.ts. - Run the callback and the tests for trailing output and uncaught exceptions, accumulating the results of each reached "expectation" inside the corresponding 
Test_node.t. - After the callback finishes, if any of the expectations do not match, inform the inline testing harness that the test has "failed".
 
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
  On This Page