diff options
author | David Robillard <d@drobilla.net> | 2018-05-12 20:39:23 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-19 20:52:40 -0500 |
commit | b6368f061770629493391da74b9dbf3b5777c07d (patch) | |
tree | 666a8e686032d3684b3b0fdd8a7515ea13fc389d /tests | |
parent | d7c7506a6f4af1918ba06d7730568b7858c11539 (diff) | |
download | serd-b6368f061770629493391da74b9dbf3b5777c07d.tar.gz serd-b6368f061770629493391da74b9dbf3b5777c07d.tar.bz2 serd-b6368f061770629493391da74b9dbf3b5777c07d.zip |
Use a fixed-size reader stack
This improves performance, and makes the reader more suitable for embedded or
network-facing applications, at the cost of requiring the user to specify a
maximum stack size.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index a559303f..4b4296a3 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -116,7 +116,7 @@ test_read_chunks(void) FILE* const f = tmpfile(); static const char null = 0; SerdSink sink = {rt, NULL, NULL, test_sink, NULL}; - SerdReader* reader = serd_reader_new(world, SERD_TURTLE, &sink); + SerdReader* reader = serd_reader_new(world, SERD_TURTLE, &sink, 4096); assert(reader); assert(f); @@ -332,7 +332,7 @@ test_strerror(void) { const char* msg = NULL; assert(!strcmp((msg = serd_strerror(SERD_SUCCESS)), "Success")); - for (int i = SERD_FAILURE; i <= SERD_ERR_INTERNAL; ++i) { + for (int i = SERD_FAILURE; i <= SERD_ERR_OVERFLOW; ++i) { msg = serd_strerror((SerdStatus)i); assert(strcmp(msg, "Success")); } @@ -726,7 +726,7 @@ test_reader(const char* path) SerdWorld* world = serd_world_new(); ReaderTest rt = { 0, NULL }; SerdSink sink = { &rt, NULL, NULL, test_sink, NULL }; - SerdReader* reader = serd_reader_new(world, SERD_TURTLE, &sink); + SerdReader* reader = serd_reader_new(world, SERD_TURTLE, &sink, 4096); assert(reader); SerdNode* g = serd_node_new_uri("http://example.org/"); |