9 printf ("Condition " #cond " not true on line %d\n", __LINE__); \
17 struct qelem elements
[4];
21 memset (elements
, 0xff, sizeof (elements
));
22 insque (&elements
[0], NULL
);
23 remque (&elements
[0]);
24 insque (&elements
[0], NULL
);
25 insque (&elements
[2], &elements
[0]);
26 insque (&elements
[1], &elements
[0]);
27 insque (&elements
[3], &elements
[2]);
28 remque (&elements
[2]);
29 insque (&elements
[2], &elements
[0]);
30 CHECK (elements
[0].q_back
== NULL
);
31 CHECK (elements
[0].q_forw
== &elements
[2]);
32 CHECK (elements
[1].q_back
== &elements
[2]);
33 CHECK (elements
[1].q_forw
== &elements
[3]);
34 CHECK (elements
[2].q_back
== &elements
[0]);
35 CHECK (elements
[2].q_forw
== &elements
[1]);
36 CHECK (elements
[3].q_back
== &elements
[1]);
37 CHECK (elements
[3].q_forw
== NULL
);
40 memset (elements
, 0xff, sizeof (elements
));
41 elements
[0].q_back
= &elements
[0];
42 elements
[0].q_forw
= &elements
[0];
43 insque (&elements
[2], &elements
[0]);
44 insque (&elements
[1], &elements
[0]);
45 insque (&elements
[3], &elements
[2]);
46 remque (&elements
[2]);
47 insque (&elements
[2], &elements
[0]);
48 CHECK (elements
[0].q_back
== &elements
[3]);
49 CHECK (elements
[0].q_forw
== &elements
[2]);
50 CHECK (elements
[1].q_back
== &elements
[2]);
51 CHECK (elements
[1].q_forw
== &elements
[3]);
52 CHECK (elements
[2].q_back
== &elements
[0]);
53 CHECK (elements
[2].q_forw
== &elements
[1]);
54 CHECK (elements
[3].q_back
== &elements
[1]);
55 CHECK (elements
[3].q_forw
== &elements
[0]);
60 #define TEST_FUNCTION do_test ()
61 #include "../test-skeleton.c"