[][src]Function loggy::assert_log

pub fn assert_log(expected: &str)

Assert that the collected log messages are as expected.

The expected string is passed through unindent prior to the comparison, to enable proper indentation of the tests data in the code.

This clears the log buffer following the comparison.

This is meant to be used in tests using the test_loggy! macro. Tests using this macro expect the log buffer being clear at the end of the test, either by using this function or clear_log.