Implement iced_test::run entrypoint for ice testing

This commit is contained in:
Héctor Ramón Jiménez 2025-08-27 06:02:02 +02:00
parent e136e14b7c
commit 6a6a2ac8c5
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 149 additions and 22 deletions

View file

@ -221,10 +221,7 @@ impl<P: Program + 'static> Tester<P> {
self.confirm();
let ice = Ice {
viewport: Size::new(
self.viewport.width as u32,
self.viewport.height as u32,
),
viewport: self.viewport,
mode: self.mode,
preset: self.preset.clone(),
instructions: self.instructions.clone(),
@ -246,10 +243,7 @@ impl<P: Program + 'static> Tester<P> {
.discard()
}
Message::Imported(Ok(ice)) => {
self.viewport = Size::new(
ice.viewport.width as f32,
ice.viewport.height as f32,
);
self.viewport = ice.viewport;
self.mode = ice.mode;
self.preset = ice.preset;
self.instructions = ice.instructions;
@ -347,7 +341,7 @@ impl<P: Program + 'static> Tester<P> {
emulator::Event::Action(action) => {
emulator.perform(program, action);
}
emulator::Event::Failed => {
emulator::Event::Failed(_instruction) => {
*outcome = Outcome::Failed;
}
emulator::Event::Ready => {