~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Infrastructure: Switch testing over to Autotest.
[mLib]
/
struct
/
t
/
da-test.c
diff --git
a/struct/da-test.c
b/struct/t/da-test.c
similarity index 95%
rename from
struct/da-test.c
rename to
struct/t/da-test.c
index
38b6055
..
0f3e625
100644
(file)
--- a/
struct/da-test.c
+++ b/
struct/t/da-test.c
@@
-104,9
+104,15
@@
int main(void)
else
printf("%i\n", DA(&v)[i]);
} else if (strcmp(p, "first") == 0) {
else
printf("%i\n", DA(&v)[i]);
} else if (strcmp(p, "first") == 0) {
- printf("%i\n", DA_FIRST(&v));
+ if (DA_LEN(&v))
+ printf("%i\n", DA_FIRST(&v));
+ else
+ puts("*RANGE*");
} else if (strcmp(p, "last") == 0) {
} else if (strcmp(p, "last") == 0) {
- printf("%i\n", DA_LAST(&v));
+ if (DA_LEN(&v))
+ printf("%i\n", DA_LAST(&v));
+ else
+ puts("*RANGE*");
} else if (strcmp(p, "show") == 0) {
if (DA_LEN(&v) == 0)
puts("*EMPTY*");
} else if (strcmp(p, "show") == 0) {
if (DA_LEN(&v) == 0)
puts("*EMPTY*");