aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_reader_writer.c
AgeCommit message (Collapse)AuthorFilesLines
2022-01-14Preserve long or short quoting from input documentsDavid Robillard1-2/+2
2022-01-14Move SerdEnv mutation from writer to readerDavid Robillard1-3/+6
Writing having side-effects seems questionable in general, and this prepares things for expanding URIs in the reader.
2022-01-13Make Reader always read from a ByteSourceDavid Robillard1-8/+5
2022-01-13Fix crash when attempting to read before startingDavid Robillard1-0/+3
2022-01-13Replace serd_reader_set_strict() with SerdReaderFlagsDavid Robillard1-2/+2
2022-01-13Split out simple reader unit testsDavid Robillard1-176/+0
2022-01-13Make Writer always write to a ByteSinkDavid Robillard1-7/+10
2022-01-13Replace SERD_WRITE_STRICT flag with SERD_WRITE_LAXDavid Robillard1-2/+2
The unset value for flags should represent the best default, which in this case is strict parsing. Lax parsing is the riskier opt-in option.
2022-01-13Separate ByteSink from writerDavid Robillard1-3/+7
2022-01-13Replace multiple stream callbacks with SerdEventDavid Robillard1-22/+14
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.
2022-01-13Use SerdNodes to simplify some testsDavid Robillard1-25/+18
2022-01-13Add SerdStatementDavid Robillard1-10/+6
2022-01-13Add SerdCaretDavid Robillard1-1/+2
2022-01-13Remove serd_reader_set_default_graph()David Robillard1-37/+23
2022-01-13Add SerdWorld for shared library stateDavid Robillard1-8/+18
2022-01-13Clean up nodes in reader/writer testsDavid Robillard1-12/+20
2022-01-13Simplify literal construction APIDavid Robillard1-3/+2
2022-01-13Use a fixed-size reader stackDavid Robillard1-7/+10
2022-01-13Simplify reader interfaceDavid Robillard1-28/+33
2022-01-13Add SerdSink interface and hide implementationsDavid Robillard1-28/+37
2022-01-13Bring read/write interface closer to C standardDavid Robillard1-2/+3
2022-01-13Simplify node construction APIDavid Robillard1-21/+29
2022-01-13Merge datatype/language into nodeDavid Robillard1-43/+15
This moves closer to the sord API, and is more convenient in most cases.
2022-01-13Make nodes opaqueDavid Robillard1-53/+48
2022-01-13Remove "get" from accessor namesDavid Robillard1-4/+4
2022-01-13Rename SerdStyle to SerdWriterFlagsDavid Robillard1-5/+4
2022-01-13Use char* for strings in public APIDavid Robillard1-29/+27
The constant casting just makes user code a mess, for no benefit.
2022-01-13Add SerdBuffer type for mutable buffersDavid Robillard1-5/+5
This avoids const violations from abusing SerdChunk as a mutable buffer for string sinks.
2021-07-10Fix out of bounds read in testDavid Robillard1-0/+4
2021-07-10Clean up socket-like stream reading testDavid Robillard1-5/+17
2021-04-09Write statements with invalid URI characters in lax modeDavid Robillard1-0/+1
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