You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a larger task that will make use of #11 in order to generate/define mock functionality.
The exact syntax/specifics are yet to be determined, but the idea is to support something like:
traitTurtle{fnpen_down(&mutself);fnpen_up(&mutself);}#[neotest::mock]structMockTurtle;implTurtleforMockTurtle{// Set this as a mock function#[neotest::mock_fn]fnpen_down(&mutself);#[neotest::mock_fn]fnpen_up(&mutself);}// ...fntest_draw_circle(){letmut turtle = MockTurtle::new();let painter = Painter::new(&mut turtle);subtest!{ |calls_pen_down|
let expectation = neotest::expect_call!( turtle.pen_down() => Times(1));
painter.draw_circle(0,0,10);
assert!(expectation.satisfied());}}
(Syntax/names are subject to change, but this is the general idea).
The text was updated successfully, but these errors were encountered:
This is a larger task that will make use of #11 in order to generate/define mock functionality.
The exact syntax/specifics are yet to be determined, but the idea is to support something like:
(Syntax/names are subject to change, but this is the general idea).
The text was updated successfully, but these errors were encountered: