pike.git / src / post_modules / CritBit / testsuite.in

version» Context lines:

pike.git/src/post_modules/CritBit/testsuite.in:110:    error("Value mismatch in order: (%O : %O) vs (%O : %O)\n", key, GET_SAMPLE()[key], key, GET_TREE()[key]);    mixed nth = GET_TREE()->nth(i)[0];    if (nth != key)    error("Value mismatch in nth(): (%O : %O) vs (%O : %O)\n", i, key, i, nth);    }       ]])    test_const_loop([[    void test_range_operator(int step) {    int i = (step < 0) ? sizeof(tree)-1 : 0; -  foreach (tree->_get_iterator(step); mixed key; mixed value) { +  foreach (get_iterator(tree, step); mixed key; mixed value) {    if (GET_SORTED_A()[i] != key)    error("Key mismatch in range iterate(): (%O : %O) vs (%O : %O)\n", i, GET_SORTED_A()[i], i, key);    if (GET_SAMPLE()[GET_SORTED_A()[i] ] != value)    error("Value mismatch in range iterate(): (%O : %O) vs (%O : %O)\n", i, GET_SAMPLE()[GET_SORTED_A()[i] ], i, value);    i+=step;    }       if (step > 0) test_range_operator(-step);    };       foreach (enumerate(40, 13, 1); ; int n) {    if (n) test_range_operator(n);    }    ]])    test_const_loop([[    void test_range_operator(int start, int stop, int step) {    int i = start;       if (step == 0) return;    -  foreach (tree->_get_iterator(step, a[start], a[stop]); mixed key; mixed value) { +  foreach (get_iterator(tree, step, a[start], a[stop]); mixed key; mixed value) {    if (GET_SORTED_A()[i] != key)    error("Key mismatch in range iterate(): (%O : %O) vs (%O : %O)\n", i, GET_SORTED_A()[i], i, key);    if (GET_SAMPLE()[GET_SORTED_A()[i] ] != value)    error("Value mismatch in range iterate(): (%O : %O) vs (%O : %O)\n", i, GET_SAMPLE()[GET_SORTED_A()[i] ], i, value);    i+=step;    }      #if constant(ADT.CritBit.Range)    object r = ADT.CritBit.Range(a[start], a[stop]);    object rs = ADT.CritBit.RangeSet(object_program(tree));