this repo has no description
at main 328 lines 12 kB view raw
1=== Node.js Directive Tests === 2 3node_directive_test.js: [INFO] init() 4Initializing findlib 5Loaded findlib_index findlib_index.json: 10 META files, 0 universes 6Parsed uri: ./lib/stdlib-shims/META 7Reading library: stdlib-shims 8Number of children: 0 9Parsed uri: ./lib/sexplib0/META 10Reading library: sexplib0 11Number of children: 0 12Parsed uri: ./lib/ppxlib/META 13Reading library: ppxlib 14Number of children: 11 15Found child: __private__ 16Reading library: ppxlib.__private__ 17Number of children: 1 18Found child: ppx_foo_deriver 19Reading library: ppxlib.__private__.ppx_foo_deriver 20Number of children: 0 21Found child: ast 22Reading library: ppxlib.ast 23Number of children: 0 24Found child: astlib 25Reading library: ppxlib.astlib 26Number of children: 0 27Found child: metaquot 28Reading library: ppxlib.metaquot 29Number of children: 0 30Found child: metaquot_lifters 31Reading library: ppxlib.metaquot_lifters 32Number of children: 0 33Found child: print_diff 34Reading library: ppxlib.print_diff 35Number of children: 0 36Found child: runner 37Reading library: ppxlib.runner 38Number of children: 0 39Found child: runner_as_ppx 40Reading library: ppxlib.runner_as_ppx 41Number of children: 0 42Found child: stdppx 43Reading library: ppxlib.stdppx 44Number of children: 0 45Found child: traverse 46Reading library: ppxlib.traverse 47Number of children: 0 48Found child: traverse_builtins 49Reading library: ppxlib.traverse_builtins 50Number of children: 0 51Parsed uri: ./lib/ppx_deriving/META 52Reading library: ppx_deriving 53Number of children: 12 54Found child: api 55Reading library: ppx_deriving.api 56Number of children: 0 57Found child: create 58Reading library: ppx_deriving.create 59Number of children: 0 60Found child: enum 61Reading library: ppx_deriving.enum 62Number of children: 0 63Found child: eq 64Reading library: ppx_deriving.eq 65Number of children: 0 66Found child: fold 67Reading library: ppx_deriving.fold 68Number of children: 0 69Found child: iter 70Reading library: ppx_deriving.iter 71Number of children: 0 72Found child: make 73Reading library: ppx_deriving.make 74Number of children: 0 75Found child: map 76Reading library: ppx_deriving.map 77Number of children: 0 78Found child: ord 79Reading library: ppx_deriving.ord 80Number of children: 0 81Found child: runtime 82Reading library: ppx_deriving.runtime 83Number of children: 0 84Found child: show 85Reading library: ppx_deriving.show 86Number of children: 0 87Found child: std 88Reading library: ppx_deriving.std 89Number of children: 0 90Parsed uri: ./lib/ppx_derivers/META 91Reading library: ppx_derivers 92Number of children: 0 93Parsed uri: ./lib/ocaml_intrinsics_kernel/META 94Reading library: ocaml_intrinsics_kernel 95Number of children: 0 96Parsed uri: ./lib/ocaml/stdlib/META 97Reading library: stdlib 98Number of children: 0 99Parsed uri: ./lib/ocaml/compiler-libs/META 100Reading library: compiler-libs 101Number of children: 5 102Found child: common 103Reading library: compiler-libs.common 104Number of children: 0 105Found child: bytecomp 106Reading library: compiler-libs.bytecomp 107Number of children: 0 108Found child: optcomp 109Reading library: compiler-libs.optcomp 110Number of children: 0 111Found child: toplevel 112Reading library: compiler-libs.toplevel 113Number of children: 0 114Found child: native-toplevel 115Reading library: compiler-libs.native-toplevel 116Number of children: 0 117Parsed uri: ./lib/ocaml-compiler-libs/META 118Reading library: ocaml-compiler-libs 119Number of children: 5 120Found child: bytecomp 121Reading library: ocaml-compiler-libs.bytecomp 122Number of children: 0 123Found child: common 124Reading library: ocaml-compiler-libs.common 125Number of children: 0 126Found child: optcomp 127Reading library: ocaml-compiler-libs.optcomp 128Number of children: 0 129Found child: shadow 130Reading library: ocaml-compiler-libs.shadow 131Number of children: 0 132Found child: toplevel 133Reading library: ocaml-compiler-libs.toplevel 134Number of children: 0 135Parsed uri: ./lib/base/META 136Reading library: base 137Number of children: 3 138Found child: base_internalhash_types 139Reading library: base.base_internalhash_types 140Number of children: 0 141Found child: md5 142Reading library: base.md5 143Number of children: 0 144Found child: shadow_stdlib 145Reading library: base.shadow_stdlib 146Number of children: 0 147node_directive_test.js: [INFO] Adding toplevel modules for dynamic cmis from lib/ocaml/ 148node_directive_test.js: [INFO] toplevel modules: CamlinternalFormat, CamlinternalLazy, CamlinternalFormatBasics, CamlinternalMod, Std_exit, Stdlib, CamlinternalOO 149node_directive_test.js: [INFO] init() finished 150node_directive_test.js: [INFO] setup() for env default... 151node_directive_test.js: [INFO] Fetching stdlib__Format.cmi 152 153node_directive_test.js: [INFO] Fetching stdlib__Sys.cmi 154 155error while evaluating #enable "pretty";; 156error while evaluating #disable "shortvar";; 157node_directive_test.js: [INFO] Setup complete 158node_directive_test.js: [INFO] setup() finished for env default 159--- Section 1: Basic Execution --- 160[PASS] basic_eval: # 1 + 2;; 161 - : int = 3 162[PASS] let_binding: # let x = 42;; 163 val x : int = 42 164 165--- Section 2: #show Directives --- 166[PASS] show_type_point: # #show point;; 167 type point = { x : float; y : float; } 168[PASS] show_val_origin: # #show origin;; 169 val origin : point 170[PASS] show_module: # #show MyMod;; 171 module MyMod : sig type t = int val zero : int end 172[PASS] show_exception: # #show My_error;; 173 exception My_error of string 174[PASS] show_type_list: # #show_type list;; 175 type 'a list = [] | (::) of 'a * 'a list 176node_directive_test.js: [INFO] Fetching stdlib__List.cmi 177 178[PASS] show_val_list_map: # #show_val List.map;; 179 val map : ('a -> 'b) -> 'a list -> 'b list 180[PASS] show_module_list: # #show_module List;; 181 module List : 182 sig 183 type 'a t = 'a list = [] | (::) of 'a * 'a list 184 val length : 'a list -> int 185 val compare_lengths : 'a list -> 'b list -> int 186 val compare_length_with : 'a list -> int -> int 187 val is_empty : 'a list -> bool 188 val cons : 'a -> 'a list -> 'a list 189 val singleton : 'a -> 'a list 190 val hd : 'a list -> 'a 191 val tl : 'a list -> 'a list 192 val nth : 'a list -> int -> 'a 193 val nth_opt : 'a list -> int -> 'a option 194 val rev : 'a list -> 'a list 195 val init : int -> (int -> 'a) -> 'a list 196 val append : 'a list -> 'a list -> 'a list 197 val rev_append : 'a list -> 'a list -> 'a list 198 val concat : 'a list list -> 'a list 199 val flatten : 'a list list -> 'a list 200 val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool 201 val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int 202 val iter : ('a -> unit) -> 'a list -> unit 203 val iteri : (int -> 'a -> unit) -> 'a list -> unit 204 val map : ('a -> 'b) -> 'a list -> 'b list 205 val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list 206 val rev_map : ('a -> 'b) -> 'a list -> 'b list 207 val filter_map : ('a -> 'b option) -> 'a list -> 'b list 208 val concat_map : ('a -> 'b list) -> 'a list -> 'b list 209 val fold_left_map : 210 ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list 211 val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc 212 val fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc 213 val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit 214 val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list 215 val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list 216 val fold_left2 : 217 ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a list -> 'b list -> 'acc 218 val fold_right2 : 219 ('a -> 'b -> 'acc -> 'acc) -> 'a list -> 'b list -> 'acc -> 'acc 220 val for_all : ('a -> bool) -> 'a list -> bool 221 val exists : ('a -> bool) -> 'a list -> bool 222 val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool 223 val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool 224 val mem : 'a -> 'a list -> bool 225 val memq : 'a -> 'a list -> bool 226 val find : ('a -> bool) -> 'a list -> 'a 227 val find_opt : ('a -> bool) -> 'a list -> 'a option 228 val find_index : ('a -> bool) -> 'a list -> int option 229 val find_map : ('a -> 'b option) -> 'a list -> 'b option 230 val find_mapi : (int -> 'a -> 'b option) -> 'a list -> 'b option 231 val filter : ('a -> bool) -> 'a list -> 'a list 232 val find_all : ('a -> bool) -> 'a list -> 'a list 233 val filteri : (int -> 'a -> bool) -> 'a list -> 'a list 234 val take : int -> 'a list -> 'a list 235 val drop : int -> 'a list -> 'a list 236 val take_while : ('a -> bool) -> 'a list -> 'a list 237 val drop_while : ('a -> bool) -> 'a list -> 'a list 238 val partition : ('a -> bool) -> 'a list -> 'a list * 'a list 239 val partition_map : 240 ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list 241 val assoc : 'a -> ('a * 'b) list -> 'b 242 val assoc_opt : 'a -> ('a * 'b) list -> 'b option 243 val assq : 'a -> ('a * 'b) list -> 'b 244 val assq_opt : 'a -> ('a * 'b) list -> 'b option 245 val mem_assoc : 'a -> ('a * 'b) list -> bool 246 val mem_assq : 'a -> ('a * 'b) list -> bool 247 val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list 248 val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list 249 val split : ('a * 'b) list -> 'a list * 'b list 250 val combine : 'a list -> 'b list -> ('a * 'b) list 251 val sort : ('a -> 'a -> int) -> 'a list -> 'a list 252 val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list 253 val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list 254 val sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list 255 val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list 256 val to_seq : 'a list -> 'a Seq.t 257 val of_seq : 'a Seq.t -> 'a list 258 end 259[PASS] show_exception_not_found: # #show_exception Not_found;; 260 exception Not_found 261 262--- Section 3: #print_depth and #print_length --- 263[PASS] print_depth_truncated: # nested;; 264 - : int list list list list = [[[...]]] 265[PASS] print_depth_full: # nested;; 266 - : int list list list list = [[[[1; 2; 3]]]] 267[PASS] print_length_truncated: # long_list;; 268 - : int list = [1; 2; ...] 269[PASS] print_length_full: # long_list;; 270 - : int list = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10] 271 272--- Section 4: #install_printer / #remove_printer --- 273[PASS] install_printer: # Red;; 274 - : color = <color:red> 275[PASS] remove_printer: # Red;; 276 - : color = Red 277 278--- Section 5: #warnings / #warn_error --- 279[PASS] warnings_disabled: # let _ = let unused = 1 in 2;; 280 - : int = 2 281Line 1, characters 12-19: 282Warning 26 [unused-var]: unused variable unused2. 283[PASS] warnings_enabled: # let _ = let unused2 = 1 in 2;; 284 - : int = 2 285 286Line 1, characters 12-19: 287Error (warning 26 [unused-var]): unused variable unused3. 288[FAIL] warn_error: # let _ = let unused3 = 1 in 2;; 289 290--- Section 6: #rectypes --- 291 292Line 1, characters 0-23: 293Error: The type abbreviation t is cyclic: 294 'a t = 'a t -> int, 295 'a t -> int contains 'a t 296[FAIL] rectypes_before: # type 'a t = 'a t -> int;; 297[PASS] rectypes_after: # type 'a u = 'a u -> int;; 298 type 'a u = 'a u -> int 299 300--- Section 7: #directory --- 301[PASS] directory_add: (no error) 302[PASS] directory_remove: (no error) 303 304--- Section 8: #help --- 305[PASS] help: # #help;; 306 General 307 #help 308 Prints a list of all available directives, with corresponding argume... 309 310--- Section 9: #labels / #principal --- 311[PASS] labels_true: (no error) 312[PASS] labels_false: (no error) 313[PASS] principal_true: (no error) 314[PASS] principal_false: (no error) 315 316--- Section 10: Error Cases --- 317[PASS] unknown_directive: # #unknown_directive;; 318 Unknown directive unknown_directive. 319[PASS] show_nonexistent: # #show nonexistent_value;; 320 Unknown element. 321 322--- Section 11: Classes --- 323[PASS] show_class: # #show_class counter;; 324 class counter : 325 object val mutable n : int method get : int method incr : unit end 326 327=== Results: 29/31 tests passed === 328FAILURE: Some tests failed.