Is there a way to test private instance methods?
pub struct Bar {
// some fields
}
impl Bar {
fn f3() {}
pub fn f4() {}
}
mod tests {
fn f3_testing() {
let bar = Bar {};
bar.f3() // this doesn't work
}
fn f4_testing() {
let bar = Bar {};
bar.f4(); // this works
}
It would be ideal if it would be possible to test private instance methods the same way that you can test private static methods.