From 6b377719c10d5ab3343fd5221f99a4a21008e25a Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Thu, 14 Mar 2024 08:26:58 +0100 Subject: Initial commit --- tests/importConf_test.ml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/importConf_test.ml (limited to 'tests/importConf_test.ml') diff --git a/tests/importConf_test.ml b/tests/importConf_test.ml new file mode 100644 index 0000000..c94eb91 --- /dev/null +++ b/tests/importConf_test.ml @@ -0,0 +1,23 @@ +open OUnit2 +open ConfLoader + +(** Test the dependencies extracted from the external named "source". + + Refer to the default configuration used in [ConfLoader] to see the + configuration. + *) +let test_get_dependencies_for_source = + "get_dependancies_for_table" >:: fun _ -> + let result = ImportConf.get_dependancies_for_table conf conf.source + and expected = [ external_other ] in + assert_equal ~printer:pp_externals expected result + +let test_get_dependencies_for_other = + "get_dependancies_for_table" >:: fun _ -> + let result = ImportConf.get_dependancies_for_table conf external_table_other + and expected = [ external_last ] in + assert_equal ~printer:pp_externals expected result + +let tests = + "importConf_test" + >::: [ test_get_dependencies_for_source; test_get_dependencies_for_other ] -- cgit v1.2.3