projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
range-set: Add test coverage for range_set_destroy(NULL).
[pspp-builds.git]
/
tests
/
libpspp
/
range-set-test.c
diff --git
a/tests/libpspp/range-set-test.c
b/tests/libpspp/range-set-test.c
index b0eb7abbf81f5249fb2b29131a4a1351e9c2b726..9f444ad7e62eade3d692153f3fd62f8440a08c42 100644
(file)
--- a/
tests/libpspp/range-set-test.c
+++ b/
tests/libpspp/range-set-test.c
@@
-364,6
+364,13
@@
test_pool (void)
range_set_insert (rs, 1, 10);
pool_destroy (pool);
}
range_set_insert (rs, 1, 10);
pool_destroy (pool);
}
+
+/* Tests range_set_destroy(NULL). */
+static void
+test_destroy_null (void)
+{
+ range_set_destroy (NULL);
+}
\f
/* Main program. */
\f
/* Main program. */
@@
-385,6
+392,7
@@
main (void)
run_test (test_allocate, "allocate");
run_test (test_allocate_fully, "allocate_fully");
run_test (test_pool, "pool");
run_test (test_allocate, "allocate");
run_test (test_allocate_fully, "allocate_fully");
run_test (test_pool, "pool");
+ run_test (test_destroy_null, "destroy null");
putchar ('\n');
return 0;
putchar ('\n');
return 0;