From c65f93c67cb51d7aa29f49933f1be5895e57b85c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 29 Oct 2014 22:16:40 +0100 Subject: [PATCH] Simplified tests --- ocaml/test_input.ml | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/ocaml/test_input.ml b/ocaml/test_input.ml index 7f200a92..f75222e3 100644 --- a/ocaml/test_input.ml +++ b/ocaml/test_input.ml @@ -35,7 +35,6 @@ let test_dets () = Ezfio.set_file "F2.ezfio" ; let b = Input.Determinants.read () in - (*print_endline (Input.Determinants.debug b);*) print_endline (Input.Determinants.to_string b); ;; @@ -71,37 +70,19 @@ let test_mo () = Ezfio.set_file "F2.ezfio" ; let b = Input.Mo_basis.read () in - print_endline (Input.Mo_basis.debug b); + print_endline (Input.Mo_basis.to_string b); ;; let test_nucl () = Ezfio.set_file "F2.ezfio" ; - let b = Input.Nuclei.read () - in - print_endline (Input.Nuclei.to_string b); -;; - -let test_nucl_read () = - let rst_input = Rst_string.of_string " -Molecule -======== - - -Nuclear coordinates in xyz format (Angstroms) :: - - 2 - - F 9 0.00000000 0.00000000 -0.70000000 - F 9 0.00000000 0.00000000 0.70000000 - - - -Electrons -========= -" in - let b = Input.Nuclei.of_rst rst_input - in + let b = Input.Nuclei.read () in + let rst = Input.Nuclei.to_rst b in + let new_b = Input.Nuclei.of_rst rst in print_endline (Input.Nuclei.to_string b); + if (b = new_b) then + print_endline "OK" + else + print_endline "Failed in rst" ;; (* @@ -115,5 +96,5 @@ test_hf ();; test_mo ();; test_nucl (); *) -test_nucl_read();; +test_nucl();;