Now there is a section in buffer_test.mbt:
test "expect method with matching content" {
let buf = Buffer::make(100)
buf.write_string("Test")
buf.expect(content="Test")?
}
test "expect method with non-matching content" {
let buf = Buffer::make(100)
buf.write_string("Test")
buf.expect(content="Test")?
}
This is because the -u parameter of moon will update the expected result, while the return value of buffer.expect is still a Result that cannot be thrown.