Branch: Tag:

2003-10-22

2003-10-22 18:08:54 by Martin Nilsson <mani@lysator.liu.se>

Test ADT.Struct->Varchars

Rev: lib/modules/ADT.pmod/testsuite.in:1.9

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   
248:    };    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