aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_node.c4
-rw-r--r--test/test_reader_writer.c8
2 files changed, 4 insertions, 8 deletions
diff --git a/test/test_node.c b/test/test_node.c
index 1d6ad2c5..45c40aa4 100644
--- a/test/test_node.c
+++ b/test/test_node.c
@@ -115,8 +115,8 @@ test_integer_to_node(void)
static void
test_blob_to_node(void)
{
- for (size_t size = 0; size < 256; ++size) {
- uint8_t* data = size > 0 ? (uint8_t*)malloc(size) : NULL;
+ for (size_t size = 1; size < 256; ++size) {
+ uint8_t* const data = (uint8_t*)malloc(size);
for (size_t i = 0; i < size; ++i) {
data[i] = (uint8_t)((size + i) % 256);
}
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c
index 41f57e77..22576f72 100644
--- a/test/test_reader_writer.c
+++ b/test/test_reader_writer.c
@@ -189,16 +189,12 @@ test_writer(const char* const path)
SerdNode o = serd_node_from_string(SERD_LITERAL, buf);
// Write 3 invalid statements (should write nothing)
- const SerdNode* junk[][5] = { { &s, &p, NULL, NULL, NULL },
- { &s, NULL, &o, NULL, NULL },
- { NULL, &p, &o, NULL, NULL },
- { &s, &p, &SERD_NODE_NULL, NULL, NULL },
+ const SerdNode* junk[][5] = { { &s, &p, &SERD_NODE_NULL, NULL, NULL },
{ &s, &SERD_NODE_NULL, &o, NULL, NULL },
{ &SERD_NODE_NULL, &p, &o, NULL, NULL },
{ &s, &o, &o, NULL, NULL },
{ &o, &p, &o, NULL, NULL },
- { &s, &p, &SERD_NODE_NULL, NULL, NULL },
- { NULL, NULL, NULL, NULL, NULL } };
+ { &s, &p, &SERD_NODE_NULL, NULL, NULL } };
for (size_t i = 0; i < sizeof(junk) / (sizeof(SerdNode*) * 5); ++i) {
assert(serd_writer_write_statement(
writer, 0, NULL,