aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_byte_source.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-08-14 01:51:55 -0400
committerDavid Robillard <d@drobilla.net>2022-01-28 21:57:07 -0500
commitb3892cb6e4963e1bbeb346a8124101b7c3cf379b (patch)
tree4800918b6f4db5ce0d0f4802988c1935996d6ba3 /test/test_byte_source.c
parent0e739f34801ff6810064a8fac570f6be2b61ae70 (diff)
downloadserd-b3892cb6e4963e1bbeb346a8124101b7c3cf379b.tar.gz
serd-b3892cb6e4963e1bbeb346a8124101b7c3cf379b.tar.bz2
serd-b3892cb6e4963e1bbeb346a8124101b7c3cf379b.zip
Simplify input stream API
More or less the same rationale as the previous commit, but for reading. This makes for nice symmetry with writing, at the cost of a slightly more annoying reader interface since the source doesn't know its block size or name.
Diffstat (limited to 'test/test_byte_source.c')
-rw-r--r--test/test_byte_source.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/test/test_byte_source.c b/test/test_byte_source.c
deleted file mode 100644
index 14ef5819..00000000
--- a/test/test_byte_source.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- Copyright 2021 David Robillard <d@drobilla.net>
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-#undef NDEBUG
-
-#include "serd/serd.h"
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdio.h>
-
-static void
-test_bad_page_size(void)
-{
- assert(!serd_byte_source_new_filename("file.ttl", 0));
-
- assert(!serd_byte_source_new_function(
- (SerdReadFunc)fread, (SerdStreamErrorFunc)ferror, NULL, NULL, NULL, 0));
-}
-
-int
-main(void)
-{
- test_bad_page_size();
-
- return 0;
-}