Debian Codegraph @

otherlibs/configurator/test/blackbox-tests/configurator.t/import-define/run.ml

raw symbols SCIP
1 module Configurator = Configurator.V1
2
3 let () =
4 let module C_define = Configurator.C_define in
5 Configurator.main ~name:"c_test" (fun t ->
6 C_define.import t
7 ~prelude:"#define CONFIGURATOR_TESTING \"foobar\"\n\
8 #define CONFIGURATOR_NEG_INT -127\n"
9 ~includes:["caml/config.h"]
10 [ "CAML_CONFIG_H", C_define.Type.Switch
11 ; "Page_log", C_define.Type.Int
12 ; "CONFIGURATOR_TESTING", C_define.Type.String
13 ; "CONFIGURATOR_NEG_INT", C_define.Type.Int
14 ; "sizeof(char)", C_define.Type.Int
15 ]
16 |> List.iter (fun (n, v) ->
17 Printf.printf "%s=%s\n"
18 n (match v with
19 | C_define.Value.String s -> s
20 | Int i -> string_of_int i
21 | Switch b -> string_of_bool b
22 )
23 )
24 )