Check-in Number:
|
4160 | |
Date: |
2001-Jul-08 16:19:00 (local)
2001-Jul-08 14:19:00 (UTC) |
User: | simons |
Branch: | |
Comment: |
Added test whether xds_find_engine() can handle an empty array. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/xds/regression-tests/xds-find-engine.c 1.1 -> 1.2
--- xds-find-engine.c 2001/07/08 14:05:35 1.1
+++ xds-find-engine.c 2001/07/08 14:19:00 1.2
@@ -49,6 +49,19 @@
size_t pos;
size_t i;
+ /* Does xds_find_engine handle an empty array? */
+
+ if (xds_find_engine(engines, 0, "whatever", &pos))
+ {
+ printf("xds_find_engine() said 'whatever' would be in the array, but that's wrong.\n");
+ exit(1);
+ }
+ if (pos != 0)
+ {
+ printf("xds_find_engine() would insert 'whatever' at position %d, but 0 is correct.\n", pos);
+ exit(1);
+ }
+
/* Search for every single entry in the array and check the
results. */
|
|