Stefan pushed to branch master at Stefan / Typer
Commits: 3a47ced1 by Stefan Monnier at 2018-05-01T16:20:42Z Adjust to newer OCaml version
- - - - -
3 changed files:
- src/lexp.ml - tests/utest_lib.ml - tests/utest_main.ml
Changes:
===================================== src/lexp.ml ===================================== --- a/src/lexp.ml +++ b/src/lexp.ml @@ -1,6 +1,6 @@ (* lexp.ml --- Lambda-expressions: the core language.
-Copyright (C) 2011-2017 Free Software Foundation, Inc. +Copyright (C) 2011-2018 Free Software Foundation, Inc.
Author: Stefan Monnier monnier@iro.umontreal.ca Keywords: languages, lisp, dependent types. @@ -175,7 +175,7 @@ let metavar_lookup (id : meta_id) : metavar_info * try Hashtbl.find hc_table e * with Not_found -> Hashtbl.add hc_table e e; e *)
-module WHC = Tweak.Make (struct type t = lexp +module WHC = Weak.Make (struct type t = lexp (* Using (=) instead of `compare` results * in an *enormous* slowdown. Apparently * `compare` checks == before recursing
===================================== tests/utest_lib.ml ===================================== --- a/tests/utest_lib.ml +++ b/tests/utest_lib.ml @@ -3,7 +3,7 @@ * * --------------------------------------------------------------------------- * - * Copyright (C) 2011-2016 Free Software Foundation, Inc. + * Copyright (C) 2011-2016, 2018 Free Software Foundation, Inc. * * Author: Pierre Delaunay pierre.delaunay@hec.ca * Keywords: languages, lisp, dependent types. @@ -80,26 +80,28 @@ let set_verbose lvl =
let arg_defs = [ ("--verbose=", - Arg.Int set_verbose, " Set verbose level"); + Arg.Int set_verbose, " Set verbose level"); ("--samples=", - Arg.String (fun g -> _global_sample_dir := g), " Set sample directory"); -(* Allow users to select which test to run *) + Arg.String (fun g -> _global_sample_dir := g), " Set sample directory"); + (* Allow users to select which test to run *) ("--fsection=", - Arg.String (fun g -> _global_fsection := String.uppercase g), " Set test filter"); + Arg.String (fun g -> _global_fsection := String.uppercase_ascii g), + " Set test filter"); ("--ftitle=", - Arg.String (fun g -> _global_ftitle := String.uppercase g), " Set test filter"); -] + Arg.String (fun g -> _global_ftitle := String.uppercase_ascii g), + " Set test filter"); + ]
let must_run_section str = - if (String.length !_global_fsection) != 0 then( - let name = String.uppercase str in - if name = !_global_fsection then true else false) + if (String.length !_global_fsection) != 0 then + let name = String.uppercase_ascii str in + if name = !_global_fsection then true else false else true
let must_run_title str = - if (String.length !_global_ftitle) != 0 then( - let name = String.uppercase str in - if name = !_global_ftitle then true else false) + if (String.length !_global_ftitle) != 0 then + let name = String.uppercase_ascii str in + if name = !_global_ftitle then true else false else true
let parse_args () = Arg.parse arg_defs (fun s -> ()) ""
===================================== tests/utest_main.ml ===================================== --- a/tests/utest_main.ml +++ b/tests/utest_main.ml @@ -3,7 +3,7 @@ * * --------------------------------------------------------------------------- * - * Copyright (C) 2011-2016 Free Software Foundation, Inc. + * Copyright (C) 2011-2016, 2018 Free Software Foundation, Inc. * * Author: Pierre Delaunay pierre.delaunay@hec.ca * Keywords: languages, lisp, dependent types. @@ -43,19 +43,19 @@ let _global_filter = ref false
let arg_defs = [ ("--verbose=", - Arg.Int (fun g -> _global_verbose_lvl := g), " Set verbose level"); + Arg.Int (fun g -> _global_verbose_lvl := g), " Set verbose level"); ("--samples=", - Arg.String (fun g -> _global_sample_dir := g), " Set sample directory"); + Arg.String (fun g -> _global_sample_dir := g), " Set sample directory"); ("--tests=", - Arg.String (fun g -> _global_tests_dir := g), " Set tests directory"); + Arg.String (fun g -> _global_tests_dir := g), " Set tests directory"); (* Allow users to select which test to run *) ("--fsection=", - Arg.String (fun g -> _global_fsection := String.uppercase g; - _global_filter := true), " Set test filter"); + Arg.String (fun g -> _global_fsection := String.uppercase_ascii g; + _global_filter := true), " Set test filter"); ("--ftitle=", - Arg.String (fun g -> _global_ftitle := String.uppercase g; - _global_filter := true), " Set test filter"); -] + Arg.String (fun g -> _global_ftitle := String.uppercase_ascii g; + _global_filter := true), " Set test filter"); + ]
let verbose n = (n <= (!_global_verbose_lvl)) @@ -86,9 +86,9 @@ let print_file_name i n name pass = print_string reset
let must_run str = - if (!_global_filter) then( - let name = String.uppercase (cut_name str) in - if name = !_global_fsection then true else false) + if (!_global_filter) then + let name = String.uppercase_ascii (cut_name str) in + if name = !_global_fsection then true else false else true
(* search *_test.byte executable en run them
View it on GitLab: https://gitlab.com/monnier/typer/commit/3a47ced12982355439efa8304b6cd40f6186...
--- View it on GitLab: https://gitlab.com/monnier/typer/commit/3a47ced12982355439efa8304b6cd40f6186... You're receiving this email because of your account on gitlab.com.