From b922b3fbbfbcd92ae39efa249bab6b88e6beb4d1 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Fri, 16 Oct 2020 09:08:37 +0200 Subject: [PATCH] [tests] removing unused tests/dynamic_plugin directory --- share/Makefile.config.in | 2 +- tests/dynamic_plugin/apply.ml | 32 --------------------------- tests/dynamic_plugin/register_mod1.ml | 13 ----------- tests/dynamic_plugin/register_mod2.ml | 18 --------------- 4 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 tests/dynamic_plugin/apply.ml delete mode 100644 tests/dynamic_plugin/register_mod1.ml delete mode 100644 tests/dynamic_plugin/register_mod2.ml diff --git a/share/Makefile.config.in b/share/Makefile.config.in index 6f266c9ff6d..ab0d6b1f7fd 100644 --- a/share/Makefile.config.in +++ b/share/Makefile.config.in @@ -159,7 +159,7 @@ HAVE_BUILTIN_VA_LIST ?=@HAVE_BUILTIN_VA_LIST@ # test directories for ptests configuration # Non-plugin test directories containing some ML files to compile TEST_DIRS_AS_PLUGIN:=\ - dynamic dynamic_plugin journal saveload spec misc syntax cil \ + dynamic journal saveload spec misc syntax cil \ pretty_printing builtins libc value ifeq ($(HAS_PYTHON36),yes) diff --git a/tests/dynamic_plugin/apply.ml b/tests/dynamic_plugin/apply.ml deleted file mode 100644 index b0fe38a0def..00000000000 --- a/tests/dynamic_plugin/apply.ml +++ /dev/null @@ -1,32 +0,0 @@ -open Datatype - -module Param = - Plugin.Register - (struct - let name = "apply" - let shortname = "apply" - let help = "testing purpose" - end) - -module Test = - Param.False - (struct - let option_name = "-dynamic-test" - let help = "print dynamic test" - end) - -let main () = - if Dynamic.Parameter.Bool.get "-dynamic-test" () then begin - ignore (Dynamic.get ~plugin:"Register_mod2" "g_test" (func int int) 41); - try - Dynamic.get ~plugin:"Register_mod2" "g_test" - (func int (func (list char) (func (pair string float) unit))) - 42 ['a'] ("r",6.8) - with Dynamic.Incompatible_type s -> - Param.feedback "%s" s; - try Dynamic.get ~plugin:"Register_mod2" "unknown" (func unit unit) () - with Dynamic.Unbound_value s -> - Param.feedback "value %S not registered" s - end - -let () = Db.Main.extend main diff --git a/tests/dynamic_plugin/register_mod1.ml b/tests/dynamic_plugin/register_mod1.ml deleted file mode 100644 index fbd56ffd670..00000000000 --- a/tests/dynamic_plugin/register_mod1.ml +++ /dev/null @@ -1,13 +0,0 @@ -module L = List -open Datatype -module List = L - -(* Test with a mutual recursive function *) -let f_test i j= - Format.printf "Use f_test %d %d@." i j; - if i = 0 then j - else Dynamic.get ~plugin:"Register_mod2" "g_test" (func int int) (j-1) - -let __ : int = - Dynamic.register ~plugin:"Register_mod1" "f_test" ~journalize:false - (func int (func int int)) f_test 3 4 diff --git a/tests/dynamic_plugin/register_mod2.ml b/tests/dynamic_plugin/register_mod2.ml deleted file mode 100644 index fbe442a3e35..00000000000 --- a/tests/dynamic_plugin/register_mod2.ml +++ /dev/null @@ -1,18 +0,0 @@ -module L = List -open Datatype -module List = L - -(* Test with a mutual recursive function *) -let g_test j= - Format.printf "Use g_test %d@." j; - if j mod 3 = 0 then j - else - Dynamic.get ~plugin:"Register_mod1" "f_test" - (func int (func int int)) - (j-1) - j - -let __ : int -> int = - Dynamic.register ~journalize:false ~plugin:"Register_mod2" "g_test" - (func int int) - g_test -- GitLab