Commit 44302ad3 authored by Patrick Baudin's avatar Patrick Baudin
Browse files

Merge branch 'feature/pb/removing-tests/dynamic-plugin' into 'master'

[tests] removing unused tests/dynamic_plugin directory

See merge request frama-c/frama-c!2901
parents f6ccfe17 b922b3fb
......@@ -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)
......
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
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
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment