chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/ tests now use Automake's test infrastructure, and are split into
[disorder]
/
lib
/
t-cache.c
diff --git
a/lib/t-cache.c
b/lib/t-cache.c
index 02da8d66b51e00af906eced210f7ab30068121d3..3cdb4003401f8eb55b0bf9196b35f4b771456443 100644
(file)
--- a/
lib/t-cache.c
+++ b/
lib/t-cache.c
@@
-19,10
+19,10
@@
*/
#include "test.h"
*/
#include "test.h"
-void test_cache(void) {
+
static
void test_cache(void) {
const struct cache_type t1 = { 1 }, t2 = { 10 };
const char v11[] = "spong", v12[] = "wibble", v2[] = "blat";
const struct cache_type t1 = { 1 }, t2 = { 10 };
const char v11[] = "spong", v12[] = "wibble", v2[] = "blat";
- fprintf(stderr, "test_cache\n");
+
cache_put(&t1, "1_1", v11);
cache_put(&t1, "1_2", v12);
cache_put(&t2, "2", v2);
cache_put(&t1, "1_1", v11);
cache_put(&t1, "1_2", v12);
cache_put(&t2, "2", v2);
@@
-47,6
+47,8
@@
void test_cache(void) {
insist(cache_get(&t2, "2") == 0);
}
insist(cache_get(&t2, "2") == 0);
}
+TEST(cache);
+
/*
Local Variables:
c-basic-offset:2
/*
Local Variables:
c-basic-offset:2