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.8 2003/07/04 19:26:39 nilsson Exp $ + dnl $Id: testsuite.in,v 1.9 2003/10/22 18:08:54 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:241:   test_any([[    class Test {    inherit ADT.Struct;    Item a = Word(0x1234);    Item b = Drow(0x1234);    Item c = Long(0x12345678);    Item d = Gnol(0x12345678);    };    return (string)Test();   ]], "\22""44\22\22""4VxxV4\22"); + test_do([[ +  class Test { +  inherit ADT.Struct; +  Item a = Varchars(); +  Item b = Varchars(1,3); +  Item c = Chars(1); +  }; +  add_constant("Test",Test); + ]]) + test_eq( (string)Test("a\0b\0c"), "a\0b\0c" ) + test_eq( (string)Test("a\0b\0c\0"), "a\0b\0c" ) + test_eval_error( Test("a\0\0c") ) + test_eval_error( Test("a\0bbbb\0c") ) + test_eval_error( Test("a\0b\0") ) + test_eq( sizeof(Test("aa\0b\0c")), 6 )         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"),