aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_reader_writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_reader_writer.c')
-rw-r--r--test/test_reader_writer.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c
index 5431462a..48bb508e 100644
--- a/test/test_reader_writer.c
+++ b/test/test_reader_writer.c
@@ -19,7 +19,6 @@
#include "serd/serd.h"
#include <assert.h>
-#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -89,7 +88,8 @@ test_read_chunks(void)
assert(serd_reader_handle(reader) == rt);
assert(f);
- SerdStatus st = serd_reader_start_stream(reader, f, NULL, false);
+ SerdStatus st = serd_reader_start_stream(
+ reader, (SerdSource)fread, (SerdStreamErrorFunc)ferror, f, NULL, 1);
assert(st == SERD_SUCCESS);
// Write two statement separated by null characters
@@ -292,7 +292,8 @@ test_reader(const char* path)
fflush(temp);
fseek(temp, 0L, SEEK_SET);
- serd_reader_start_stream(reader, temp, NULL, true);
+ serd_reader_start_stream(
+ reader, (SerdSource)fread, (SerdStreamErrorFunc)ferror, temp, NULL, 4096);
assert(serd_reader_read_chunk(reader) == SERD_SUCCESS);
assert(serd_reader_read_chunk(reader) == SERD_FAILURE);
@@ -305,12 +306,12 @@ test_reader(const char* path)
// A byte-wise reader that hits EOF once then continues (like a socket)
{
size_t n_reads = 0;
- serd_reader_start_source_stream(reader,
- (SerdSource)eof_test_read,
- (SerdStreamErrorFunc)eof_test_error,
- &n_reads,
- NULL,
- 1);
+ serd_reader_start_stream(reader,
+ (SerdSource)eof_test_read,
+ (SerdStreamErrorFunc)eof_test_error,
+ &n_reads,
+ NULL,
+ 1);
assert(serd_reader_read_chunk(reader) == SERD_SUCCESS);
assert(serd_reader_read_chunk(reader) == SERD_FAILURE);