From 67666139d0c4919a910779fb0af0c45a5f4050ab Mon Sep 17 00:00:00 2001 From: Leandro-rdz Date: Mon, 2 Dec 2024 11:08:30 +0100 Subject: [PATCH] Add some tests in ftest for tools --- src/ftest.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ftest.ml b/src/ftest.ml index 80489df..f7a986d 100644 --- a/src/ftest.ml +++ b/src/ftest.ml @@ -1,4 +1,5 @@ open Gfile +open Tools let () = @@ -27,9 +28,12 @@ let () = (* Open file *) let graph = from_file infile in + (* do some stuff on the graph, here add a new arc (if this work all functions in tools work) *) + let intgraph = add_arc (gmap graph (fun x -> (int_of_string x))) 0 4 42 in + let newgraph = gmap intgraph (fun x -> string_of_int(x)) in + (* Rewrite the graph that has been read. *) - let () = write_file outfile graph in - + let () = write_file outfile newgraph in ()