aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_reader_writer.c
AgeCommit message (Collapse)AuthorFilesLines
2021-03-08Separate ByteSink from WriterDavid Robillard1-3/+7
2021-03-08Replace multiple stream callbacks with SerdEventDavid Robillard1-26/+19
This makes plumbing easier since everything goes through the same "stream" and only one callback is required to handling everything. It's also more easily extensible in case more event types need to be added in the future.
2021-03-08Add SerdStatementDavid Robillard1-10/+6
2021-03-08Add SerdCursorDavid Robillard1-1/+2
2021-03-08Remove serd_reader_set_default_graph()David Robillard1-36/+23
2021-03-08Add serd_world_get_blank()David Robillard1-0/+18
2021-03-08Add SerdWorld for shared library stateDavid Robillard1-5/+15
2021-03-08Clean up nodes in reader/writer testsDavid Robillard1-12/+20
2021-03-08Simplify literal construction APIDavid Robillard1-3/+2
2021-03-08Use a fixed-size reader stackDavid Robillard1-3/+3
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.
2021-03-07Simplify reader interfaceDavid Robillard1-20/+20
2021-03-07Add SerdSink interface and hide implementationsDavid Robillard1-27/+36
2021-03-07Bring read/write interface closer to C standardDavid Robillard1-5/+10
2021-03-07Simplify reader interfaceDavid Robillard1-9/+10
2021-03-07Simplify node construction APIDavid Robillard1-21/+30
2021-03-07Merge datatype/language into nodeDavid Robillard1-43/+15
This moves closer to the sord API, and is more convenient in most cases.
2021-03-07Remove SERD_NOTHING node typeDavid Robillard1-15/+1
2021-03-07Make nodes opaqueDavid Robillard1-42/+51
2021-03-07Remove "get" from accessor namesDavid Robillard1-4/+4
2021-03-07Rename SerdStyle to SerdWriterFlagsDavid Robillard1-5/+4
2021-03-07Use char* for strings in public APIDavid Robillard1-29/+27
The constant casting just makes user code a mess, for no benefit.
2021-03-07Add SerdBuffer type for mutable buffersDavid Robillard1-5/+5
This avoids const violations from abusing SerdChunk as a mutable buffer for string sinks.
2021-01-02Use email address instead of website for attributionDavid Robillard1-1/+1
2020-12-31Format all code with clang-formatDavid Robillard1-261/+268
2020-11-13Remove tests that pass null to nonnull parametersDavid Robillard1-6/+2
2020-11-11Add nonnull and nullable attributes to APIDavid Robillard1-0/+8
This will warn if NULL is passed to any nonnull-annotated parameter, and is also supported by sanitizers which can check for violations at runtime. Unfortunately, it is currently only supported by clang. GCC has a similar feature in the nonnull attribute, but this has a different syntax (it's a function attribute) and is more dangerous since it is used by the optimizer to assume a null pointer is undefined behavior. This one just warns and still allows code to handle the situation gracefully, which I think is more appropriate for a library API. Note that this optimization behavior is not some unlikely edge case: switching these attributes to the GCC one will break release builds.
2020-11-09Add a test for reading strings with no trailing newlineDavid Robillard1-0/+23
2020-11-09Split out reader and writer testsDavid Robillard1-0/+329