76719c2002-08-04Martin Nilsson test_true([["$Id: testsuite.in,v 1.3 2002/08/04 20:00:54 nilsson Exp $"]]);
f0a91f2002-08-03Martin Nilsson  dnl ADT.Stack
79f9532002-08-02Martin Nilsson  test_any([[ object s = ADT.Stack(); s->push(1); return s->pop(); ]], 1)
76719c2002-08-04Martin Nilsson test_eval_error(return ADT.Stack()->pop())
79f9532002-08-02Martin Nilsson test_any([[ object s = ADT.Stack();
76719c2002-08-04Martin Nilsson  for(int i; i<1000; i++) s->push(i); for(int i; i<1000; i++) s->pop(); for(int i; i<1000; i++) s->push(i); return s->pop(); ]], 999) test_equal_any([[ object s = ADT.Stack();
79f9532002-08-02Martin Nilsson  s->push(2); s->push(3); s->push(4);
76719c2002-08-04Martin Nilsson  s->pop(); return s->pop(2); ]], ({2,3}) )
79f9532002-08-02Martin Nilsson  test_any([[ object s = ADT.Stack(); s->push(5); return s->top(); ]], 5)
f0a91f2002-08-03Martin Nilsson 
76719c2002-08-04Martin Nilsson test_eval_error(return ADT.Stack()->top()) test_any([[ object s = ADT.Stack(); for(int i; i<1000; i++) s->push(i); for(int i; i<1000; i++) s->quick_pop(); for(int i; i<1000; i++) s->push(i); return sizeof(s); ]], 1000) test_any([[ object s = ADT.Stack(); for(int i; i<1000; i++) s->push(i); return sizeof(s); ]], 1000) test_any([[ object s = ADT.Stack(); s->push(3); s->reset(); return sizeof(s); ]], 0) test_any([[ object s = ADT.Stack(); s->set_stack( "1234"/1 ); s->push("5"); return s->pop()+sizeof(s); ]], "54") test_any([[ object s = ADT.Stack(); s->push("a"); s->push("b"); return values(s)*","; ]], [["a,b"]]) test_any([[ object s = ADT.Stack(); s->set_stack( "1234"/1 ); object t = ADT.Stack(); t->push("5"); return values(s+t)*""; ]], "12345")
f0a91f2002-08-03Martin Nilsson  dnl ADT.Table test_true(ADT.Table.table( ({ ({ "a", "b", 42 }), ({ "c", "b", 41 }), ({ "a", "a", 76 }) }), ({ "X", "Y", "z" }))->select("x", 2)->sum("Z")->distinct(0)->rsort("X") ->rename(0, "fOo")->sort("foO")->cast("array"), ({ ({ "a", 118 }), ({ "c", 41 }) }))