diff options
Diffstat (limited to 'test/common.ml')
| -rw-r--r-- | test/common.ml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/common.ml b/test/common.ml index 7b486b4..f3fe83a 100644 --- a/test/common.ml +++ b/test/common.ml @@ -205,14 +205,16 @@ let provider_for : Model.content -> Int64.t -> string -> Value.value = (List.of_seq (Model.Content.fields content)) row field_name -(** Render a [(named, data)] pair as a single line, whatever the field type *) +(** Render a [(name, typ), data] triple as a single line, whatever the field + type *) let show_field : 'db 'ocaml. - ('db, 'ocaml, Model.target) Model.Types.t Model.Types.named -> + Model.Identifier.t -> + ('db, 'ocaml, Model.target) Model.Types.t -> 'ocaml -> string = - fun named data -> - let name = Model.Identifier.to_string (Model.Types.name named) in + fun field_name typ data -> + let name = Model.Identifier.to_string field_name in let show : type db ocaml. (db, ocaml, Model.target) Model.Types.t -> ocaml -> string = fun typ data -> @@ -235,7 +237,7 @@ let show_field : ^ String.concat "," (List.map Int64.to_string targets) ^ "]" in - show (Model.Types.typ named) data + show typ data (** Read a configuration from the standard input and run [f] with a fresh in-memory database created from it *) |
