Sha256: e8554a55ff3b4a71de6201e0404af644d3f7cd7e049927aaa138259c3f9a0831
Contents?: true
Size: 784 Bytes
Versions: 158
Compression:
Stored size: 784 Bytes
Contents
open Core.Std open OUnit2 open Codegen open Utils let utils_tests = [ "array findi is None if nothing in array matches predicate" >::(fun ctxt -> let found = find_arrayi [|"1";"123";"12345";"12"|] ~f:(fun x -> String.length x = 8) ~start:0 in assert_equal None found ); "array findi is None if nothing in array matches predicate after start" >::(fun ctxt -> let found = find_arrayi [|"1";"123";"12345";"12"|] ~f:(fun x -> String.length x = 1) ~start:1 in assert_equal None found ); "array findi is Some including index and value something matches predicate after start" >::(fun ctxt -> let found = find_arrayi [|"1";"123";"12345";"12"|] ~f:(fun x -> String.length x = 5) ~start:1 in assert_equal (Some (2, "12345")) found ); ]
Version data entries
158 entries across 158 versions & 1 rubygems