From 8e012f4804ecf1665819e761283120a3c0e73643 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 17 Jan 2025 20:48:43 +0100 Subject: Switched from OUnit to alcotest --- lib/configuration/dune | 7 +++++-- lib/configuration/importConf.ml | 6 ------ lib/configuration/importConf.mli | 4 ---- lib/configuration/syntax.ml | 5 +++-- 4 files changed, 8 insertions(+), 14 deletions(-) (limited to 'lib/configuration') diff --git a/lib/configuration/dune b/lib/configuration/dune index c29ba49..74ace87 100755 --- a/lib/configuration/dune +++ b/lib/configuration/dune @@ -11,9 +11,12 @@ importExpression importErrors ) + (preprocess (pps + ppx_deriving.ord + ppx_deriving.show + ppx_deriving.eq + )) (foreign_stubs (language c) (names locale)) - -(preprocess (pps ppx_deriving.ord)) ) (rule diff --git a/lib/configuration/importConf.ml b/lib/configuration/importConf.ml index 47f4ea4..2f56bd6 100644 --- a/lib/configuration/importConf.ml +++ b/lib/configuration/importConf.ml @@ -72,11 +72,5 @@ let get_dependancies_for_table : Syntax.t -> Table.t -> Syntax.Extern.t list = | Some v -> String.equal v source.name | None -> is_root)) -let print_path_expression t = ImportExpression.Repr.repr Path.repr t - -let print_extern t = - let toml = Syntax.Extern.toml_of_extern t in - Otoml.Printer.to_string toml - let expression_from_string s = Read_conf.ExpressionParser.of_string Read_conf.ExpressionParser.path s diff --git a/lib/configuration/importConf.mli b/lib/configuration/importConf.mli index c88b0f1..9ddc40c 100644 --- a/lib/configuration/importConf.mli +++ b/lib/configuration/importConf.mli @@ -14,9 +14,5 @@ val get_table_for_name : Syntax.t -> string option -> Table.t val get_dependancies_for_table : Syntax.t -> Table.t -> Syntax.Extern.t list (** Get all the externals refered by the source *) -val print_path_expression : Path.t ImportExpression.T.t -> string - val expression_from_string : string -> (Path.t ImportExpression.T.t, string) result - -val print_extern : Syntax.Extern.t -> string diff --git a/lib/configuration/syntax.ml b/lib/configuration/syntax.ml index 253720e..ee47277 100644 --- a/lib/configuration/syntax.ml +++ b/lib/configuration/syntax.ml @@ -21,6 +21,7 @@ module Extern = struct allow_missing : bool; match_rule : string option; } + [@@deriving show, eq] (** Describe a relation beteween two tables *) let toml_of_extern extern = @@ -28,7 +29,7 @@ module Extern = struct [ ( "intern_key", Otoml.string - @@ ImportExpression.Repr.repr ~top:true Path.repr extern.intern_key ); + @@ ImportExpression.Repr.repr ~top:true Path.show extern.intern_key ); ( "extern_key", Otoml.string @@ ImportExpression.Repr.repr ~top:true @@ -67,7 +68,7 @@ let repr t = let repr_expression_list l = Otoml.array (List.map l ~f:(fun v -> - Otoml.string (ImportExpression.Repr.repr ~top:true Path.repr v))) + Otoml.string (ImportExpression.Repr.repr ~top:true Path.show v))) in let sheet = -- cgit v1.2.3