X-Git-Url: http://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/1be43e1299fc61538d62349ca012514b28f8734f..485bce717a659e363d3bb74bf2ff76f1cd3b0ff7:/testing.ml diff --git a/testing.ml b/testing.ml index 57518d9..a2a3d29 100644 --- a/testing.ml +++ b/testing.ml @@ -400,22 +400,6 @@ let test_parse_cocci file = let sp_of_file file iso = Parse_cocci.process file iso false (* TODO: Remove -let (rule_elem_of_string: string -> filename option -> Ast_cocci.rule_elem) = - fun s iso -> - begin - Common.write_file ("/tmp/__cocci.cocci") (s); - let (astcocci, _,_,_,_,_) = sp_of_file ("/tmp/__cocci.cocci") iso in - let stmt = - astcocci +> - List.hd +> (function (_,_,x) -> List.hd x) +> (function x -> - match Ast_cocci.unwrap x with - | Ast_cocci.CODE stmt_dots -> Ast_cocci.undots stmt_dots +> List.hd - | _ -> raise Not_found) - in - match Ast_cocci.unwrap stmt with - | Ast_cocci.Atomic(re) -> re - | _ -> failwith "only atomic patterns allowed" - end *) (*