diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2012-06-17 21:15:12 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2012-06-17 21:15:12 +0000 |
| commit | 8df9466ada46e4b07990b9cb7e8b1cd61b96844a (patch) | |
| tree | 2cb652e5839bed672133ffa90e7ad477f55cfb6b /tests/test_addnewconn.c | |
| download | pica-pica-8df9466ada46e4b07990b9cb7e8b1cd61b96844a.tar.gz pica-pica-8df9466ada46e4b07990b9cb7e8b1cd61b96844a.zip | |
todo list update
git-svn-id: svn://localhost/project_picapica/trunk@128 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'tests/test_addnewconn.c')
| -rwxr-xr-x | tests/test_addnewconn.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/test_addnewconn.c b/tests/test_addnewconn.c new file mode 100755 index 0000000..a8acbfd --- /dev/null +++ b/tests/test_addnewconn.c @@ -0,0 +1,42 @@ +#include <stdio.h> + #include "../PICA_node.h" + +struct newconn* add_newconn(struct newconn *ncs,int *pos); + +struct newconn t1[64]; + + +int main() +{ +int tpos=0,i; +struct newconn *nc; + +printf(" t1=%X\n",t1); + +nc=add_newconn(t1,&tpos); +printf("1) nc=%X tpos=%i\n",nc,tpos); + +tpos=0; +t1[0].sck=1; + +nc=add_newconn(t1,&tpos); +printf("2) nc=%X tpos=%i\n",nc,tpos); + +tpos=64; +nc=add_newconn(t1,&tpos); +printf("3) nc=%X tpos=%i\n",nc,tpos); + +for (i=0;i<64;i++) +{ +t1[i].sck=65536; +t1[i].tmst=100+i; +} + +t1[63].tmst=5; + +nc=add_newconn(t1,&tpos); +printf("4) nc=%X tpos=%i\n",nc,tpos); + + +return 0; +} |
