clear_error() -> error.clear()
Don't return anything from free* functions.
test: is_write_buffered: fix includes and types without namespace.
test: drop unused includes, using, defines.
Add CMakeLists for unit-test.