pike.git / lib / modules / ADT.pmod / testsuite.in

version» Context lines:

pike.git/lib/modules/ADT.pmod/testsuite.in:1: - dnl $Id: testsuite.in,v 1.4 2002/10/19 13:43:05 nilsson Exp $ + dnl $Id: testsuite.in,v 1.5 2002/10/19 14:21:35 nilsson Exp $      dnl - ADT.History      test_eq(sizeof(ADT.History(2)),0)      test_do(add_constant("adth", ADT.History(2)))   test_eq(adth->get_maxsize(),2)   test_any([[    adth->push(17);    return sizeof(adth);
pike.git/lib/modules/ADT.pmod/testsuite.in:35:   test_eval_error(return adth[-3])   test_do( adth->push(20); adth->push(21); adth->push(22); )   test_eq(adth[3],19)   test_eq(adth[6],22)   test_do( adth->flush() )   test_eq(adth->get_latest_entry_num(),6)   test_eq(adth->get_first_entry_num(),0)   test_do( adth->set_maxsize(0) )   test_do( adth->push(23) )   test_eq(sizeof(adth),0) + test_do( adth->set_maxsize(2) ) + test_eq(adth->query_no_adjacent_duplicates(), 0) + test_do( adth->set_no_adjacent_duplicates(1), 0) + test_do( adth->push(24) ) + test_do( adth->push(25) ) + test_do( adth->push(25) ) + test_do( adth->push(25) ) + test_eq(adth[-2],24) + test_do( adth->set_no_adjacent_duplicates(0), 0) + test_do( adth->push(26) ) + test_do( adth->push(26) ) + test_eq(adth[-2],26) + test_do( adth[-1]=27 ) + test_equal(indices(adth),[[ ({9,10}) ]]) + test_equal(values(adth),[[ ({26,27}) ]])   test_do(add_constant("adth"))       -  +    dnl - ADT.Stack      test_any([[    object s = ADT.Stack();    s->push(1);    return s->pop();   ]], 1)      test_eval_error(return ADT.Stack()->pop())