Assertion library for streams