Sha256: cc1dfcc7b70f058c3c7f9619729551b90c1d782bb522d7e5a382dac4531951c6

Contents?: true

Size: 780 Bytes

Versions: 219

Compression:

Stored size: 780 Bytes

Contents

open Core
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

219 entries across 219 versions & 1 rubygems

Version Path
trackler-2.2.1.38 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.37 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.36 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.35 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.34 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.33 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.32 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.31 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.30 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.29 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.28 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.27 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.26 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.25 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.24 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.23 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.22 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.21 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.20 tracks/ocaml/tools/test-generator/test/utils_test.ml
trackler-2.2.1.19 tracks/ocaml/tools/test-generator/test/utils_test.ml