From 529b9132d881a7b5dcea984614462e9be0011d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hinderer?= Date: Wed, 5 Jun 2019 14:02:16 +0200 Subject: [PATCH] ocamltest: rename action_name into name in the Actions module. --- ocamltest/actions.ml | 2 +- ocamltest/actions.mli | 2 +- ocamltest/main.ml | 2 +- ocamltest/options.ml | 2 +- ocamltest/tests.ml | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ocamltest/actions.ml b/ocamltest/actions.ml index e96143713..ef0cee2fd 100644 --- a/ocamltest/actions.ml +++ b/ocamltest/actions.ml @@ -23,7 +23,7 @@ type t = { mutable hook : code option } -let action_name a = a.name +let name a = a.name let make n c = { name = n; body = c; hook = None } diff --git a/ocamltest/actions.mli b/ocamltest/actions.mli index 941fc477d..9735af27d 100644 --- a/ocamltest/actions.mli +++ b/ocamltest/actions.mli @@ -19,7 +19,7 @@ type code = out_channel -> Environments.t -> Result.t * Environments.t type t -val action_name : t -> string +val name : t -> string val update : t -> code -> t diff --git a/ocamltest/main.ml b/ocamltest/main.ml index cfe38d071..85d06d0bb 100644 --- a/ocamltest/main.ml +++ b/ocamltest/main.ml @@ -121,7 +121,7 @@ let test_file test_filename = let used_tests = tests_in_trees test_trees in let used_actions = actions_in_tests used_tests in let action_names = - let f act names = String.Set.add (Actions.action_name act) names in + let f act names = String.Set.add (Actions.name act) names in Actions.ActionSet.fold f used_actions String.Set.empty in let test_dirname = Filename.dirname test_filename in let test_basename = Filename.basename test_filename in diff --git a/ocamltest/options.ml b/ocamltest/options.ml index 1547735cd..627be8eca 100644 --- a/ocamltest/options.ml +++ b/ocamltest/options.ml @@ -21,7 +21,7 @@ let show_objects title string_of_object objects = List.iter print_object objects; exit 0 -let string_of_action = Actions.action_name +let string_of_action = Actions.name let string_of_test test = if test.Tests.test_run_by_default diff --git a/ocamltest/tests.ml b/ocamltest/tests.ml index f360600e5..7e86bbf79 100644 --- a/ocamltest/tests.ml +++ b/ocamltest/tests.ml @@ -43,7 +43,7 @@ let lookup name = let test_of_action action = { - test_name = Actions.action_name action; + test_name = Actions.name action; test_run_by_default = false; test_actions = [action] } @@ -55,10 +55,10 @@ let run_actions log testenv actions = | action::remaining_actions -> begin Printf.fprintf log "Running action %d/%d (%s)\n%!" - action_number total (Actions.action_name action); + action_number total (Actions.name action); let (result, env') = Actions.run log env action in Printf.fprintf log "Action %d/%d (%s) %s\n%!" - action_number total (Actions.action_name action) + action_number total (Actions.name action) (Result.string_of_result result); if Result.is_pass result then run_actions_aux (action_number+1) env' remaining_actions