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