X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flibpspp%2Fhmap-test.c;h=64511b7bbf1d1c7dafb79857fc811b014d6e9af2;hb=1c0197f20c1de1a1443c815fbd1ce4bfac6600cc;hp=4e072c94f2533ed9ae1f85c707216aebf9ef49d6;hpb=bd17d2af982332ee1791998361b1ac6731fe14fa;p=pspp-builds.git diff --git a/tests/libpspp/hmap-test.c b/tests/libpspp/hmap-test.c index 4e072c94..64511b7b 100644 --- a/tests/libpspp/hmap-test.c +++ b/tests/libpspp/hmap-test.c @@ -342,6 +342,7 @@ check_hmap (struct hmap *hmap, const int data[], size_t cnt, size_t i, j; int *order; + check (hmap_is_empty (hmap) == (cnt == 0)); check (hmap_count (hmap) == cnt); check (cnt <= hmap_capacity (hmap)); @@ -378,7 +379,6 @@ check_hmap (struct hmap *hmap, const int data[], size_t cnt, for (p = hmap_first (hmap), i = 0; i < cnt; p = hmap_next (hmap, p), i++) { struct element *e = hmap_node_to_element (p); - size_t j; check (hmap_node_hash (&e->node) == hash (e->data)); for (j = 0; j < left; j++) @@ -1000,5 +1000,12 @@ main (void) putchar ('\n'); +#if __GNUC__ == 4 && __GNUC_MINOR__ == 3 + /* We skipped some of the tests, so return a value that + Automake will interpret as "skipped", instead of one that + means success. */ + return 77; +#else return 0; +#endif }