package hardcaml_waveterm

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file expect_intf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
open Base
open Hardcaml_waveterm_kernel.Expert

module M
  (Data : Data.S)
  (Wave : Wave.M(Data).S)
  (Waves : Waves.M(Data)(Wave).S)
  (Render : Render.M(Data)(Wave)(Waves).S)
  (Waveform : Waveform.M(Data)(Wave)(Waves)(Render).S) =
struct
  module type S = sig
    (** Print waveforms in expect tests. This is very similar to [print] except it always
        outputs to [stdout] and will optionally serialize the waveform to disk for offline
        viewing.

        Waveforms are serialized if:

        - environment variable [EXPECT_TEST_WAVEFORM=1] and the [serialize_to] filename is
          set.
        - [EXPECT_TEST_WAVEFORM=digest] then the waveform file will be named by the digest
          of the waveform ([serialize_to] is not used regardless of if it is set or not).

        Simulation digests are shown by default.
    *)
    val expect
      : (?show_digest:bool -> ?serialize_to:string -> Waveform.t -> unit)
        Waveform.with_options
  end
end

module type Expect = sig
  module M = M

  module Make
    (Data : Data.S)
    (Wave : Wave.M(Data).S)
    (Waves : Waves.M(Data)(Wave).S)
    (Render : Render.M(Data)(Wave)(Waves).S)
    (Waveform : Waveform.M(Data)(Wave)(Waves)(Render).S) :
    M(Data)(Wave)(Waves)(Render)(Waveform).S
end