Release coccinelle-0.2.3rc4
[bpt/coccinelle.git] / testing.mli
CommitLineData
5636bb2c 1(*
90aeb998
C
2 * Copyright 2010, INRIA, University of Copenhagen
3 * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
4 * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
9f8e26f4
C
5 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
6 * This file is part of Coccinelle.
7 *
8 * Coccinelle is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, according to version 2 of the License.
11 *
12 * Coccinelle is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * The authors reserve the right to distribute this or future versions of
21 * Coccinelle under other licenses.
22 *)
23
24
34e49164
C
25open Common
26
27(*****************************************************************************)
28(* work with tests/ *)
29(*****************************************************************************)
c3e37e97 30val testone : string (*prefix*) -> string (*test*) -> bool (*compare_expected*) -> unit
708f4980 31val testall : ?expected_score_file:string -> unit -> unit
34e49164
C
32
33(*****************************************************************************)
34(* works with tests-big/. The .res, .ok, .spatch_ok, .failed, .var *)
35(*****************************************************************************)
36val test_okfailed : filename (*cocci*) -> filename (*c*) list -> unit
37val test_regression_okfailed : unit -> unit
38
39
40
41(*****************************************************************************)
42(* the parameter is the result of Cocci.full_engine *)
43(*****************************************************************************)
ae4735db 44val compare_with_expected : (filename * filename option) list -> unit
34e49164
C
45
46
47(*****************************************************************************)
48(* to test/debug the coccinelle subsystems *)
49(*****************************************************************************)
50
ae4735db 51(* pad:
34e49164
C
52 * I moved the parsing_c/ subsystem testing in parsing_c/test_parsing_c.ml
53 * as I need it for other projects too.
54 *)
55
56val test_parse_cocci : filename -> unit
57
58(*****************************************************************************)
59(* to be called by ocaml toplevel, to test. *)
60(*****************************************************************************)
61
62val sp_of_file :
63 filename (* coccifile *) -> filename option (* isofile *) ->
faf9a90c
C
64 Ast_cocci.metavar list list * Ast_cocci.rule list *
65 Ast_cocci.meta_name list list list *
34e49164 66 Ast_cocci.meta_name list list list *
978fd7e5
C
67 (Ast_cocci.meta_name list list list (*used after list*) *
68 (*fresh used after list*)
69 Ast_cocci.meta_name list list list *
70 (*fresh used after list seeds*)
71 Ast_cocci.meta_name list list list) *
72 Ast_cocci.meta_name list list list *
90aeb998 73 string list option *
7f004419 74 string list option
34e49164
C
75
76(* TODO: Remove
77val rule_elem_of_string : string -> filename option -> Ast_cocci.rule_elem
78*)
79
80(*
81val flows_of_ast : Ast_c.program -> Control_flow_c.cflow list
82val print_flow : Control_flow_c.cflow -> unit
83
84val ctls_of_ast :
85 Ast_cocci.rule list ->
86 Ast_cocci.meta_name list list list ->
87 (Lib_engine.ctlcocci *
88 ((Lib_engine.predicate * Ast_cocci.meta_name Ast_ctl.modif)
89 list list))
90 list list
91
92
93val one_flow : Control_flow_c.cflow list -> Control_flow_c.cflow
94val one_ctl : Lib_engine.ctlcocci list list -> Lib_engine.ctlcocci
95*)