From 0dcc905f2fdc89f3be834c670a5bcf42386eb663 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 26 Dec 2023 11:21:59 -0600 Subject: Update docs --- lib/ast_types.ml | 5 +++-- lib/fixture.ml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ast_types.ml b/lib/ast_types.ml index 7638d3b..6996435 100644 --- a/lib/ast_types.ml +++ b/lib/ast_types.ml @@ -13,11 +13,12 @@ type ast_row = [@@deriving show, eq] type ast_table = +(** In hindsight, this could've been represented as a list of tables instead using separated list command + + TODO: Rewrite this to use a list of tables instead of a tree *) | Table of string * int * ast_row * ast_table | End [@@deriving show, eq] -(** In hindsight, this could've been represented as a list of tables instead using separated list command - TODO: Rewrite this to use a list of tables instead of a tree *) let rec print_row = function | Uuidv4 (s, r) -> diff --git a/lib/fixture.ml b/lib/fixture.ml index d28d4b3..94c39a9 100644 --- a/lib/fixture.ml +++ b/lib/fixture.ml @@ -135,6 +135,8 @@ let json_of_generated_fixtures fixtures = "[" ^ String.concat ", " (List.map json_of_row rows) ^ "]" +(* TODO: Should export not only as strings *) + let%test "json_of_generated_fixtures" = let result = [ [ "id"; "name" ]; [ "1234"; "John" ] ] |> json_of_generated_fixtures in result = "[{\"id\": \"1234\", \"name\": \"John\"}]" -- cgit v1.2.3