function testBinaryInsertRemove_DefaultComparator() {
  var makeChecker = function(array, fn) {
    return function(value, expectResult, expectArray) {
      var result = fn(array, value);
      assertEquals(expectResult, result);
      assertArrayEquals(expectArray, array);
    }
  };

  var a = [];
  var check = makeChecker(a, lf.structs.array.binaryInsert);
  check(3, true, [3]);
  check(3, false, [3]);
  check(1, true, [1, 3]);
  check(5, true, [1, 3, 5]);
  check(2, true, [1, 2, 3, 5]);
  check(2, false, [1, 2, 3, 5]);

  check = makeChecker(a, lf.structs.array.binaryRemove);
  check(0, false, [1, 2, 3, 5]);
  check(3, true, [1, 2, 5]);
  check(1, true, [2, 5]);
  check(5, true, [2]);
  check(2, true, []);
  check(2, false, []);
}
Tests copied from Closure library's array_test.js.