mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Added more thorough structure handling tests and removed some old ones.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16418 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
794ed2711b
commit
524250e8c1
7 changed files with 74 additions and 572 deletions
|
@ -244,20 +244,24 @@
|
|||
|
||||
- (foo) sendStruct: (foo)f
|
||||
{
|
||||
foo f2 = {1, "horse", 987654};
|
||||
printf("(%s) got i=%d s=%s l=%lu", sel_get_name(_cmd), f.i, f.s, f.l);
|
||||
foo f2 = {'A', 123.456, 1, "horse", 987654};
|
||||
printf("(%s) got c='%c', d=%g, i=%d, s=%s, l=%lu",
|
||||
sel_get_name(_cmd), f.c, f.d, f.i, f.s, f.l);
|
||||
fflush(stdout);
|
||||
printf(" returning i=%d s=%s l=%lu\n", f2.i, f2.s, f2.l);
|
||||
printf(" returning c='%c', d=%g, i=%d, s=%s, l=%lu\n",
|
||||
f2.c, f2.d, f2.i, f2.s, f2.l);
|
||||
fflush(stdout);
|
||||
return f2;
|
||||
}
|
||||
|
||||
- (void) getStruct: (foo *)f
|
||||
{
|
||||
foo f2 = {1, "horse", 987654};
|
||||
printf("(%s) got i=%d s=%s l=%lu,", sel_get_name(_cmd), f->i, f->s, f->l);
|
||||
foo f2 = {'A', 123.456, 1, "horse", 987654};
|
||||
printf("(%s) got c='%c', d=%g, i=%d, s=%s, l=%lu",
|
||||
sel_get_name(_cmd), f->c, f->d, f->i, f->s, f->l);
|
||||
fflush(stdout);
|
||||
printf(" returning i=%d s=%s l=%lu\n", f2.i, f2.s, f2.l);
|
||||
printf(" returning c='%c', d=%g, i=%d, s=%s, l=%lu\n",
|
||||
f2.c, f2.d, f2.i, f2.s, f2.l);
|
||||
fflush(stdout);
|
||||
*f = f2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue