Remove empty space
This commit is contained in:
parent
231cb8d631
commit
c613cc3449
3 changed files with 16 additions and 15 deletions
|
|
@ -7,7 +7,7 @@ module Flag = Flag_parsing_cpp
|
|||
(*****************************************************************************)
|
||||
(* Helpers *)
|
||||
(*****************************************************************************)
|
||||
let parse file =
|
||||
let parse file =
|
||||
Common.save_excursion Flag.error_recovery false (fun () ->
|
||||
Common.save_excursion Flag.show_parsing_error false (fun () ->
|
||||
Common.save_excursion Flag.verbose_parsing false (fun () ->
|
||||
|
|
@ -23,7 +23,7 @@ let unittest =
|
|||
(*-----------------------------------------------------------------------*)
|
||||
(* Lexing *)
|
||||
(*-----------------------------------------------------------------------*)
|
||||
(* todo:
|
||||
(* todo:
|
||||
* - make sure parse int correctly, and float, and that actually does
|
||||
* not return multiple tokens for 42.42
|
||||
* - ...
|
||||
|
|
@ -34,7 +34,7 @@ let unittest =
|
|||
(*-----------------------------------------------------------------------*)
|
||||
"regression files" >:: (fun () ->
|
||||
let dir = Filename.concat Config_pfff.path "/tests/cpp/parsing" in
|
||||
let files =
|
||||
let files =
|
||||
Common2.glob (spf "%s/*.cpp" dir) @ Common2.glob (spf "%s/*.h" dir) in
|
||||
files +> List.iter (fun file ->
|
||||
try
|
||||
|
|
@ -44,12 +44,12 @@ let unittest =
|
|||
assert_failure (spf "it should correctly parse %s" file)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
"rejecting bad code" >:: (fun () ->
|
||||
let dir = Filename.concat Config_pfff.path "/tests/cpp/parsing_errors" in
|
||||
let files = Common2.glob (spf "%s/*.cpp" dir) in
|
||||
files +> List.iter (fun file ->
|
||||
try
|
||||
try
|
||||
let _ast = parse file in
|
||||
assert_failure (spf "it should have thrown a Parse_error %s" file)
|
||||
with
|
||||
|
|
@ -58,11 +58,11 @@ let unittest =
|
|||
(Common.exn_to_s exn) file)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
(* parsing C files (and not C++ files) possibly containing C++ keywords *)
|
||||
"C regression files" >:: (fun () ->
|
||||
let dir = Filename.concat Config_pfff.path "/tests/c/parsing" in
|
||||
let files =
|
||||
let files =
|
||||
Common2.glob (spf "%s/*.c" dir)
|
||||
(* @ Common2.glob (spf "%s/*.h" dir) *) in
|
||||
files +> List.iter (fun file ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue