1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#include"seqlist.h"
void testseqlist() { SL s; seqlistinit(&s); seqlistpushback(&s, 1); seqlistpushback(&s, 2); seqlistpushback(&s, 3); seqlistpushback(&s, 4); seqlistpushback(&s, 5); seqlistpushback(&s, 6); seqlistpushback(&s, 7); seqlistpushback(&s, 8); seqlistpushback(&s, 9); seqlistpushback(&s, 10); seqlistpushback(&s, 11); seqlistpushfront(&s, 0); seqlistpushfront(&s, -1); seqlistpopfront(&s); seqlistpopback(&s); seqlistinsert(&s, 0, 20); seqlisterase(&s, 0); seqlistprint(&s); seqlistdestroy(&s);
} int main() { testseqlist(); return 0; }
|